Trait pandet::Alert

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

Used to bind a PanicDetector onto a Send task. Implemented for all types that are Future + Send.

Required Methods§

source

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

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

source

fn alert_msg<Msg, A>(self, hook: &A, msg: Msg) -> PanicAwareFuture<'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> Alert<'a, <F as Future>::Output> for Fwhere F: Future + Send + 'a,