pub struct StartContext<'a> {
pub name: &'static str,
pub shutdown: ShutdownToken,
pub tasks: &'a TaskRegistry,
}Expand description
Context passed to pre_start / on_start.
Fields§
§name: &'static strService name (equal to N::NAME).
shutdown: ShutdownTokenShutdown token. Capture .clone() into background tasks.
tasks: &'a TaskRegistryTask registry. Spawn background loops here so they join cleanly.
Auto Trait Implementations§
impl<'a> Freeze for StartContext<'a>
impl<'a> !RefUnwindSafe for StartContext<'a>
impl<'a> Send for StartContext<'a>
impl<'a> Sync for StartContext<'a>
impl<'a> Unpin for StartContext<'a>
impl<'a> UnsafeUnpin for StartContext<'a>
impl<'a> !UnwindSafe for StartContext<'a>
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