pub struct TopicManager { /* private fields */ }Expand description
Manages topic lifecycle: create, open, delete.
Implementations§
Source§impl TopicManager
impl TopicManager
Sourcepub fn create(&mut self, name: &str, config: TopicConfig) -> Result<()>
pub fn create(&mut self, name: &str, config: TopicConfig) -> Result<()>
Create a new topic with the given name and configuration.
Returns an error if the topic already exists.
Sourcepub fn open_mut(&mut self, name: &str) -> Option<&mut Topic>
pub fn open_mut(&mut self, name: &str) -> Option<&mut Topic>
Open an existing topic mutably by name.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TopicManager
impl !RefUnwindSafe for TopicManager
impl !Send for TopicManager
impl !Sync for TopicManager
impl Unpin for TopicManager
impl !UnwindSafe for TopicManager
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