Trait script::conversions::Convert

source ·
pub trait Convert<T> {
    // Required method
    fn convert(self) -> T;
}
Expand description

A version of the Into trait from the standard library that can be used to convert between two types that are not defined in the script crate. This is intended to be used on dict/enum types generated from WebIDL once those types are moved out of the script crate.

Required Methods§

source

fn convert(self) -> T

Implementations on Foreign Types§

source§

impl Convert<AudioContextState> for ProcessingState

source§

impl Convert<MediaDeviceKind> for MediaDeviceKind

source§

impl Convert<RTCDataChannelState> for DataChannelState

source§

impl Convert<RTCIceConnectionState> for IceConnectionState

source§

impl Convert<RTCIceGatheringState> for GatheringState

source§

impl Convert<RTCSignalingState> for SignalingState

source§

impl Convert<ReferrerPolicy> for ReferrerPolicy

source§

impl Convert<RequestCache> for CacheMode

source§

impl Convert<RequestCredentials> for CredentialsMode

source§

impl Convert<RequestDestination> for Destination

source§

impl Convert<RequestMode> for RequestMode

source§

impl Convert<RequestRedirect> for RedirectMode

source§

impl Convert<GPUErrorFilter> for ErrorFilter

source§

impl Convert<XREnvironmentBlendMode> for EnvironmentBlendMode

source§

impl Convert<Error> for BluetoothError

source§

impl Convert<RTCSessionDescriptionInit> for SessionDescription

Implementors§

source§

impl Convert<Destination> for RequestDestination

source§

impl Convert<PermissionName> for PermissionName

source§

impl Convert<ReferrerPolicy> for script::dom::bindings::codegen::Bindings::RequestBinding::ReferrerPolicy

source§

impl Convert<CacheMode> for RequestCache

source§

impl Convert<CredentialsMode> for RequestCredentials

source§

impl Convert<RedirectMode> for RequestRedirect

source§

impl Convert<RequestMode> for script::dom::bindings::codegen::Bindings::RequestBinding::RequestMode

source§

impl Convert<MediaSessionActionType> for MediaSessionAction

source§

impl Convert<FilterType> for BiquadFilterType

source§

impl Convert<AudioContextOptions> for BaseAudioContextOptions

source§

impl Convert<LatencyCategory> for AudioContextLatencyCategory

source§

impl Convert<ChannelCountMode> for ChannelCountMode

source§

impl Convert<ChannelInterpretation> for ChannelInterpretation

source§

impl Convert<OscillatorType> for OscillatorType

source§

impl Convert<DistanceModel> for DistanceModelType

source§

impl Convert<PanningModel> for PanningModelType

source§

impl Convert<ParamRate> for AutomationRate

source§

impl Convert<EntityType> for FakeXRRegionType

source§

impl Convert<Handedness> for XRHandedness

source§

impl Convert<TargetRayMode> for XRTargetRayMode

source§

impl Convert<MockButtonType> for FakeXRButtonType

source§

impl Convert<SessionMode> for XRSessionMode

source§

impl Convert<LoadOp> for &GPULoadOp

source§

impl Convert<StoreOp> for &GPUStoreOp

source§

impl Convert<AddressMode> for GPUAddressMode

source§

impl Convert<BlendFactor> for &GPUBlendFactor

source§

impl Convert<CompareFunction> for GPUCompareFunction

source§

impl Convert<FilterMode> for GPUFilterMode

source§

impl Convert<PrimitiveTopology> for &GPUPrimitiveTopology

source§

impl Convert<StencilOperation> for GPUStencilOperation

source§

impl Convert<TextureDimension> for GPUTextureDimension

source§

impl Convert<TextureFormat> for GPUTextureFormat

source§

impl Convert<TextureViewDimension> for GPUTextureViewDimension

source§

impl Convert<VertexFormat> for GPUVertexFormat

source§

impl Convert<DataChannelInit> for &RTCDataChannelInit

source§

impl Convert<BlendComponent> for &GPUBlendComponent

source§

impl Convert<PrimitiveState> for &GPUPrimitiveState

source§

impl Convert<TexelCopyBufferInfo<Id<Buffer>>> for &GPUImageCopyBuffer

source§

impl Convert<TexelCopyBufferLayout> for &GPUImageDataLayout

source§

impl Convert<SecurityPolicyViolationEventInit> for SecurityPolicyViolationReport

source§

impl<'a> Convert<Option<Cow<'a, str>>> for &GPUObjectDescriptorBase

source§

impl<'a> Convert<BiquadFilterNodeOptions> for &'a BiquadFilterOptions

source§

impl<'a> Convert<RealTimeAudioContextOptions> for &'a AudioContextOptions

source§

impl<'a> Convert<OscillatorNodeOptions> for &'a OscillatorOptions

source§

impl<'a> Convert<PannerNodeOptions> for &'a PannerOptions

source§

impl<'a> Convert<SessionDescription> for &'a RTCSessionDescriptionInit

source§

impl<'a> Convert<BindGroupEntry<'a>> for &GPUBindGroupEntry

source§

impl<'a> Convert<ProgrammableStageDescriptor<'a>> for &GPUProgrammableStage