pub struct SetStatusLayer { /* private fields */ }
Available on crate feature
set-status
only.Expand description
Layer that applies SetStatus
which overrides the status codes.
Implementations§
Source§impl SetStatusLayer
impl SetStatusLayer
Sourcepub fn new(status: StatusCode) -> Self
pub fn new(status: StatusCode) -> Self
Create a new SetStatusLayer
.
The response status code will be status
regardless of what the inner service returns.
Trait Implementations§
Source§impl Clone for SetStatusLayer
impl Clone for SetStatusLayer
Source§fn clone(&self) -> SetStatusLayer
fn clone(&self) -> SetStatusLayer
Returns a copy 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 Debug for SetStatusLayer
impl Debug for SetStatusLayer
Source§impl<S> Layer<S> for SetStatusLayer
impl<S> Layer<S> for SetStatusLayer
impl Copy for SetStatusLayer
Auto Trait Implementations§
impl Freeze for SetStatusLayer
impl RefUnwindSafe for SetStatusLayer
impl Send for SetStatusLayer
impl Sync for SetStatusLayer
impl Unpin for SetStatusLayer
impl UnwindSafe for SetStatusLayer
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