pub(crate) trait Convert<T> {
// Required method
fn convert(self) -> T;
}Expand description
A version of the Into<T> 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§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl Convert<AddEventListenerOptions<DomTypeHolder>> for AddEventListenerOptionsOrBoolean<DomTypeHolder>
impl Convert<AddEventListenerOptions<DomTypeHolder>> for AddEventListenerOptionsOrBoolean<DomTypeHolder>
Source§impl Convert<AlignSetting> for WebVttTextAlignment
impl Convert<AlignSetting> for WebVttTextAlignment
fn convert(self) -> AlignSetting
Source§impl Convert<AudioContextState> for ProcessingState
impl Convert<AudioContextState> for ProcessingState
fn convert(self) -> AudioContextState
Source§impl Convert<DOMString> for TrustedHTMLOrTrustedScriptOrTrustedScriptURLOrString<DomTypeHolder>
impl Convert<DOMString> for TrustedHTMLOrTrustedScriptOrTrustedScriptURLOrString<DomTypeHolder>
Source§impl Convert<DirectionSetting> for WebVttWritingDirection
impl Convert<DirectionSetting> for WebVttWritingDirection
fn convert(self) -> DirectionSetting
Source§impl Convert<EventListenerOptions> for EventListenerOptionsOrBoolean
impl Convert<EventListenerOptions> for EventListenerOptionsOrBoolean
fn convert(self) -> EventListenerOptions
Source§impl Convert<LineAlignSetting> for WebVttLineAlignment
impl Convert<LineAlignSetting> for WebVttLineAlignment
fn convert(self) -> LineAlignSetting
Source§impl Convert<LineAndPositionSetting> for WebVttLineAndPositionSetting
impl Convert<LineAndPositionSetting> for WebVttLineAndPositionSetting
fn convert(self) -> LineAndPositionSetting
Source§impl Convert<MediaDeviceKind> for MediaDeviceKind
impl Convert<MediaDeviceKind> for MediaDeviceKind
fn convert(self) -> MediaDeviceKind
Source§impl Convert<PositionAlignSetting> for WebVttPositionAlignment
impl Convert<PositionAlignSetting> for WebVttPositionAlignment
fn convert(self) -> PositionAlignSetting
Source§impl Convert<RTCDataChannelState> for DataChannelState
impl Convert<RTCDataChannelState> for DataChannelState
fn convert(self) -> RTCDataChannelState
Source§impl Convert<RTCIceConnectionState> for IceConnectionState
impl Convert<RTCIceConnectionState> for IceConnectionState
fn convert(self) -> RTCIceConnectionState
Source§impl Convert<RTCIceGatheringState> for GatheringState
impl Convert<RTCIceGatheringState> for GatheringState
fn convert(self) -> RTCIceGatheringState
Source§impl Convert<RTCSessionDescriptionInit> for SessionDescription
impl Convert<RTCSessionDescriptionInit> for SessionDescription
fn convert(self) -> RTCSessionDescriptionInit
Source§impl Convert<RTCSignalingState> for SignalingState
impl Convert<RTCSignalingState> for SignalingState
fn convert(self) -> RTCSignalingState
Source§impl Convert<ReferrerPolicy> for ReferrerPolicy
impl Convert<ReferrerPolicy> for ReferrerPolicy
fn convert(self) -> ReferrerPolicy
Source§impl Convert<RequestCache> for CacheMode
impl Convert<RequestCache> for CacheMode
fn convert(self) -> RequestCache
Source§impl Convert<RequestCredentials> for CredentialsMode
impl Convert<RequestCredentials> for CredentialsMode
fn convert(self) -> RequestCredentials
Source§impl Convert<RequestDestination> for Destination
impl Convert<RequestDestination> for Destination
fn convert(self) -> RequestDestination
Source§impl Convert<RequestMode> for RequestMode
impl Convert<RequestMode> for RequestMode
fn convert(self) -> RequestMode
Source§impl Convert<RequestRedirect> for RedirectMode
impl Convert<RequestRedirect> for RedirectMode
fn convert(self) -> RequestRedirect
Source§impl Convert<TrustedHTMLOrString<DomTypeHolder>> for TrustedHTMLOrNullIsEmptyString<DomTypeHolder>
impl Convert<TrustedHTMLOrString<DomTypeHolder>> for TrustedHTMLOrNullIsEmptyString<DomTypeHolder>
fn convert(self) -> TrustedHTMLOrString<DomTypeHolder>
Source§impl Convert<XREnvironmentBlendMode> for EnvironmentBlendMode
impl Convert<XREnvironmentBlendMode> for EnvironmentBlendMode
fn convert(self) -> XREnvironmentBlendMode
Implementors§
impl Convert<AudioContextOptions> for BaseAudioContextOptions
impl Convert<BiquadFilterNodeOptions> for &BiquadFilterOptions
impl Convert<CSPViolationReportBody> for SecurityPolicyViolationReport
impl Convert<CacheMode> for RequestCache
impl Convert<ChannelCountMode> for ChannelCountMode
impl Convert<ChannelInterpretation> for ChannelInterpretation
impl Convert<ChannelNodeOptions> for ChannelMergerOptions
impl Convert<ConstantSourceNodeOptions> for ConstantSourceOptions
impl Convert<CredentialsMode> for RequestCredentials
impl Convert<DataChannelInit> for &RTCDataChannelInit
impl Convert<DelayNodeOptions> for DelayOptions
impl Convert<Destination> for RequestDestination
impl Convert<DistanceModel> for DistanceModelType
impl Convert<EntityType> for FakeXRRegionType
impl Convert<FillRule> for CanvasFillRule
impl Convert<FilterType> for BiquadFilterType
impl Convert<GLContextAttributes> for WebGLContextAttributes
Available on crate feature
webgl only.impl Convert<GainNodeOptions> for GainOptions
impl Convert<Handedness> for XRHandedness
impl Convert<IIRFilterNodeOptions> for IIRFilterOptions
impl Convert<LatencyCategory> for AudioContextLatencyCategory
impl Convert<LayerInit> for XRWebGLLayerInit
impl Convert<MediaSessionActionType> for MediaSessionAction
impl Convert<MockButtonType> for FakeXRButtonType
impl Convert<PannerNodeOptions> for &PannerOptions
impl Convert<PanningModel> for PanningModelType
impl Convert<ParamRate> for AutomationRate
impl Convert<PeriodicWave> for &PeriodicWave
impl Convert<PermissionFeature> for PermissionName
impl Convert<RealTimeAudioContextOptions> for &AudioContextOptions
impl Convert<RedirectMode> for RequestRedirect
impl Convert<ReferrerPolicy> for script::dom::bindings::codegen::Bindings::RequestBinding::ReferrerPolicy
impl Convert<RequestMode> for script::dom::bindings::codegen::Bindings::RequestBinding::RequestMode
impl Convert<SecurityPolicyViolationEventInit> for SecurityPolicyViolationReport
impl Convert<SessionDescription> for &RTCSessionDescriptionInit
impl Convert<SessionMode> for XRSessionMode
impl Convert<ShadowRootMode> for ShadowRootMode
Available on crate feature
devtools only.