pub struct TopicChannel { /* private fields */ }Expand description
Topic-based channel
Implementations§
Source§impl TopicChannel
impl TopicChannel
Sourcepub fn new(topic: String, config: ChannelConfig) -> Self
pub fn new(topic: String, config: ChannelConfig) -> Self
Create a new topic channel
Sourcepub async fn stats(&self) -> ChannelStats
pub async fn stats(&self) -> ChannelStats
Get statistics
Trait Implementations§
Source§impl Channel for TopicChannel
impl Channel for TopicChannel
Source§async fn unsubscribe(&self, subscriber: &ConnectionId) -> Result<()>
async fn unsubscribe(&self, subscriber: &ConnectionId) -> Result<()>
Unsubscribe from the channel
Source§async fn subscriber_count(&self) -> usize
async fn subscriber_count(&self) -> usize
Get subscriber count
Auto Trait Implementations§
impl Freeze for TopicChannel
impl !RefUnwindSafe for TopicChannel
impl Send for TopicChannel
impl Sync for TopicChannel
impl Unpin for TopicChannel
impl UnsafeUnpin for TopicChannel
impl !UnwindSafe for TopicChannel
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