pub trait HostIncomingRequest {
    // Required methods
    fn method(&mut self, self_: Resource<IncomingRequest>) -> Result<Method>;
    fn path_with_query(
        &mut self,
        self_: Resource<IncomingRequest>,
    ) -> Result<Option<String>>;
    fn scheme(
        &mut self,
        self_: Resource<IncomingRequest>,
    ) -> Result<Option<Scheme>>;
    fn authority(
        &mut self,
        self_: Resource<IncomingRequest>,
    ) -> Result<Option<String>>;
    fn headers(
        &mut self,
        self_: Resource<IncomingRequest>,
    ) -> Result<Resource<Headers>>;
    fn consume(
        &mut self,
        self_: Resource<IncomingRequest>,
    ) -> Result<Result<Resource<IncomingBody>, ()>>;
    fn drop(&mut self, rep: Resource<IncomingRequest>) -> Result<()>;
}

Required Methods§

source

fn method(&mut self, self_: Resource<IncomingRequest>) -> Result<Method>

Returns the method of the incoming request.

source

fn path_with_query( &mut self, self_: Resource<IncomingRequest>, ) -> Result<Option<String>>

Returns the path with query parameters from the request, as a string.

source

fn scheme(&mut self, self_: Resource<IncomingRequest>) -> Result<Option<Scheme>>

Returns the protocol scheme from the request.

source

fn authority( &mut self, self_: Resource<IncomingRequest>, ) -> Result<Option<String>>

Returns the authority of the Request’s target URI, if present.

source

fn headers( &mut self, self_: Resource<IncomingRequest>, ) -> Result<Resource<Headers>>

Get the headers associated with the request.

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

The headers returned are a child resource: it must be dropped before the parent incoming-request is dropped. Dropping this incoming-request before all children are dropped will trap.

source

fn consume( &mut self, self_: Resource<IncomingRequest>, ) -> Result<Result<Resource<IncomingBody>, ()>>

Gives the incoming-body associated with this request. Will only return success at most once, and subsequent calls will return error.

source

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

Implementations on Foreign Types§

source§

impl<_T: HostIncomingRequest + ?Sized + Send> HostIncomingRequest for &mut _T

source§

fn method(&mut self, self_: Resource<IncomingRequest>) -> Result<Method>

Returns the method of the incoming request.

source§

fn path_with_query( &mut self, self_: Resource<IncomingRequest>, ) -> Result<Option<String>>

Returns the path with query parameters from the request, as a string.

source§

fn scheme(&mut self, self_: Resource<IncomingRequest>) -> Result<Option<Scheme>>

Returns the protocol scheme from the request.

source§

fn authority( &mut self, self_: Resource<IncomingRequest>, ) -> Result<Option<String>>

Returns the authority of the Request’s target URI, if present.

source§

fn headers( &mut self, self_: Resource<IncomingRequest>, ) -> Result<Resource<Headers>>

Get the headers associated with the request.

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

The headers returned are a child resource: it must be dropped before the parent incoming-request is dropped. Dropping this incoming-request before all children are dropped will trap.

source§

fn consume( &mut self, self_: Resource<IncomingRequest>, ) -> Result<Result<Resource<IncomingBody>, ()>>

Gives the incoming-body associated with this request. Will only return success at most once, and subsequent calls will return error.

source§

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

Implementors§