Skip to main content

MiddlewareFunc

Trait MiddlewareFunc 

Source
pub trait MiddlewareFunc<T>:
    Fn(T, NextFn<T>) -> ReusableBoxFuture<Result<T, ThrusterError<T>>>
    + Send
    + Sync { }

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<A, T: Send> MiddlewareFunc<T> for A
where A: Fn(T, NextFn<T>) -> ReusableBoxFuture<Result<T, ThrusterError<T>>> + Send + Sync,