pub trait HostIncomingResponse {
    // Required methods
    fn status(
        &mut self,
        self_: Resource<HostIncomingResponse>,
    ) -> Result<u16, Error>;
    fn headers(
        &mut self,
        self_: Resource<HostIncomingResponse>,
    ) -> Result<Resource<HostFields>, Error>;
    fn consume(
        &mut self,
        self_: Resource<HostIncomingResponse>,
    ) -> Result<Result<Resource<HostIncomingBody>, ()>, Error>;
    fn drop(&mut self, rep: Resource<HostIncomingResponse>) -> Result<(), Error>;
}

Required Methods§

source

fn status( &mut self, self_: Resource<HostIncomingResponse>, ) -> Result<u16, Error>

Returns the status code from the incoming response.

source

fn headers( &mut self, self_: Resource<HostIncomingResponse>, ) -> Result<Resource<HostFields>, Error>

Returns the headers from the incoming response.

The returned headers resource is immutable: set, append, and delete operations will fail with header-error.immutable.

This headers resource is a child: it must be dropped before the parent incoming-response is dropped.

source

fn consume( &mut self, self_: Resource<HostIncomingResponse>, ) -> Result<Result<Resource<HostIncomingBody>, ()>, Error>

Returns the incoming body. May be called at most once. Returns error if called additional times.

source

fn drop(&mut self, rep: Resource<HostIncomingResponse>) -> Result<(), Error>

Implementations on Foreign Types§

source§

impl<_T> HostIncomingResponse for &mut _T

source§

fn status( &mut self, self_: Resource<HostIncomingResponse>, ) -> Result<u16, Error>

Returns the status code from the incoming response.

source§

fn headers( &mut self, self_: Resource<HostIncomingResponse>, ) -> Result<Resource<HostFields>, Error>

Returns the headers from the incoming response.

The returned headers resource is immutable: set, append, and delete operations will fail with header-error.immutable.

This headers resource is a child: it must be dropped before the parent incoming-response is dropped.

source§

fn consume( &mut self, self_: Resource<HostIncomingResponse>, ) -> Result<Result<Resource<HostIncomingBody>, ()>, Error>

Returns the incoming body. May be called at most once. Returns error if called additional times.

source§

fn drop(&mut self, rep: Resource<HostIncomingResponse>) -> Result<(), Error>

Implementors§