pub struct OptionPendingClient { /* private fields */ }
Expand description

An optional version of the PendingClient.

Get a OptionPendingClient with the option() method of the PendingClient, or with the Into/From traits.

Represents a pending client that could have been received already. This type is useful when you can only get a mutable reference to this (not own it).

The most notable difference is the take method only takes &mut self, instead of self, and the returns from most methods are wrapped in an option.

Implementations

Returns whether the client is finished connecting.

Takes the io::Result<Client> from the PendingClient. This will yield a value if done() returned true.

Panics

Panics if R is not the response message type.

Blocks until the client is ready.

Panics

Panics if the generic parameter R isn’t the response message type (the same R that you passed into MsgTable::build).

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Converts this type into the (usually inferred) input type.

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.

Converts the given value to a String. Read more

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.