Skip to main content

OnFutureDrop

Trait OnFutureDrop 

Source
pub trait OnFutureDrop<ReqB> {
    type Callback: OnDropCallback;

    // Required method
    fn make(&mut self, request: &Request<ReqB>) -> Self::Callback;
}
Available on crate feature on-early-drop only.
Expand description

Hook fired when the response future is dropped before producing a result.

See the module docs for the example.

Required Associated Types§

Source

type Callback: OnDropCallback

The callback produced for each request.

Required Methods§

Source

fn make(&mut self, request: &Request<ReqB>) -> Self::Callback

Produce a callback for the given request.

Implementations on Foreign Types§

Source§

impl<ReqB> OnFutureDrop<ReqB> for ()

Source§

type Callback = NoopDropCallback

Source§

fn make(&mut self, _request: &Request<ReqB>) -> Self::Callback

Implementors§

Source§

impl<F, C, ReqB> OnFutureDrop<ReqB> for F
where F: FnMut(&Request<ReqB>) -> C, C: OnDropCallback,

Source§

impl<F, ReqB> OnFutureDrop<ReqB> for EarlyDropsAsFailures<F>
where F: OnFailure<DroppedFailure> + Clone + Send + 'static,

Available on crate feature trace only.