pub struct ServerTimingLayer<'a> { /* private fields */ }Expand description
A middleware that will add a Server-Timing header to the response.
Implementations§
Source§impl<'a> ServerTimingLayer<'a>
impl<'a> ServerTimingLayer<'a>
Sourcepub const fn new(app: &'a str) -> Self
pub const fn new(app: &'a str) -> Self
Creates a new ServerTimingLayer with the given service name.
Sourcepub const fn new_default() -> Self
pub const fn new_default() -> Self
Creates a new ServerTimingLayer with default service name (runtime).
Sourcepub const fn with_description(self, description: &'a str) -> Self
pub const fn with_description(self, description: &'a str) -> Self
Adds a description to the service name.
Trait Implementations§
Source§impl<'a> Clone for ServerTimingLayer<'a>
impl<'a> Clone for ServerTimingLayer<'a>
Source§fn clone(&self) -> ServerTimingLayer<'a>
fn clone(&self) -> ServerTimingLayer<'a>
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<'a> Debug for ServerTimingLayer<'a>
impl<'a> Debug for ServerTimingLayer<'a>
Source§impl<'a, S> Layer<S> for ServerTimingLayer<'a>
impl<'a, S> Layer<S> for ServerTimingLayer<'a>
impl<'a> Copy for ServerTimingLayer<'a>
Auto Trait Implementations§
impl<'a> Freeze for ServerTimingLayer<'a>
impl<'a> RefUnwindSafe for ServerTimingLayer<'a>
impl<'a> Send for ServerTimingLayer<'a>
impl<'a> Sync for ServerTimingLayer<'a>
impl<'a> Unpin for ServerTimingLayer<'a>
impl<'a> UnsafeUnpin for ServerTimingLayer<'a>
impl<'a> UnwindSafe for ServerTimingLayer<'a>
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