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 more