pub struct Subscription {
pub id: SubscriptionID,
parent: Weak<Channel>,
chan: Sender<NewNotification>,
method: String,
}
Expand description
Represents a new subscription
Fields§
§id: SubscriptionID
§parent: Weak<Channel>
§chan: Sender<NewNotification>
§method: String
Implementations§
Source§impl Subscription
impl Subscription
Sourcefn new(
parent: Weak<Channel>,
id: SubscriptionID,
chan: Sender<NewNotification>,
method: &str,
) -> Self
fn new( parent: Weak<Channel>, id: SubscriptionID, chan: Sender<NewNotification>, method: &str, ) -> Self
Creates a new Subscription
Sourceasync fn still_subscribed(&self) -> bool
async fn still_subscribed(&self) -> bool
Checks from the partent if this subscription is still subscribed
Trait Implementations§
Source§impl Clone for Subscription
impl Clone for Subscription
Source§fn clone(&self) -> Subscription
fn clone(&self) -> Subscription
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for Subscription
impl !RefUnwindSafe for Subscription
impl Send for Subscription
impl Sync for Subscription
impl Unpin for Subscription
impl !UnwindSafe for Subscription
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