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§

source

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.

source

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.

source

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

Implementations on Foreign Types§

source§

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

source§

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.

source§

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.

source§

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

Implementors§