Struct salvo::Response [−][src]
pub struct Response { /* fields omitted */ }
Expand description
Represents an HTTP response
Implementations
Create a request from an hyper::Request.
This constructor consumes the hyper::Request.
pub fn streaming<S, O, E>(&mut self, stream: S) where
E: Into<Box<dyn Error + Sync + Send + 'static, Global>> + 'static,
S: Stream<Item = Result<O, E>> + Send + 'static,
O: Into<Bytes> + 'static,
pub fn redirect_other<U>(&mut self, url: U) -> Result<(), InvalidHeaderValue> where
U: AsRef<str>,
Salvo executes before handler and path handler in sequence, when the response is in a committed state, subsequent handlers will not be executed, and then all after handlers will be executed.
This is a sign that the http request is completed, which can be used to process early return verification logic, such as permission verification, etc.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Response
impl !UnwindSafe for Response