Trait pandet::LocalAlert

source ·
pub trait LocalAlert<'a, T> {
    // Required methods
    fn local_alert<A>(self, hook: &A) -> LocalPanicAwareFuture<'a, T>
       where A: AsRef<DetectorHook>;
    fn local_alert_msg<Msg, A>(
        self,
        hook: &A,
        msg: Msg
    ) -> LocalPanicAwareFuture<'a, T>
       where Msg: Send + 'static,
             A: AsRef<DetectorHook<Msg>>;
}
Expand description

Used to bind a PanicDetector onto any task. Implemented for all Future types.

Required Methods§

source

fn local_alert<A>(self, hook: &A) -> LocalPanicAwareFuture<'a, T>where A: AsRef<DetectorHook>,

Consumes a task, and returns a new task with the PanicDetector bound to it.

source

fn local_alert_msg<Msg, A>( self, hook: &A, msg: Msg ) -> LocalPanicAwareFuture<'a, T>where Msg: Send + 'static, A: AsRef<DetectorHook<Msg>>,

Binds a PanicDetector and emits additional information when the panic is detected.

Implementors§

source§

impl<'a, F> LocalAlert<'a, <F as Future>::Output> for Fwhere F: Future + 'a,