pub struct BackgroundTaskRuntimeDefinitionsComponentFromShutdown<Kind: 'static, PresentationCode: 'static, F> { /* private fields */ }Expand description
Runtime builder component that spawns background tasks and registers task definitions.
Implementations§
Source§impl<Kind: 'static, PresentationCode: 'static, F> BackgroundTaskRuntimeDefinitionsComponentFromShutdown<Kind, PresentationCode, F>
impl<Kind: 'static, PresentationCode: 'static, F> BackgroundTaskRuntimeDefinitionsComponentFromShutdown<Kind, PresentationCode, F>
Sourcepub const fn new(
definitions: &'static [RuntimeTaskDefinition<Kind, PresentationCode>],
spawn: F,
) -> Self
pub const fn new( definitions: &'static [RuntimeTaskDefinition<Kind, PresentationCode>], spawn: F, ) -> Self
Creates a component from static task definitions and a worker-spawning function.
Trait Implementations§
Source§impl<S, Kind, PresentationCode, F> AsterRuntimeComponent<S> for BackgroundTaskRuntimeDefinitionsComponentFromShutdown<Kind, PresentationCode, F>where
Kind: Sync + 'static,
PresentationCode: Sync + 'static,
F: FnOnce(CancellationToken) -> BackgroundTasks,
impl<S, Kind, PresentationCode, F> AsterRuntimeComponent<S> for BackgroundTaskRuntimeDefinitionsComponentFromShutdown<Kind, PresentationCode, F>where
Kind: Sync + 'static,
PresentationCode: Sync + 'static,
F: FnOnce(CancellationToken) -> BackgroundTasks,
Auto Trait Implementations§
impl<Kind, PresentationCode, F> Freeze for BackgroundTaskRuntimeDefinitionsComponentFromShutdown<Kind, PresentationCode, F>where
F: Freeze,
impl<Kind, PresentationCode, F> RefUnwindSafe for BackgroundTaskRuntimeDefinitionsComponentFromShutdown<Kind, PresentationCode, F>
impl<Kind, PresentationCode, F> Send for BackgroundTaskRuntimeDefinitionsComponentFromShutdown<Kind, PresentationCode, F>
impl<Kind, PresentationCode, F> Sync for BackgroundTaskRuntimeDefinitionsComponentFromShutdown<Kind, PresentationCode, F>
impl<Kind, PresentationCode, F> Unpin for BackgroundTaskRuntimeDefinitionsComponentFromShutdown<Kind, PresentationCode, F>where
F: Unpin,
impl<Kind, PresentationCode, F> UnsafeUnpin for BackgroundTaskRuntimeDefinitionsComponentFromShutdown<Kind, PresentationCode, F>where
F: UnsafeUnpin,
impl<Kind, PresentationCode, F> UnwindSafe for BackgroundTaskRuntimeDefinitionsComponentFromShutdown<Kind, PresentationCode, 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