pub struct InterfaceRegistry { /* private fields */ }Expand description
Registry of interface factories keyed by type name.
Implementations§
Source§impl InterfaceRegistry
impl InterfaceRegistry
Sourcepub fn register(&mut self, factory: Box<dyn InterfaceFactory>)
pub fn register(&mut self, factory: Box<dyn InterfaceFactory>)
Register a factory. The factory’s type_name() is used as the key.
Sourcepub fn get(&self, type_name: &str) -> Option<&dyn InterfaceFactory>
pub fn get(&self, type_name: &str) -> Option<&dyn InterfaceFactory>
Look up a factory by config-file type name.
Sourcepub fn with_builtins() -> Self
pub fn with_builtins() -> Self
Create a registry pre-populated with all built-in interface types.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for InterfaceRegistry
impl !RefUnwindSafe for InterfaceRegistry
impl Send for InterfaceRegistry
impl Sync for InterfaceRegistry
impl Unpin for InterfaceRegistry
impl UnsafeUnpin for InterfaceRegistry
impl !UnwindSafe for InterfaceRegistry
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
Source§impl<T> InterfaceConfigData for Twhere
T: Send + 'static,
impl<T> InterfaceConfigData for Twhere
T: Send + 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more