pub struct Registry { /* private fields */ }Expand description
Registry that stores components by their URI scheme.
Implementations§
Source§impl Registry
impl Registry
Sourcepub fn register<C: Component + 'static>(&mut self, component: C)
pub fn register<C: Component + 'static>(&mut self, component: C)
Register a component. Replaces any existing component with the same scheme.
Sourcepub fn get_or_err(&self, scheme: &str) -> Result<&dyn Component, CamelError>
pub fn get_or_err(&self, scheme: &str) -> Result<&dyn Component, CamelError>
Look up a component by scheme, returning an error if not found.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Registry
impl !RefUnwindSafe for Registry
impl Send for Registry
impl Sync for Registry
impl Unpin for Registry
impl UnsafeUnpin for Registry
impl !UnwindSafe for Registry
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