pub struct Task<F> { /* private fields */ }Expand description
Trait Implementations§
Source§impl<F, Fut> Hook for Task<F>
impl<F, Fut> Hook for Task<F>
Source§fn name(&self) -> &'static str
fn name(&self) -> &'static str
Label used in framework logs and hook failure messages. Does not affect
execution order. Defaults to
"unnamed"; override for clearer diagnostics.
Avoid "unnamed" as an explicit override (indistinguishable from the
default) and avoid empty strings.Source§fn attach_shutdown(&mut self, shutdown: Shutdowner)
fn attach_shutdown(&mut self, shutdown: Shutdowner)
Source§fn on_start(&mut self) -> impl Future<Output = Result<()>> + Send
fn on_start(&mut self) -> impl Future<Output = Result<()>> + Send
Run while the application starts. Hooks start in registration order,
and a failure unwinds the ones that already ran.
Auto Trait Implementations§
impl<F> !RefUnwindSafe for Task<F>
impl<F> !UnwindSafe for Task<F>
impl<F> Freeze for Task<F>
impl<F> Send for Task<F>
impl<F> Sync for Task<F>
impl<F> Unpin for Task<F>
impl<F> UnsafeUnpin for Task<F>where
Option<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