Struct carrier_pigeon::PendingClient
source · [−]pub struct PendingClient { /* private fields */ }
Expand description
A client that has started connecting, but might not have finished connecting.
When creating a client, a new thread is spawned for the client connection cycle. When the client is done being created, it will send it back through this pending client.
Implementations
sourceimpl PendingClient
impl PendingClient
sourcepub fn take<R: Any + Send + Sync>(self) -> Result<Result<(Client, R)>, Self>
pub fn take<R: Any + Send + Sync>(self) -> Result<Result<(Client, R)>, Self>
Takes the io::Result<Client>
from the PendingClient
.
This will yield a value if done()
returned true
.
Panics
Panics if the generic parameter R
isn’t the response message type (the same R
that you passed into MsgTable::build
).
sourcepub fn block<R: Any + Send + Sync>(self) -> Result<(Client, R)>
pub fn block<R: Any + Send + Sync>(self) -> Result<(Client, R)>
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
).
sourcepub fn option(self) -> OptionPendingClient
pub fn option(self) -> OptionPendingClient
Converts this into a OptionPendingClient
.
Trait Implementations
sourceimpl Debug for PendingClient
impl Debug for PendingClient
sourceimpl Display for PendingClient
impl Display for PendingClient
sourceimpl Into<OptionPendingClient> for PendingClient
impl Into<OptionPendingClient> for PendingClient
sourcefn into(self) -> OptionPendingClient
fn into(self) -> OptionPendingClient
Converts this type into the (usually inferred) input type.
Auto Trait Implementations
impl RefUnwindSafe for PendingClient
impl Send for PendingClient
impl Sync for PendingClient
impl Unpin for PendingClient
impl UnwindSafe for PendingClient
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more