pub struct ClientSubscriptions { /* private fields */ }Expand description
Manages subscriptions for a single client.
Implementations§
Source§impl ClientSubscriptions
impl ClientSubscriptions
Sourcepub fn subscribe(&mut self, channel: Channel) -> Result<bool, RealtimeError>
pub fn subscribe(&mut self, channel: Channel) -> Result<bool, RealtimeError>
Subscribe to a channel.
Sourcepub fn unsubscribe(&mut self, channel: &Channel) -> bool
pub fn unsubscribe(&mut self, channel: &Channel) -> bool
Unsubscribe from a channel.
Sourcepub fn is_subscribed(&self, channel: &Channel) -> bool
pub fn is_subscribed(&self, channel: &Channel) -> bool
Check if subscribed to a channel.
Sourcepub fn matches_event(&self, event_channel: &str) -> bool
pub fn matches_event(&self, event_channel: &str) -> bool
Check if any subscription matches the event channel.
Trait Implementations§
Source§impl Debug for ClientSubscriptions
impl Debug for ClientSubscriptions
Source§impl Default for ClientSubscriptions
impl Default for ClientSubscriptions
Source§fn default() -> ClientSubscriptions
fn default() -> ClientSubscriptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ClientSubscriptions
impl RefUnwindSafe for ClientSubscriptions
impl Send for ClientSubscriptions
impl Sync for ClientSubscriptions
impl Unpin for ClientSubscriptions
impl UnwindSafe for ClientSubscriptions
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