pub struct StringPair<'a> {
pub name: EncodedString<'a>,
pub value: EncodedString<'a>,
}
Expand description
String pair struct represents String pair
in MQTTv5 (2 UTF-8 encoded strings name-value)
Fields§
§name: EncodedString<'a>
§value: EncodedString<'a>
Implementations§
Source§impl StringPair<'_>
impl StringPair<'_>
pub fn new() -> Self
Sourcepub fn encoded_len(&self) -> u16
pub fn encoded_len(&self) -> u16
Returns length which is equal to sum of the lenghts of UTF-8 encoded strings in pair
Trait Implementations§
Source§impl<'a> Clone for StringPair<'a>
impl<'a> Clone for StringPair<'a>
Source§fn clone(&self) -> StringPair<'a>
fn clone(&self) -> StringPair<'a>
Returns a copy 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<'a> Debug for StringPair<'a>
impl<'a> Debug for StringPair<'a>
Source§impl<'a> Default for StringPair<'a>
impl<'a> Default for StringPair<'a>
Source§fn default() -> StringPair<'a>
fn default() -> StringPair<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for StringPair<'a>
impl<'a> RefUnwindSafe for StringPair<'a>
impl<'a> Send for StringPair<'a>
impl<'a> Sync for StringPair<'a>
impl<'a> Unpin for StringPair<'a>
impl<'a> UnwindSafe for StringPair<'a>
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