pub struct PubSub { /* private fields */ }Implementations§
Source§impl PubSub
impl PubSub
pub fn instance() -> Arc<PubSub> ⓘ
pub fn create_publisher(&self, topic: &str) -> usize
pub fn subscribe_manual<T>( &self, topic: &str, config: TopicConfig, ) -> ManualReceiver<T>
pub fn subscribe<T, F>( &self, topic: &str, config: TopicConfig, callback: F, ) -> String
pub fn try_publish<T: Send + Sync + Clone + 'static>( &self, topic_id: usize, message: T, )
pub fn publish<T: Send + Sync + Clone + 'static>( &self, topic_id: usize, message: T, )
pub fn publish_with_timeout<T: Send + Sync + Clone + 'static>( &self, topic_id: usize, message: T, max_wait_ms: Option<u64>, )
pub fn unsubscribe(&self, subscriber_id: &str)
Auto Trait Implementations§
impl !Freeze for PubSub
impl RefUnwindSafe for PubSub
impl Send for PubSub
impl Sync for PubSub
impl Unpin for PubSub
impl UnsafeUnpin for PubSub
impl UnwindSafe for PubSub
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