[−][src]Trait fastly::response::ResponseExt
Required methods
fn inner_to_body(self) -> Result<Response<Body>, Error>
Replace the body of a response with a Body
with the same contents.
fn inner_to_bytes(self) -> Result<Response<Vec<u8>>, Error>
Replace the body of a response with the remaining contents of its body.
Note that this will involve copying and buffering the body, and so should only be used for convenience on small response bodies.
Provided methods
fn send_downstream(self) -> Result<(), Error>
fn send_downstream_streaming(self) -> Result<StreamingBody, Error>
Implementors
impl ResponseExt for Response<()>
[src]
fn inner_to_body(self) -> Result<Response<Body>, Error>
[src]
fn inner_to_bytes(self) -> Result<Response<Vec<u8>>, Error>
[src]
impl ResponseExt for Response<Body>
[src]
fn send_downstream(self) -> Result<(), Error>
[src]
Send this response downstream to the client.
This will only begin sending bytes once the program has completed execution. If you want to
begin sending before the program is complete, use
ResponseExt::send_downstream_streaming()
.
fn send_downstream_streaming(self) -> Result<StreamingBody, Error>
[src]
Immediately begin sending this response downstream to the client, and return a
StreamingBody
that can accept further data to send.