pub struct SubscriptionHandle { /* private fields */ }Expand description
Subscription handle: used to cancel a subscription; automatically unsubscribes in the background on drop.
订阅句柄:用于取消订阅;drop 时会自动在后台执行 unsubscribe。
Implementations§
Source§impl SubscriptionHandle
impl SubscriptionHandle
Sourcepub async fn unsubscribe(self) -> Result<(), WaapiError>
pub async fn unsubscribe(self) -> Result<(), WaapiError>
Cancel the subscription and stop the callback loop (if any).
取消订阅并停止回调循环(若有)。
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SubscriptionHandle
impl !RefUnwindSafe for SubscriptionHandle
impl Send for SubscriptionHandle
impl Sync for SubscriptionHandle
impl Unpin for SubscriptionHandle
impl UnsafeUnpin for SubscriptionHandle
impl !UnwindSafe for SubscriptionHandle
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