pub struct Middleware<T> { /* private fields */ }
Implementations§
Source§impl<T> Middleware<T>
impl<T> Middleware<T>
pub fn new( base_url: &'static str, method: MatchableMethod, path: MatchablePath, func: Box<dyn Fn(&mut Request<'_, T>, &mut Response, &mut NextFunction<'_>) + Send + Sync + 'static>, ) -> Middleware<T>
pub fn invoke( &self, req: &mut Request<'_, T>, res: &mut Response, next: &mut NextFunction<'_>, )
Auto Trait Implementations§
impl<T> Freeze for Middleware<T>
impl<T> !RefUnwindSafe for Middleware<T>
impl<T> Send for Middleware<T>
impl<T> Sync for Middleware<T>
impl<T> Unpin for Middleware<T>
impl<T> !UnwindSafe for Middleware<T>
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