pub struct RequestTimeoutLayer;Expand description
§Request Timeout Layer
This struct represents the Request Timeout Layer which enforces a maximum duration for incoming requests.
The layer is a combination of tower_http::timeout::TimeoutLayer and a response mapper.
Returns a 408 Request Timeout status when a request exceeds the configured duration.
Implementations§
Source§impl RequestTimeoutLayer
impl RequestTimeoutLayer
pub fn new( config: &RequestTimeoutConfig, ) -> (TimeoutLayer, ServiceBuilder<Stack<MapResponseLayer<fn(Response<Body>) -> Response<Body>>, Identity>>)
Auto Trait Implementations§
impl Freeze for RequestTimeoutLayer
impl RefUnwindSafe for RequestTimeoutLayer
impl Send for RequestTimeoutLayer
impl Sync for RequestTimeoutLayer
impl Unpin for RequestTimeoutLayer
impl UnsafeUnpin for RequestTimeoutLayer
impl UnwindSafe for RequestTimeoutLayer
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