pub struct ThreadLocalPubSub { /* private fields */ }Implementations§
Source§impl ThreadLocalPubSub
impl ThreadLocalPubSub
pub fn new( thread_id: ThreadId, inbox: Receiver<BroadcastMsg>, registry: Arc<GlobalRegistry>, ) -> Self
pub fn subscribe( &mut self, conn_id: ConnectionId, channels: Vec<Vec<u8>>, ) -> Vec<PubSubMessage>
pub fn unsubscribe( &mut self, conn_id: ConnectionId, channels: Option<Vec<Vec<u8>>>, ) -> Vec<PubSubMessage>
pub fn psubscribe( &mut self, conn_id: ConnectionId, patterns: Vec<Vec<u8>>, ) -> Vec<PubSubMessage>
pub fn punsubscribe( &mut self, conn_id: ConnectionId, patterns: Option<Vec<Vec<u8>>>, ) -> Vec<PubSubMessage>
pub fn publish_local( &self, channel: &[u8], message: &Bytes, ) -> Vec<(ConnectionId, PubSubMessage)>
pub fn process_inbox(&mut self) -> Vec<(ConnectionId, PubSubMessage)>
pub fn connection_dropped(&mut self, conn_id: ConnectionId)
pub fn get_connection_subscription_count(&self, conn_id: ConnectionId) -> usize
pub fn is_connection_subscribed(&self, conn_id: ConnectionId) -> bool
pub fn get_all_channels(&self) -> Vec<Vec<u8>>
pub fn get_all_patterns(&self) -> Vec<Vec<u8>>
Auto Trait Implementations§
impl Freeze for ThreadLocalPubSub
impl !RefUnwindSafe for ThreadLocalPubSub
impl Send for ThreadLocalPubSub
impl Sync for ThreadLocalPubSub
impl Unpin for ThreadLocalPubSub
impl !UnwindSafe for ThreadLocalPubSub
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