Skip to main content

ResponseExt

Trait ResponseExt 

Source
pub trait ResponseExt {
    // Required methods
    fn status(self, code: u16) -> Self;
    fn header(self, name: impl Into<String>, value: impl Into<String>) -> Self;
}
Expand description

Extension trait for Response to enable method chaining on macros

Required Methods§

Source

fn status(self, code: u16) -> Self

Source

fn header(self, name: impl Into<String>, value: impl Into<String>) -> 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.

Implementors§