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> HostFutureIncomingResponse for &mut _T
impl<_T: HostFutureIncomingResponse + ?Sized> HostFutureIncomingResponse for &mut _T
Source§fn subscribe(
&mut self,
self_: Resource<FutureIncomingResponse>,
) -> Result<Resource<Pollable>>
Available on crate feature component-model-async only.
fn subscribe( &mut self, self_: Resource<FutureIncomingResponse>, ) -> Result<Resource<Pollable>>
component-model-async only.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>, ()>>>
Available on crate feature component-model-async only.
fn get( &mut self, self_: Resource<FutureIncomingResponse>, ) -> Result<Option<Result<Result<Resource<IncomingResponse>, ErrorCode>, ()>>>
component-model-async only.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.