pub struct SubscriptionHandleSync { /* private fields */ }Expand description
Sync subscription handle: cancels subscriptions created by WaapiClientSync::subscribe.
Calls SubscriptionHandleSync::unsubscribe or drop to cancel and wait for the bridge thread. Do not drop this handle inside a callback — it may deadlock.
同步订阅句柄。注意:不要在回调内部 drop 本句柄,否则可能死锁。
Implementations§
Source§impl SubscriptionHandleSync
impl SubscriptionHandleSync
Sourcepub fn unsubscribe(self) -> Result<(), WaapiError>
pub fn unsubscribe(self) -> Result<(), WaapiError>
Cancel the subscription and wait for the event bridge thread to finish.
取消订阅并等待事件桥接线程结束。
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SubscriptionHandleSync
impl !RefUnwindSafe for SubscriptionHandleSync
impl Send for SubscriptionHandleSync
impl Sync for SubscriptionHandleSync
impl Unpin for SubscriptionHandleSync
impl UnsafeUnpin for SubscriptionHandleSync
impl !UnwindSafe for SubscriptionHandleSync
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