Struct mqtt::topic_name::TopicName
[−]
[src]
pub struct TopicName(_);
Methods
impl TopicName
[src]
fn new<S: Into<String>>(topic_name: S) -> Result<TopicName, TopicNameError>
Creates a new topic name from string Return error if the string is not a valid topic name
unsafe fn new_unchecked(topic_name: String) -> TopicName
Creates a new topic name from string without validation
Methods from Deref<Target = TopicNameRef>
fn is_server_specific(&self) -> bool
Check if this topic name is only for server.
Topic names that beginning with a '$' character are reserved for servers
Trait Implementations
impl Debug for TopicName
[src]
impl Eq for TopicName
[src]
impl PartialEq for TopicName
[src]
fn eq(&self, __arg_0: &TopicName) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &TopicName) -> bool
This method tests for !=
.
impl Clone for TopicName
[src]
fn clone(&self) -> TopicName
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Into<String> for TopicName
[src]
impl Deref for TopicName
[src]
type Target = TopicNameRef
The resulting type after dereferencing
fn deref(&self) -> &TopicNameRef
The method called to dereference a value
impl<'a> Encodable<'a> for TopicName
[src]
type Err = TopicNameError
fn encode<W: Write>(&self, writer: &mut W) -> Result<(), TopicNameError>
Encodes to writer
fn encoded_length(&self) -> u32
Length of bytes after encoded
impl<'a> Decodable<'a> for TopicName
[src]
type Err = TopicNameError
type Cond = ()
fn decode_with<R: Read>(
reader: &mut R,
_rest: Option<()>
) -> Result<TopicName, TopicNameError>
reader: &mut R,
_rest: Option<()>
) -> Result<TopicName, TopicNameError>
Decodes object with additional data (or hints)
fn decode<R: Read>(reader: &mut R) -> Result<Self, Self::Err>
Decodes object from reader