pub struct Chain { /* private fields */ }Expand description
Chain builder for middlewares.
Implementations§
Source§impl Chain
impl Chain
Sourcepub fn append(self, mw: Middleware) -> Self
pub fn append(self, mw: Middleware) -> Self
Append middleware to chain. Append a middleware.
Sourcepub fn append_mut(&mut self, mw: Middleware)
pub fn append_mut(&mut self, mw: Middleware)
Append middleware mutably. Append by mutable reference.
Sourcepub fn then(self, handler: HandlerFunc) -> HandlerFunc
pub fn then(self, handler: HandlerFunc) -> HandlerFunc
Wrap handler with chain middlewares.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Chain
impl !RefUnwindSafe for Chain
impl Send for Chain
impl Sync for Chain
impl Unpin for Chain
impl !UnwindSafe for Chain
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