pub struct Acceptor { /* private fields */ }

Implementations

Polls for incoming connections and returns them.

The method will return

  • Poll::Ready(Some(connection)) if a connection was accepted.
  • Poll::Ready(None) if the acceptor is closed.
  • Poll::Pending if no new connection was accepted yet. In this case the caller must retry polling as soon as a client establishes a connection. In order to notify the application of this condition, the method will save the core::task::Waker which is provided as part of the Context parameter, and notify it as soon as retrying the method will yield a different result.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.