Struct cameleon::payload::PayloadReceiver
source · pub struct PayloadReceiver { /* private fields */ }
Expand description
An Receiver of the Payload
which is sent from a device.
Implementations§
source§impl PayloadReceiver
impl PayloadReceiver
sourcepub async fn recv(&self) -> StreamResult<Payload>
pub async fn recv(&self) -> StreamResult<Payload>
Receives Payload
sent from the device.
sourcepub fn try_recv(&self) -> StreamResult<Payload>
pub fn try_recv(&self) -> StreamResult<Payload>
Tries to receive Payload
.
This method doesn’t wait arrival of payload
and immediately returns StreamError
if
the channel is empty.
sourcepub fn recv_blocking(&self) -> StreamResult<Payload>
pub fn recv_blocking(&self) -> StreamResult<Payload>
Receives Payload
sent from the device.
If the channel is empty, this method blocks until the device produces the payload.
Trait Implementations§
source§impl Clone for PayloadReceiver
impl Clone for PayloadReceiver
source§fn clone(&self) -> PayloadReceiver
fn clone(&self) -> PayloadReceiver
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for PayloadReceiver
impl Send for PayloadReceiver
impl Sync for PayloadReceiver
impl Unpin for PayloadReceiver
impl UnwindSafe for PayloadReceiver
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