Struct tower_http::set_status::SetStatusLayer
source · 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 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