Struct rust_mqtt::utils::types::StringPair
source · 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> 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