pub struct SessionRegistry<F> { /* private fields */ }Expand description
Session engines keyed by engine id, one registry per host frame type.
Implementations§
Source§impl<F> SessionRegistry<F>
impl<F> SessionRegistry<F>
pub fn new() -> Self
Sourcepub fn register(&mut self, engine: Box<dyn SessionEngine<F>>)
pub fn register(&mut self, engine: Box<dyn SessionEngine<F>>)
Register an engine under its own id. Last registration wins, matching
crate::EngineRegistry semantics.
pub fn contains(&self, engine_id: &str) -> bool
pub fn get(&self, engine_id: &str) -> Option<&dyn SessionEngine<F>>
pub fn spawn( &self, engine_id: &str, request: &SessionSpawnRequest, ) -> Result<Box<dyn DocumentSession<F>>, SessionError>
pub fn engine_ids(&self) -> impl Iterator<Item = &str>
Trait Implementations§
Source§impl<F: Default> Default for SessionRegistry<F>
impl<F: Default> Default for SessionRegistry<F>
Source§fn default() -> SessionRegistry<F>
fn default() -> SessionRegistry<F>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<F> !RefUnwindSafe for SessionRegistry<F>
impl<F> !UnwindSafe for SessionRegistry<F>
impl<F> Freeze for SessionRegistry<F>
impl<F> Send for SessionRegistry<F>
impl<F> Sync for SessionRegistry<F>
impl<F> Unpin for SessionRegistry<F>
impl<F> UnsafeUnpin for SessionRegistry<F>
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