pub struct DeviceUpdateObservation(/* private fields */);
Expand description
A struct to manage receiving notifications for a device
Implementations§
Source§impl DeviceUpdateObservation
impl DeviceUpdateObservation
Sourcepub async fn recv_notification(&mut self) -> Option<(Device, Option<AckToken>)>
pub async fn recv_notification(&mut self) -> Option<(Device, Option<AckToken>)>
Receives an updated Device
or None
if there will be no more notifications when the unobservation is complete.
If there are notifications:
- Returns Some(
Device
,Option<AckToken>
) on success
A received notification can be acknowledged via the AckToken
by calling AckToken::ack
or dropping the AckToken
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DeviceUpdateObservation
impl RefUnwindSafe for DeviceUpdateObservation
impl Send for DeviceUpdateObservation
impl Sync for DeviceUpdateObservation
impl Unpin for DeviceUpdateObservation
impl UnwindSafe for DeviceUpdateObservation
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