pub struct NoticeFuture(/* private fields */);
Expand description
A token through which the user is notified of the publish/subscribe/unsubscribe packet being acked by the broker.
Implementations§
Source§impl NoticeFuture
impl NoticeFuture
Sourcepub fn wait(self) -> Result<(), NoticeError>
pub fn wait(self) -> Result<(), NoticeError>
Wait for broker to acknowledge by blocking the current thread
§Panics
Panics if called in an async context
Sourcepub async fn wait_async(self) -> Result<(), NoticeError>
pub async fn wait_async(self) -> Result<(), NoticeError>
Await the packet acknowledgement from broker, without blocking the current thread
Sourcepub fn try_wait(&mut self) -> Option<Result<(), NoticeError>>
pub fn try_wait(&mut self) -> Option<Result<(), NoticeError>>
Attempts to check if the broker acknowledged the packet, without blocking the current thread or consuming the notice.
It will return None
if the packet wasn’t acknowledged.
Multiple calls to this functions can fail with NoticeError::Recv
if the notice was
already waited and the packet was already acknowledged and Some
value was returned.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NoticeFuture
impl !RefUnwindSafe for NoticeFuture
impl Send for NoticeFuture
impl Sync for NoticeFuture
impl Unpin for NoticeFuture
impl !UnwindSafe for NoticeFuture
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