Struct webxr_api::registry::MainThreadRegistry
source · pub struct MainThreadRegistry<GL> {
discoveries: Vec<Box<dyn DiscoveryAPI<GL>>>,
sessions: Vec<Box<dyn MainThreadSession>>,
mocks: Vec<Box<dyn MockDiscoveryAPI<GL>>>,
sender: Sender<RegistryMsg>,
receiver: Receiver<RegistryMsg>,
waker: MainThreadWakerImpl,
grand_manager: LayerGrandManager<GL>,
next_session_id: u32,
}
Fields§
§discoveries: Vec<Box<dyn DiscoveryAPI<GL>>>
§sessions: Vec<Box<dyn MainThreadSession>>
§mocks: Vec<Box<dyn MockDiscoveryAPI<GL>>>
§sender: Sender<RegistryMsg>
§receiver: Receiver<RegistryMsg>
§waker: MainThreadWakerImpl
§grand_manager: LayerGrandManager<GL>
§next_session_id: u32
Implementations§
source§impl<GL: 'static + GLTypes> MainThreadRegistry<GL>
impl<GL: 'static + GLTypes> MainThreadRegistry<GL>
pub fn new( waker: Box<dyn MainThreadWaker>, grand_manager: LayerGrandManager<GL>, ) -> Result<Self, Error>
pub fn registry(&self) -> Registry
pub fn register<D>(&mut self, discovery: D)where
D: DiscoveryAPI<GL>,
pub fn register_mock<D>(&mut self, discovery: D)where
D: MockDiscoveryAPI<GL>,
pub fn run_on_main_thread<S>(&mut self, session: S)where
S: MainThreadSession,
pub fn run_one_frame(&mut self)
pub fn running(&self) -> bool
fn handle_msg(&mut self, msg: RegistryMsg)
fn supports_session(&mut self, mode: SessionMode) -> Result<(), Error>
fn request_session( &mut self, mode: SessionMode, init: SessionInit, raf_sender: Sender<Frame>, ) -> Result<Session, Error>
fn simulate_device_connection( &mut self, init: MockDeviceInit, ) -> Result<Sender<MockDeviceMsg>, Error>
Auto Trait Implementations§
impl<GL> !Freeze for MainThreadRegistry<GL>
impl<GL> !RefUnwindSafe for MainThreadRegistry<GL>
impl<GL> !Send for MainThreadRegistry<GL>
impl<GL> !Sync for MainThreadRegistry<GL>
impl<GL> Unpin for MainThreadRegistry<GL>
impl<GL> !UnwindSafe for MainThreadRegistry<GL>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more