[][src]Trait fastly::response::ResponseExt

pub trait ResponseExt {
    fn send_downstream(self) -> Result<(), Error>;
fn inner_to_body(self) -> Result<Response<Body>, Error>;
fn inner_to_bytes(self) -> Result<Response<Vec<u8>>, Error>; }

Required methods

fn send_downstream(self) -> Result<(), Error>

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.

Loading content...

Implementors

Loading content...