Trait Implementations
sourceimpl IntoResponse for Response
impl IntoResponse for Response
fn into_response(self) -> Response
fn into_error(self) -> Error
sourceimpl ResponseExt for Response
impl ResponseExt for Response
fn location(location: &'static str) -> Self
sourcefn redirect<T>(url: T) -> Response where
T: AsRef<str>,
fn redirect<T>(url: T) -> Response where
T: AsRef<str>,
The response redirects to the specified URL. Read more
sourcefn redirect_with_status<T>(url: T, status: StatusCode) -> Response where
T: AsRef<str>,
fn redirect_with_status<T>(url: T, status: StatusCode) -> Response where
T: AsRef<str>,
The response redirects to the specified URL and the status code. Read more
sourcefn with<T>(t: T, c: &'static str) -> Response where
T: Into<Body>,
fn with<T>(t: T, c: &'static str) -> Response where
T: Into<Body>,
Response body with Content-Type
sourcefn json<T>(t: T) -> Result<Response, PayloadError> where
T: Serialize,
fn json<T>(t: T) -> Result<Response, PayloadError> where
T: Serialize,
Available on crate feature
json
only.Response JSON
sourcefn stream<S, O, E>(s: S) -> Response where
S: Stream<Item = Result<O, E>> + Send + 'static,
O: Into<Bytes> + 'static,
E: Error + Send + Sync + 'static,
fn stream<S, O, E>(s: S) -> Response where
S: Stream<Item = Result<O, E>> + Send + 'static,
O: Into<Bytes> + 'static,
E: Error + Send + Sync + 'static,
Response Stream