pub struct Channel {
chan: Sender<NewNotification>,
subs: Mutex<Vec<SubscriptionID>>,
}
Expand description
Represents a connection channel for creating/removing subscriptions
Fields§
§chan: Sender<NewNotification>
§subs: Mutex<Vec<SubscriptionID>>
Implementations§
Source§impl Channel
impl Channel
Sourcepub async fn new_subscription(self: &Arc<Self>, method: &str) -> Subscription
pub async fn new_subscription(self: &Arc<Self>, method: &str) -> Subscription
Creates a new Subscription
Sourcepub async fn remove_subscription(&self, id: &SubscriptionID)
pub async fn remove_subscription(&self, id: &SubscriptionID)
Removes a Subscription
Auto Trait Implementations§
impl !Freeze for Channel
impl !RefUnwindSafe for Channel
impl Send for Channel
impl Sync for Channel
impl Unpin for Channel
impl UnwindSafe for Channel
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