pub struct AssetUpdateObservation(/* private fields */);
Expand description
A struct to manage receiving notifications for a asset
Implementations§
Source§impl AssetUpdateObservation
impl AssetUpdateObservation
Sourcepub async fn recv_notification(&mut self) -> Option<(Asset, Option<AckToken>)>
pub async fn recv_notification(&mut self) -> Option<(Asset, Option<AckToken>)>
Receives an updated Asset
or None
if there will be no more notifications when the unobservation is complete.
If there are notifications:
- Returns Some(
Asset
,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 AssetUpdateObservation
impl RefUnwindSafe for AssetUpdateObservation
impl Send for AssetUpdateObservation
impl Sync for AssetUpdateObservation
impl Unpin for AssetUpdateObservation
impl UnwindSafe for AssetUpdateObservation
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