pub enum EitherMiddleware {
Sync(Box<dyn Fn(&Request, &mut MiddlewareData) + Send + Sync>),
Async(Box<dyn for<'a> Fn(&'a Request, &'a mut MiddlewareData) -> BoxFuture<'a, ()> + Send + Sync>),
}
Variants§
Sync(Box<dyn Fn(&Request, &mut MiddlewareData) + Send + Sync>)
Async(Box<dyn for<'a> Fn(&'a Request, &'a mut MiddlewareData) -> BoxFuture<'a, ()> + Send + Sync>)
Auto Trait Implementations§
impl Freeze for EitherMiddleware
impl !RefUnwindSafe for EitherMiddleware
impl Send for EitherMiddleware
impl Sync for EitherMiddleware
impl Unpin for EitherMiddleware
impl !UnwindSafe for EitherMiddleware
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more