pub struct StatusLayer { /* private fields */ }Expand description
Middleware layer for status monitoring
Implementations§
Source§impl StatusLayer
impl StatusLayer
pub fn new(monitor: Arc<StatusMonitor>) -> StatusLayer
Trait Implementations§
Source§impl Clone for StatusLayer
impl Clone for StatusLayer
Source§fn clone(&self) -> StatusLayer
fn clone(&self) -> StatusLayer
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl MiddlewareLayer for StatusLayer
impl MiddlewareLayer for StatusLayer
Source§fn call(
&self,
req: Request,
next: Arc<dyn Fn(Request) -> Pin<Box<dyn Future<Output = Response<Body>> + Send>> + Sync + Send>,
) -> Pin<Box<dyn Future<Output = Response<Body>> + Send>>
fn call( &self, req: Request, next: Arc<dyn Fn(Request) -> Pin<Box<dyn Future<Output = Response<Body>> + Send>> + Sync + Send>, ) -> Pin<Box<dyn Future<Output = Response<Body>> + Send>>
Apply this middleware to a request, calling
next to continue the chainSource§fn clone_box(&self) -> Box<dyn MiddlewareLayer>
fn clone_box(&self) -> Box<dyn MiddlewareLayer>
Clone this middleware into a boxed trait object
Auto Trait Implementations§
impl Freeze for StatusLayer
impl RefUnwindSafe for StatusLayer
impl Send for StatusLayer
impl Sync for StatusLayer
impl Unpin for StatusLayer
impl UnwindSafe for StatusLayer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more