Trait ResponseExtBuild

Source
pub trait ResponseExtBuild<B>
where B: BodyTrait, Self: Sized + ResponseExt<B>,
{
Show 30 methods // Required method fn new_with_status_and_body( _status: StatusCode, _body: impl Into<B>, _content_type: Option<impl Into<HeaderValue>>, ) -> Self; // Provided methods fn new_empty() -> Self where B: Default { ... } fn new_with_status(_status: StatusCode) -> Self where B: Default { ... } fn new_201() -> Self where B: Default { ... } fn new_200_with_body( _body: impl Into<B>, _content_type: Option<impl Into<HeaderValue>>, ) -> Self { ... } fn new_200_with_text(_body: impl Into<B>) -> Self { ... } fn new_200_with_html(_body: impl Into<B>) -> Self { ... } fn new_200() -> Self where B: From<&'static str> { ... } fn new_301(_location: impl Into<HeaderValue>) -> Self where B: Default { ... } fn new_302(_location: impl Into<HeaderValue>) -> Self where B: Default { ... } fn new_303(_location: impl Into<HeaderValue>) -> Self where B: Default { ... } fn new_307(_location: impl Into<HeaderValue>) -> Self where B: Default { ... } fn new_308(_location: impl Into<HeaderValue>) -> Self where B: Default { ... } fn new_301_str_static(_location: &'static str) -> Self where B: Default { ... } fn new_302_str_static(_location: &'static str) -> Self where B: Default { ... } fn new_303_str_static(_location: &'static str) -> Self where B: Default { ... } fn new_307_str_static(_location: &'static str) -> Self where B: Default { ... } fn new_308_str_static(_location: &'static str) -> Self where B: Default { ... } fn new_301_string(_location: String) -> Self where B: Default { ... } fn new_302_string(_location: String) -> Self where B: Default { ... } fn new_303_string(_location: String) -> Self where B: Default { ... } fn new_307_string(_location: String) -> Self where B: Default { ... } fn new_308_string(_location: String) -> Self where B: Default { ... } fn new_redirect_with_code( _status: StatusCode, _location: impl Into<HeaderValue>, ) -> Self where B: Default { ... } fn new_404() -> Self where B: From<&'static str> { ... } fn new_method_not_allowed() -> Self where B: From<&'static str> { ... } fn ok<E>(self) -> Result<Self, E> { ... } fn ok_0(self) -> Result<Self, ServerError> { ... } fn ready<E>(self) -> Ready<Result<Self, E>> { ... } fn ready_0(self) -> Ready<Result<Self, ServerError>> { ... }
}

Required Methods§

Source

fn new_with_status_and_body( _status: StatusCode, _body: impl Into<B>, _content_type: Option<impl Into<HeaderValue>>, ) -> Self

Provided Methods§

Source

fn new_empty() -> Self
where B: Default,

Source

fn new_with_status(_status: StatusCode) -> Self
where B: Default,

Source

fn new_201() -> Self
where B: Default,

Source

fn new_200_with_body( _body: impl Into<B>, _content_type: Option<impl Into<HeaderValue>>, ) -> Self

Source

fn new_200_with_text(_body: impl Into<B>) -> Self

Source

fn new_200_with_html(_body: impl Into<B>) -> Self

Source

fn new_200() -> Self
where B: From<&'static str>,

Source

fn new_301(_location: impl Into<HeaderValue>) -> Self
where B: Default,

Source

fn new_302(_location: impl Into<HeaderValue>) -> Self
where B: Default,

Source

fn new_303(_location: impl Into<HeaderValue>) -> Self
where B: Default,

Source

fn new_307(_location: impl Into<HeaderValue>) -> Self
where B: Default,

Source

fn new_308(_location: impl Into<HeaderValue>) -> Self
where B: Default,

Source

fn new_301_str_static(_location: &'static str) -> Self
where B: Default,

Source

fn new_302_str_static(_location: &'static str) -> Self
where B: Default,

Source

fn new_303_str_static(_location: &'static str) -> Self
where B: Default,

Source

fn new_307_str_static(_location: &'static str) -> Self
where B: Default,

Source

fn new_308_str_static(_location: &'static str) -> Self
where B: Default,

Source

fn new_301_string(_location: String) -> Self
where B: Default,

Source

fn new_302_string(_location: String) -> Self
where B: Default,

Source

fn new_303_string(_location: String) -> Self
where B: Default,

Source

fn new_307_string(_location: String) -> Self
where B: Default,

Source

fn new_308_string(_location: String) -> Self
where B: Default,

Source

fn new_redirect_with_code( _status: StatusCode, _location: impl Into<HeaderValue>, ) -> Self
where B: Default,

Source

fn new_404() -> Self
where B: From<&'static str>,

Source

fn new_method_not_allowed() -> Self
where B: From<&'static str>,

Source

fn ok<E>(self) -> Result<Self, E>

Source

fn ok_0(self) -> Result<Self, ServerError>

Source

fn ready<E>(self) -> Ready<Result<Self, E>>

Source

fn ready_0(self) -> Ready<Result<Self, ServerError>>

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§