pub trait HostFutureTrailers {
    // Required methods
    fn subscribe(
        &mut self,
        self_: Resource<HostFutureTrailers>,
    ) -> Result<Resource<Pollable>, Error>;
    fn get(
        &mut self,
        self_: Resource<HostFutureTrailers>,
    ) -> Result<Option<Result<Result<Option<Resource<HostFields>>, ErrorCode>, ()>>, Error>;
    fn drop(&mut self, rep: Resource<HostFutureTrailers>) -> Result<(), Error>;
}

Required Methods§

source

fn subscribe( &mut self, self_: Resource<HostFutureTrailers>, ) -> Result<Resource<Pollable>, Error>

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<HostFutureTrailers>, ) -> Result<Option<Result<Result<Option<Resource<HostFields>>, ErrorCode>, ()>>, Error>

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.

source

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

Implementations on Foreign Types§

source§

impl<_T> HostFutureTrailers for &mut _T
where _T: HostFutureTrailers + Send + ?Sized,

source§

fn subscribe( &mut self, self_: Resource<HostFutureTrailers>, ) -> Result<Resource<Pollable>, Error>

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<HostFutureTrailers>, ) -> Result<Option<Result<Result<Option<Resource<HostFields>>, ErrorCode>, ()>>, Error>

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.

source§

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

Implementors§