pub trait XRSessionMethods<D>where
D: DomTypes,{
Show 36 methods
// Required methods
fn VisibilityState(&self) -> XRVisibilityState;
fn GetFrameRate(&self) -> Option<Finite<f32>>;
fn GetSupportedFrameRates(
&self,
cx: &mut JSContext,
) -> Option<RootedTraceableBox<TypedArray<Float32, Box<Heap<*mut JSObject>>>>>;
fn RenderState(&self) -> Root<Dom<<D as DomTypes>::XRRenderState>>;
fn InputSources(&self) -> Root<Dom<<D as DomTypes>::XRInputSourceArray>>;
fn EnabledFeatures(
&self,
cx: &mut JSContext,
retval: MutableHandle<'_, Value>,
);
fn IsSystemKeyboardSupported(&self) -> bool;
fn UpdateRenderState(
&self,
cx: &mut JSContext,
state: &XRRenderStateInit<D>,
) -> Result<(), Error>;
fn UpdateTargetFrameRate(
&self,
realm: &mut CurrentRealm<'_>,
rate: Finite<f32>,
) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot;
fn RequestReferenceSpace(
&self,
realm: &mut CurrentRealm<'_>,
type_: XRReferenceSpaceType,
) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot;
fn RequestAnimationFrame(
&self,
callback: RootedCallback<XRFrameRequestCallback<D>>,
) -> i32;
fn CancelAnimationFrame(&self, handle: i32);
fn End(
&self,
realm: &mut CurrentRealm<'_>,
) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot;
fn GetOnend(
&self,
cx: &mut JSContext,
) -> Option<RootedCallback<EventHandlerNonNull<D>>>;
fn SetOnend(
&self,
cx: &mut JSContext,
value: Option<RootedCallback<EventHandlerNonNull<D>>>,
);
fn GetOnselect(
&self,
cx: &mut JSContext,
) -> Option<RootedCallback<EventHandlerNonNull<D>>>;
fn SetOnselect(
&self,
cx: &mut JSContext,
value: Option<RootedCallback<EventHandlerNonNull<D>>>,
);
fn GetOnsqueeze(
&self,
cx: &mut JSContext,
) -> Option<RootedCallback<EventHandlerNonNull<D>>>;
fn SetOnsqueeze(
&self,
cx: &mut JSContext,
value: Option<RootedCallback<EventHandlerNonNull<D>>>,
);
fn GetOninputsourceschange(
&self,
cx: &mut JSContext,
) -> Option<RootedCallback<EventHandlerNonNull<D>>>;
fn SetOninputsourceschange(
&self,
cx: &mut JSContext,
value: Option<RootedCallback<EventHandlerNonNull<D>>>,
);
fn GetOnselectstart(
&self,
cx: &mut JSContext,
) -> Option<RootedCallback<EventHandlerNonNull<D>>>;
fn SetOnselectstart(
&self,
cx: &mut JSContext,
value: Option<RootedCallback<EventHandlerNonNull<D>>>,
);
fn GetOnselectend(
&self,
cx: &mut JSContext,
) -> Option<RootedCallback<EventHandlerNonNull<D>>>;
fn SetOnselectend(
&self,
cx: &mut JSContext,
value: Option<RootedCallback<EventHandlerNonNull<D>>>,
);
fn GetOnsqueezestart(
&self,
cx: &mut JSContext,
) -> Option<RootedCallback<EventHandlerNonNull<D>>>;
fn SetOnsqueezestart(
&self,
cx: &mut JSContext,
value: Option<RootedCallback<EventHandlerNonNull<D>>>,
);
fn GetOnsqueezeend(
&self,
cx: &mut JSContext,
) -> Option<RootedCallback<EventHandlerNonNull<D>>>;
fn SetOnsqueezeend(
&self,
cx: &mut JSContext,
value: Option<RootedCallback<EventHandlerNonNull<D>>>,
);
fn GetOnvisibilitychange(
&self,
cx: &mut JSContext,
) -> Option<RootedCallback<EventHandlerNonNull<D>>>;
fn SetOnvisibilitychange(
&self,
cx: &mut JSContext,
value: Option<RootedCallback<EventHandlerNonNull<D>>>,
);
fn GetOnframeratechange(
&self,
cx: &mut JSContext,
) -> Option<RootedCallback<EventHandlerNonNull<D>>>;
fn SetOnframeratechange(
&self,
cx: &mut JSContext,
value: Option<RootedCallback<EventHandlerNonNull<D>>>,
);
fn EnvironmentBlendMode(&self) -> XREnvironmentBlendMode;
fn InteractionMode(&self) -> XRInteractionMode;
fn RequestHitTestSource(
&self,
realm: &mut CurrentRealm<'_>,
options: &XRHitTestOptionsInit<D>,
) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot;
}Required Methods§
fn VisibilityState(&self) -> XRVisibilityState
fn GetFrameRate(&self) -> Option<Finite<f32>>
fn GetSupportedFrameRates( &self, cx: &mut JSContext, ) -> Option<RootedTraceableBox<TypedArray<Float32, Box<Heap<*mut JSObject>>>>>
fn RenderState(&self) -> Root<Dom<<D as DomTypes>::XRRenderState>>
fn InputSources(&self) -> Root<Dom<<D as DomTypes>::XRInputSourceArray>>
fn EnabledFeatures(&self, cx: &mut JSContext, retval: MutableHandle<'_, Value>)
fn IsSystemKeyboardSupported(&self) -> bool
fn UpdateRenderState( &self, cx: &mut JSContext, state: &XRRenderStateInit<D>, ) -> Result<(), Error>
fn UpdateTargetFrameRate( &self, realm: &mut CurrentRealm<'_>, rate: Finite<f32>, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot
fn RequestReferenceSpace( &self, realm: &mut CurrentRealm<'_>, type_: XRReferenceSpaceType, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot
fn RequestAnimationFrame( &self, callback: RootedCallback<XRFrameRequestCallback<D>>, ) -> i32
fn CancelAnimationFrame(&self, handle: i32)
fn End( &self, realm: &mut CurrentRealm<'_>, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot
fn GetOnend( &self, cx: &mut JSContext, ) -> Option<RootedCallback<EventHandlerNonNull<D>>>
fn SetOnend( &self, cx: &mut JSContext, value: Option<RootedCallback<EventHandlerNonNull<D>>>, )
fn GetOnselect( &self, cx: &mut JSContext, ) -> Option<RootedCallback<EventHandlerNonNull<D>>>
fn SetOnselect( &self, cx: &mut JSContext, value: Option<RootedCallback<EventHandlerNonNull<D>>>, )
fn GetOnsqueeze( &self, cx: &mut JSContext, ) -> Option<RootedCallback<EventHandlerNonNull<D>>>
fn SetOnsqueeze( &self, cx: &mut JSContext, value: Option<RootedCallback<EventHandlerNonNull<D>>>, )
fn GetOninputsourceschange( &self, cx: &mut JSContext, ) -> Option<RootedCallback<EventHandlerNonNull<D>>>
fn SetOninputsourceschange( &self, cx: &mut JSContext, value: Option<RootedCallback<EventHandlerNonNull<D>>>, )
fn GetOnselectstart( &self, cx: &mut JSContext, ) -> Option<RootedCallback<EventHandlerNonNull<D>>>
fn SetOnselectstart( &self, cx: &mut JSContext, value: Option<RootedCallback<EventHandlerNonNull<D>>>, )
fn GetOnselectend( &self, cx: &mut JSContext, ) -> Option<RootedCallback<EventHandlerNonNull<D>>>
fn SetOnselectend( &self, cx: &mut JSContext, value: Option<RootedCallback<EventHandlerNonNull<D>>>, )
fn GetOnsqueezestart( &self, cx: &mut JSContext, ) -> Option<RootedCallback<EventHandlerNonNull<D>>>
fn SetOnsqueezestart( &self, cx: &mut JSContext, value: Option<RootedCallback<EventHandlerNonNull<D>>>, )
fn GetOnsqueezeend( &self, cx: &mut JSContext, ) -> Option<RootedCallback<EventHandlerNonNull<D>>>
fn SetOnsqueezeend( &self, cx: &mut JSContext, value: Option<RootedCallback<EventHandlerNonNull<D>>>, )
fn GetOnvisibilitychange( &self, cx: &mut JSContext, ) -> Option<RootedCallback<EventHandlerNonNull<D>>>
fn SetOnvisibilitychange( &self, cx: &mut JSContext, value: Option<RootedCallback<EventHandlerNonNull<D>>>, )
fn GetOnframeratechange( &self, cx: &mut JSContext, ) -> Option<RootedCallback<EventHandlerNonNull<D>>>
fn SetOnframeratechange( &self, cx: &mut JSContext, value: Option<RootedCallback<EventHandlerNonNull<D>>>, )
fn EnvironmentBlendMode(&self) -> XREnvironmentBlendMode
fn InteractionMode(&self) -> XRInteractionMode
fn RequestHitTestSource( &self, realm: &mut CurrentRealm<'_>, options: &XRHitTestOptionsInit<D>, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".