Skip to main content

HttpStatus

Trait HttpStatus 

Source
pub trait HttpStatus {
    // Required method
    fn status(&self) -> StatusCode;
}
Expand description

This trait allows the middleware to extract HTTP status codes from different response types in the Tower ecosystem.

Required Methods§

Source

fn status(&self) -> StatusCode

Returns the HTTP status code for this response

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§