pub trait HostFutureTrailers {
// Required methods
fn subscribe(
&mut self,
self_: Resource<FutureTrailers>,
) -> Result<Resource<Pollable>>;
fn get(
&mut self,
self_: Resource<FutureTrailers>,
) -> Result<Option<Result<Result<Option<Resource<Trailers>>, ErrorCode>, ()>>>;
fn drop(&mut self, rep: Resource<FutureTrailers>) -> Result<()>;
}Required Methods§
Sourcefn subscribe(
&mut self,
self_: Resource<FutureTrailers>,
) -> Result<Resource<Pollable>>
fn subscribe( &mut self, self_: Resource<FutureTrailers>, ) -> Result<Resource<Pollable>>
Returns a pollable which becomes ready when either the trailers have
been received, or an error has occurred. When this pollable is ready,
the get method will return some.
Sourcefn get(
&mut self,
self_: Resource<FutureTrailers>,
) -> Result<Option<Result<Result<Option<Resource<Trailers>>, ErrorCode>, ()>>>
fn get( &mut self, self_: Resource<FutureTrailers>, ) -> Result<Option<Result<Result<Option<Resource<Trailers>>, ErrorCode>, ()>>>
Returns the contents of the trailers, or an error which occurred, once the future 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 trailers 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 HTTP Request or Response
body, as well as any trailers, were received successfully, or that an
error occurred receiving them. The optional trailers indicates whether
or not trailers were present in the body.
When some trailers are returned by this method, the trailers
resource is immutable, and a child. Use of the set, append, or
delete methods will return an error, and the resource must be
dropped before the parent future-trailers is dropped.
fn drop(&mut self, rep: Resource<FutureTrailers>) -> Result<()>
Implementations on Foreign Types§
Source§impl<_T: HostFutureTrailers + ?Sized> HostFutureTrailers for &mut _T
impl<_T: HostFutureTrailers + ?Sized> HostFutureTrailers for &mut _T
Source§fn subscribe(
&mut self,
self_: Resource<FutureTrailers>,
) -> Result<Resource<Pollable>>
Available on crate feature component-model-async only.
fn subscribe( &mut self, self_: Resource<FutureTrailers>, ) -> Result<Resource<Pollable>>
component-model-async only.Returns a pollable which becomes ready when either the trailers have
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<FutureTrailers>,
) -> Result<Option<Result<Result<Option<Resource<Trailers>>, ErrorCode>, ()>>>
Available on crate feature component-model-async only.
fn get( &mut self, self_: Resource<FutureTrailers>, ) -> Result<Option<Result<Result<Option<Resource<Trailers>>, ErrorCode>, ()>>>
component-model-async only.Returns the contents of the trailers, or an error which occurred, once the future 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 trailers 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 HTTP Request or Response
body, as well as any trailers, were received successfully, or that an
error occurred receiving them. The optional trailers indicates whether
or not trailers were present in the body.
When some trailers are returned by this method, the trailers
resource is immutable, and a child. Use of the set, append, or
delete methods will return an error, and the resource must be
dropped before the parent future-trailers is dropped.