Struct mqtt::topic_name::TopicName [−][src]
pub struct TopicName(_);
Topic name
http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718106
Methods
impl TopicName[src]
impl TopicNamepub fn new<S: Into<String>>(topic_name: S) -> Result<TopicName, TopicNameError>[src]
pub 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
pub unsafe fn new_unchecked(topic_name: String) -> TopicName[src]
pub unsafe fn new_unchecked(topic_name: String) -> TopicNameCreates a new topic name from string without validation
Methods from Deref<Target = TopicNameRef>
pub fn is_server_specific(&self) -> bool[src]
pub fn is_server_specific(&self) -> boolCheck if this topic name is only for server.
Topic names that beginning with a '$' character are reserved for servers
Trait Implementations
impl Into<TopicName> for TopicNameHeader[src]
impl Into<TopicName> for TopicNameHeaderimpl Debug for TopicName[src]
impl Debug for TopicNamefn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Eq for TopicName[src]
impl Eq for TopicNameimpl PartialEq for TopicName[src]
impl PartialEq for TopicNamefn eq(&self, other: &TopicName) -> bool[src]
fn eq(&self, other: &TopicName) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &TopicName) -> bool[src]
fn ne(&self, other: &TopicName) -> boolThis method tests for !=.
impl Clone for TopicName[src]
impl Clone for TopicNamefn clone(&self) -> TopicName[src]
fn clone(&self) -> TopicNameReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Hash for TopicName[src]
impl Hash for TopicNamefn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash<__H: Hasher>(&self, state: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl Into<String> for TopicName[src]
impl Into<String> for TopicNameimpl Deref for TopicName[src]
impl Deref for TopicNametype Target = TopicNameRef
The resulting type after dereferencing.
fn deref(&self) -> &TopicNameRef[src]
fn deref(&self) -> &TopicNameRefDereferences the value.
impl Encodable for TopicName[src]
impl Encodable for TopicNametype Err = TopicNameError
fn encode<W: Write>(&self, writer: &mut W) -> Result<(), TopicNameError>[src]
fn encode<W: Write>(&self, writer: &mut W) -> Result<(), TopicNameError>Encodes to writer
fn encoded_length(&self) -> u32[src]
fn encoded_length(&self) -> u32Length of bytes after encoded
impl Decodable for TopicName[src]
impl Decodable for TopicName