pub struct LazyComponent<F> { /* private fields */ }Expand description
Wraps a component factory so construction is deferred until start().
Implementations§
Trait Implementations§
Source§impl<F: Fn() -> Arc<dyn Component> + Send + Sync> Component for LazyComponent<F>
impl<F: Fn() -> Arc<dyn Component> + Send + Sync> Component for LazyComponent<F>
Source§fn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start the component. Read more
Auto Trait Implementations§
impl<F> !Freeze for LazyComponent<F>
impl<F> !RefUnwindSafe for LazyComponent<F>
impl<F> !UnwindSafe for LazyComponent<F>
impl<F> Send for LazyComponent<F>where
F: Send,
impl<F> Sync for LazyComponent<F>where
F: Sync,
impl<F> Unpin for LazyComponent<F>where
F: Unpin,
impl<F> UnsafeUnpin for LazyComponent<F>where
F: UnsafeUnpin,
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