ResponseExt

Trait ResponseExt 

Source
pub trait ResponseExt<B>: Sized {
    // Required methods
    fn with_status(self, status: StatusCode) -> Self;
    fn with_body(self, body: B) -> Self;
}

Required Methods§

Source

fn with_status(self, status: StatusCode) -> Self

Source

fn with_body(self, body: B) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<B> ResponseExt<B> for Response<B>

Source§

fn with_status(self, status: StatusCode) -> Self

Source§

fn with_body(self, body: B) -> Response<B>

Implementors§