pub enum TopicReference<'t> {
Name(TopicName<'t>),
Alias(u16),
Mapping(TopicName<'t>, u16),
}Expand description
The options for specifying which topic to publish to. Topic aliases only last for the duration of a single network connection and not necessarily until the session end.
Topic aliases must not be 0
Variants§
Name(TopicName<'t>)
Publish to the inner topic name without creating an alias.
Alias(u16)
Publish to an already mapped topic alias. The alias must have been defined earlier in the network connection.
Mapping(TopicName<'t>, u16)
Create a new topic alias or replace an existing topic alias. The alias lasts until the end of the network connection.
Implementations§
Source§impl<'t> TopicReference<'t>
impl<'t> TopicReference<'t>
Sourcepub fn as_borrowed(&'t self) -> Self
pub fn as_borrowed(&'t self) -> Self
Delegates to crate::Bytes::as_borrowed.
Trait Implementations§
Source§impl<'t> Clone for TopicReference<'t>
impl<'t> Clone for TopicReference<'t>
Source§fn clone(&self) -> TopicReference<'t>
fn clone(&self) -> TopicReference<'t>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'t> Debug for TopicReference<'t>
impl<'t> Debug for TopicReference<'t>
Source§impl<'t> PartialEq for TopicReference<'t>
impl<'t> PartialEq for TopicReference<'t>
impl<'t> Eq for TopicReference<'t>
impl<'t> StructuralPartialEq for TopicReference<'t>
Auto Trait Implementations§
impl<'t> Freeze for TopicReference<'t>
impl<'t> RefUnwindSafe for TopicReference<'t>
impl<'t> Send for TopicReference<'t>
impl<'t> Sync for TopicReference<'t>
impl<'t> Unpin for TopicReference<'t>
impl<'t> UnsafeUnpin for TopicReference<'t>
impl<'t> UnwindSafe for TopicReference<'t>
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