pub trait HostFutureIncomingResponse {
// Required methods
fn subscribe(
&mut self,
self_: Resource<FutureIncomingResponse>,
) -> Result<Resource<Pollable>>;
fn get(
&mut self,
self_: Resource<FutureIncomingResponse>,
) -> Result<Option<Result<Result<Resource<IncomingResponse>, ErrorCode>, ()>>>;
fn drop(&mut self, rep: Resource<FutureIncomingResponse>) -> Result<()>;
}
Required Methods§
sourcefn subscribe(
&mut self,
self_: Resource<FutureIncomingResponse>,
) -> Result<Resource<Pollable>>
fn subscribe( &mut self, self_: Resource<FutureIncomingResponse>, ) -> Result<Resource<Pollable>>
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<FutureIncomingResponse>,
) -> Result<Option<Result<Result<Resource<IncomingResponse>, ErrorCode>, ()>>>
fn get( &mut self, self_: Resource<FutureIncomingResponse>, ) -> Result<Option<Result<Result<Resource<IncomingResponse>, ErrorCode>, ()>>>
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<FutureIncomingResponse>) -> Result<()>
Implementations on Foreign Types§
source§impl<_T: HostFutureIncomingResponse + ?Sized + Send> HostFutureIncomingResponse for &mut _T
impl<_T: HostFutureIncomingResponse + ?Sized + Send> HostFutureIncomingResponse for &mut _T
source§fn subscribe(
&mut self,
self_: Resource<FutureIncomingResponse>,
) -> Result<Resource<Pollable>>
fn subscribe( &mut self, self_: Resource<FutureIncomingResponse>, ) -> Result<Resource<Pollable>>
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<FutureIncomingResponse>,
) -> Result<Option<Result<Result<Resource<IncomingResponse>, ErrorCode>, ()>>>
fn get( &mut self, self_: Resource<FutureIncomingResponse>, ) -> Result<Option<Result<Result<Resource<IncomingResponse>, ErrorCode>, ()>>>
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.