pub trait HostFutureIncomingResponse {
// Required methods
fn subscribe(
&mut self,
self_: Resource<HostFutureIncomingResponse>,
) -> Result<Resource<Pollable>, Error>;
fn get(
&mut self,
self_: Resource<HostFutureIncomingResponse>,
) -> Result<Option<Result<Result<Resource<HostIncomingResponse>, ErrorCode>, ()>>, Error>;
fn drop(
&mut self,
rep: Resource<HostFutureIncomingResponse>,
) -> Result<(), Error>;
}
Required Methods§
sourcefn subscribe(
&mut self,
self_: Resource<HostFutureIncomingResponse>,
) -> Result<Resource<Pollable>, Error>
fn subscribe( &mut self, self_: Resource<HostFutureIncomingResponse>, ) -> Result<Resource<Pollable>, Error>
Returns a pollable which becomes ready when either the Response has
been received, or an error has occurred. When this pollable is ready,
the get
method will return some
.
sourcefn get(
&mut self,
self_: Resource<HostFutureIncomingResponse>,
) -> Result<Option<Result<Result<Resource<HostIncomingResponse>, ErrorCode>, ()>>, Error>
fn get( &mut self, self_: Resource<HostFutureIncomingResponse>, ) -> Result<Option<Result<Result<Resource<HostIncomingResponse>, ErrorCode>, ()>>, Error>
Returns the incoming HTTP Response, or an error, once one is ready.
The outer option
represents future readiness. Users can wait on this
option
to become some
using the subscribe
method.
The outer result
is used to retrieve the response or error at most
once. It will be success on the first call in which the outer option
is some
, and error on subsequent calls.
The inner result
represents that either the incoming HTTP Response
status and headers have received successfully, or that an error
occurred. Errors may also occur while consuming the response body,
but those will be reported by the incoming-body
and its
output-stream
child.
fn drop( &mut self, rep: Resource<HostFutureIncomingResponse>, ) -> Result<(), Error>
Implementations on Foreign Types§
source§impl<_T> HostFutureIncomingResponse for &mut _T
impl<_T> HostFutureIncomingResponse for &mut _T
source§fn subscribe(
&mut self,
self_: Resource<HostFutureIncomingResponse>,
) -> Result<Resource<Pollable>, Error>
fn subscribe( &mut self, self_: Resource<HostFutureIncomingResponse>, ) -> Result<Resource<Pollable>, Error>
Returns a pollable which becomes ready when either the Response has
been received, or an error has occurred. When this pollable is ready,
the get
method will return some
.
source§fn get(
&mut self,
self_: Resource<HostFutureIncomingResponse>,
) -> Result<Option<Result<Result<Resource<HostIncomingResponse>, ErrorCode>, ()>>, Error>
fn get( &mut self, self_: Resource<HostFutureIncomingResponse>, ) -> Result<Option<Result<Result<Resource<HostIncomingResponse>, ErrorCode>, ()>>, Error>
Returns the incoming HTTP Response, or an error, once one is ready.
The outer option
represents future readiness. Users can wait on this
option
to become some
using the subscribe
method.
The outer result
is used to retrieve the response or error at most
once. It will be success on the first call in which the outer option
is some
, and error on subsequent calls.
The inner result
represents that either the incoming HTTP Response
status and headers have received successfully, or that an error
occurred. Errors may also occur while consuming the response body,
but those will be reported by the incoming-body
and its
output-stream
child.