Skip to main content

Middleware

Trait Middleware 

Source
pub trait Middleware:
    Send
    + Sync
    + 'static {
    // Required method
    fn enter<'a>(&'a self, call: &'a mut Invocation) -> Enter<'a>;

    // Provided method
    fn observe(&self, _call: &Invocation, _observation: Observation) { ... }
}

Required Methods§

Source

fn enter<'a>(&'a self, call: &'a mut Invocation) -> Enter<'a>

Provided Methods§

Source

fn observe(&self, _call: &Invocation, _observation: Observation)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§