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§
Implementations on Foreign Types§
Source§impl Convert<TrustedHTMLOrString<DomTypeHolder>> for TrustedHTMLOrNullIsEmptyString<DomTypeHolder>
impl Convert<TrustedHTMLOrString<DomTypeHolder>> for TrustedHTMLOrNullIsEmptyString<DomTypeHolder>
fn convert(self) -> TrustedHTMLOrString<DomTypeHolder>
Source§impl Convert<AudioContextState> for ProcessingState
impl Convert<AudioContextState> for ProcessingState
fn convert(self) -> AudioContextState
Source§impl Convert<MediaDeviceKind> for MediaDeviceKind
impl Convert<MediaDeviceKind> for MediaDeviceKind
fn convert(self) -> MediaDeviceKind
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<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<AlignSetting> for WebVttTextAlignment
impl Convert<AlignSetting> for WebVttTextAlignment
fn convert(self) -> AlignSetting
Source§impl Convert<DirectionSetting> for WebVttWritingDirection
impl Convert<DirectionSetting> for WebVttWritingDirection
fn convert(self) -> DirectionSetting
Source§impl Convert<LineAlignSetting> for WebVttLineAlignment
impl Convert<LineAlignSetting> for WebVttLineAlignment
fn convert(self) -> LineAlignSetting
Source§impl Convert<PositionAlignSetting> for WebVttPositionAlignment
impl Convert<PositionAlignSetting> for WebVttPositionAlignment
fn convert(self) -> PositionAlignSetting
Source§impl Convert<GPUErrorFilter> for ErrorFilter
impl Convert<GPUErrorFilter> for ErrorFilter
fn convert(self) -> GPUErrorFilter
Source§impl Convert<XREnvironmentBlendMode> for EnvironmentBlendMode
impl Convert<XREnvironmentBlendMode> for EnvironmentBlendMode
fn convert(self) -> XREnvironmentBlendMode
Source§impl Convert<LineAndPositionSetting> for WebVttLineAndPositionSetting
impl Convert<LineAndPositionSetting> for WebVttLineAndPositionSetting
fn convert(self) -> LineAndPositionSetting
Source§impl Convert<AddEventListenerOptions<DomTypeHolder>> for AddEventListenerOptionsOrBoolean<DomTypeHolder>
impl Convert<AddEventListenerOptions<DomTypeHolder>> for AddEventListenerOptionsOrBoolean<DomTypeHolder>
Source§impl Convert<EventListenerOptions> for EventListenerOptionsOrBoolean
impl Convert<EventListenerOptions> for EventListenerOptionsOrBoolean
fn convert(self) -> EventListenerOptions
Source§impl Convert<RTCSessionDescriptionInit> for SessionDescription
impl Convert<RTCSessionDescriptionInit> for SessionDescription
fn convert(self) -> RTCSessionDescriptionInit
Source§impl Convert<DOMString> for TrustedHTMLOrTrustedScriptOrTrustedScriptURLOrString<DomTypeHolder>
impl Convert<DOMString> for TrustedHTMLOrTrustedScriptOrTrustedScriptURLOrString<DomTypeHolder>
Implementors§
impl Convert<Destination> for RequestDestination
impl Convert<ShadowRootMode> for ShadowRootMode
impl Convert<MediaSessionActionType> for MediaSessionAction
impl Convert<PermissionFeature> for PermissionName
impl Convert<WakeLockType> for WakeLockType
impl Convert<ReferrerPolicy> for script::dom::bindings::codegen::Bindings::RequestBinding::ReferrerPolicy
impl Convert<CacheMode> for RequestCache
impl Convert<CredentialsMode> for RequestCredentials
impl Convert<RedirectMode> for RequestRedirect
impl Convert<RequestMode> for script::dom::bindings::codegen::Bindings::RequestBinding::RequestMode
impl Convert<FillRule> for CanvasFillRule
impl Convert<ChannelCountMode> for ChannelCountMode
impl Convert<ChannelInterpretation> for ChannelInterpretation
impl Convert<FilterType> for BiquadFilterType
impl Convert<AudioContextOptions> for BaseAudioContextOptions
impl Convert<LatencyCategory> for AudioContextLatencyCategory
impl Convert<OscillatorType> for OscillatorType
impl Convert<DistanceModel> for DistanceModelType
impl Convert<PanningModel> for PanningModelType
impl Convert<ParamRate> for AutomationRate
impl Convert<EntityType> for FakeXRRegionType
impl Convert<Handedness> for XRHandedness
impl Convert<TargetRayMode> for XRTargetRayMode
impl Convert<LayerInit> for XRWebGLLayerInit
impl Convert<MockButtonType> for FakeXRButtonType
impl Convert<SessionMode> for XRSessionMode
impl Convert<GLContextAttributes> for WebGLContextAttributes
Available on crate feature
webgl only.