Skip to main content

XRSystemMethods

pub trait XRSystemMethods<D: DomTypes> {
    // Required methods
    fn IsSessionSupported(
        &self,
        realm: &mut CurrentRealm<'_>,
        mode: XRSessionMode,
    ) -> <D::Promise as PromiseHelpers<D>>::StackRoot;
    fn RequestSession(
        &self,
        realm: &mut CurrentRealm<'_>,
        mode: XRSessionMode,
        parameters: &XRSessionInit,
    ) -> <D::Promise as PromiseHelpers<D>>::StackRoot;
    fn GetOndevicechange(
        &self,
        cx: &mut JSContext,
    ) -> Option<RootedCallback<EventHandlerNonNull<D>>>;
    fn SetOndevicechange(
        &self,
        cx: &mut JSContext,
        value: Option<RootedCallback<EventHandlerNonNull<D>>>,
    );
    fn Test(&self, cx: &mut JSContext) -> DomRoot<D::XRTest>;
}

Required Methods§

Source

fn IsSessionSupported( &self, realm: &mut CurrentRealm<'_>, mode: XRSessionMode, ) -> <D::Promise as PromiseHelpers<D>>::StackRoot

Source

fn RequestSession( &self, realm: &mut CurrentRealm<'_>, mode: XRSessionMode, parameters: &XRSessionInit, ) -> <D::Promise as PromiseHelpers<D>>::StackRoot

Source

fn GetOndevicechange( &self, cx: &mut JSContext, ) -> Option<RootedCallback<EventHandlerNonNull<D>>>

Source

fn SetOndevicechange( &self, cx: &mut JSContext, value: Option<RootedCallback<EventHandlerNonNull<D>>>, )

Source

fn Test(&self, cx: &mut JSContext) -> DomRoot<D::XRTest>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§