hyper::proto::h2::client

Type Alias ConnEof

Source
type ConnEof = Receiver<Infallible>;

Aliased Type§

struct ConnEof { /* private fields */ }

Implementations

Source§

impl<T> Receiver<T>

Source

pub fn close(&mut self)

Gracefully close this receiver, preventing any subsequent attempts to send to it.

Any send operation which happens after this method returns is guaranteed to fail. After calling this method, you can use Receiver::poll to determine whether a message had previously been sent.

Source

pub fn try_recv(&mut self) -> Result<Option<T>, Canceled>

Attempts to receive a message outside of the context of a task.

Does not schedule a task wakeup or have any other side effects.

A return value of None must be considered immediately stale (out of date) unless close has been called first.

Returns an error if the sender was dropped.

Trait Implementations

Source§

impl<T> Debug for Receiver<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<T> Drop for Receiver<T>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<T> FusedFuture for Receiver<T>

Source§

fn is_terminated(&self) -> bool

Returns true if the underlying future should no longer be polled.
Source§

impl<T> Future for Receiver<T>

Source§

type Output = Result<T, Canceled>

The type of value produced on completion.
Source§

fn poll( self: Pin<&mut Receiver<T>>, cx: &mut Context<'_>, ) -> Poll<Result<T, Canceled>>

Attempts to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more
Source§

impl<T> Unpin for Receiver<T>