pub struct TopicAliasManager { /* private fields */ }Implementations§
Source§impl TopicAliasManager
impl TopicAliasManager
pub fn new(topic_alias_maximum: u16) -> Self
pub fn get_or_create_alias(&mut self, topic: &str) -> Option<u16>
Sourcepub fn register_alias(&mut self, alias: u16, topic: &str) -> Result<()>
pub fn register_alias(&mut self, alias: u16, topic: &str) -> Result<()>
§Errors
Returns TopicAliasInvalid if alias is 0 or exceeds the maximum.
pub fn get_topic(&self, alias: u16) -> Option<&str>
pub fn get_alias(&self, topic: &str) -> Option<u16>
pub fn clear(&mut self)
pub fn topic_alias_maximum(&self) -> u16
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TopicAliasManager
impl RefUnwindSafe for TopicAliasManager
impl Send for TopicAliasManager
impl Sync for TopicAliasManager
impl Unpin for TopicAliasManager
impl UnwindSafe for TopicAliasManager
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