pub struct PingReceiver(/* private fields */);Expand description
Structure used for receiving ping echo reply messages.
Implementations§
Source§impl PingReceiver
impl PingReceiver
Sourcepub fn receive(
&mut self,
token: PingSentToken,
) -> Result<PingReceive, Box<dyn Error + Send + Sync + 'static>>
pub fn receive( &mut self, token: PingSentToken, ) -> Result<PingReceive, Box<dyn Error + Send + Sync + 'static>>
Blocks and waits for an echo reply message.
Returns the data from the received echo reply message in PingReceive::Data or a
PingReceive::Timeout representing a timeout.
§Arguments
token- APingSentTokenobtained from a previous call toPingSender::send_to.
Auto Trait Implementations§
impl Freeze for PingReceiver
impl RefUnwindSafe for PingReceiver
impl Send for PingReceiver
impl !Sync for PingReceiver
impl Unpin for PingReceiver
impl UnwindSafe for PingReceiver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more