pub struct Subscription<Notif> { /* private fields */ }
Expand description
Active subscription on the client.
It will automatically unsubscribe in the Subscription::drop
so no need to explicitly call
the unsubscribe method
if it is an an subscription based on SubscriptionId
.
Implementations§
Source§impl<Notif> Subscription<Notif>
impl<Notif> Subscription<Notif>
Sourcepub fn new(
to_back: Sender<FrontToBack>,
notifs_rx: Receiver<Value>,
kind: SubscriptionKind,
) -> Subscription<Notif>
pub fn new( to_back: Sender<FrontToBack>, notifs_rx: Receiver<Value>, kind: SubscriptionKind, ) -> Subscription<Notif>
Create a new subscription.
Source§impl<Notif> Subscription<Notif>where
Notif: DeserializeOwned,
impl<Notif> Subscription<Notif>where
Notif: DeserializeOwned,
Trait Implementations§
Source§impl<Notif> Debug for Subscription<Notif>where
Notif: Debug,
impl<Notif> Debug for Subscription<Notif>where
Notif: Debug,
Auto Trait Implementations§
impl<Notif> Freeze for Subscription<Notif>
impl<Notif> !RefUnwindSafe for Subscription<Notif>
impl<Notif> Send for Subscription<Notif>where
Notif: Send,
impl<Notif> Sync for Subscription<Notif>where
Notif: Sync,
impl<Notif> Unpin for Subscription<Notif>where
Notif: Unpin,
impl<Notif> !UnwindSafe for Subscription<Notif>
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