pub struct TypedFactory<C: Component> { /* private fields */ }Expand description
Convenience wrapper that adapts a concrete Component into a
ComponentFactory.
Implementations§
Trait Implementations§
Source§impl<C: Component> ComponentFactory for TypedFactory<C>
impl<C: Component> ComponentFactory for TypedFactory<C>
Source§fn depends_on(&self) -> Vec<String>
fn depends_on(&self) -> Vec<String>
Names of components this component depends on.
Source§fn build<'life0, 'async_trait>(
self: Box<Self>,
config: Value,
ctx: &'life0 ComponentContext,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AnyComponent>, RegistryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn build<'life0, 'async_trait>(
self: Box<Self>,
config: Value,
ctx: &'life0 ComponentContext,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AnyComponent>, RegistryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Build an
AnyComponent from the raw configuration value.Auto Trait Implementations§
impl<C> Freeze for TypedFactory<C>
impl<C> RefUnwindSafe for TypedFactory<C>
impl<C> Send for TypedFactory<C>
impl<C> Sync for TypedFactory<C>
impl<C> Unpin for TypedFactory<C>
impl<C> UnsafeUnpin for TypedFactory<C>
impl<C> UnwindSafe for TypedFactory<C>
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