pub trait ResponseExtBuild<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§
fn new_with_status_and_body( _status: StatusCode, _body: impl Into<B>, _content_type: Option<impl Into<HeaderValue>>, ) -> Self
Provided Methods§
fn new_empty() -> Selfwhere
B: Default,
fn new_with_status(_status: StatusCode) -> Selfwhere
B: Default,
fn new_201() -> Selfwhere
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
fn new_301(_location: impl Into<HeaderValue>) -> Selfwhere
B: Default,
fn new_302(_location: impl Into<HeaderValue>) -> Selfwhere
B: Default,
fn new_303(_location: impl Into<HeaderValue>) -> Selfwhere
B: Default,
fn new_307(_location: impl Into<HeaderValue>) -> Selfwhere
B: Default,
fn new_308(_location: impl Into<HeaderValue>) -> Selfwhere
B: Default,
fn new_301_str_static(_location: &'static str) -> Selfwhere
B: Default,
fn new_302_str_static(_location: &'static str) -> Selfwhere
B: Default,
fn new_303_str_static(_location: &'static str) -> Selfwhere
B: Default,
fn new_307_str_static(_location: &'static str) -> Selfwhere
B: Default,
fn new_308_str_static(_location: &'static str) -> Selfwhere
B: Default,
fn new_301_string(_location: String) -> Selfwhere
B: Default,
fn new_302_string(_location: String) -> Selfwhere
B: Default,
fn new_303_string(_location: String) -> Selfwhere
B: Default,
fn new_307_string(_location: String) -> Selfwhere
B: Default,
fn new_308_string(_location: String) -> Selfwhere
B: Default,
fn new_redirect_with_code(
_status: StatusCode,
_location: impl Into<HeaderValue>,
) -> Selfwhere
B: Default,
fn new_404() -> Self
fn new_method_not_allowed() -> Self
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>>
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.