pub struct EncodedString<'a> {
pub string: &'a str,
pub len: u16,
}
Expand description
Encoded string provides structure representing UTF-8 encoded string in MQTTv5 packets
Fields§
§string: &'a str
§len: u16
Implementations§
Source§impl EncodedString<'_>
impl EncodedString<'_>
pub fn new() -> Self
Sourcepub fn encoded_len(&self) -> u16
pub fn encoded_len(&self) -> u16
Return length of string
Trait Implementations§
Source§impl<'a> Clone for EncodedString<'a>
impl<'a> Clone for EncodedString<'a>
Source§fn clone(&self) -> EncodedString<'a>
fn clone(&self) -> EncodedString<'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 EncodedString<'a>
impl<'a> Debug for EncodedString<'a>
Source§impl<'a> Default for EncodedString<'a>
impl<'a> Default for EncodedString<'a>
Source§fn default() -> EncodedString<'a>
fn default() -> EncodedString<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for EncodedString<'a>
impl<'a> RefUnwindSafe for EncodedString<'a>
impl<'a> Send for EncodedString<'a>
impl<'a> Sync for EncodedString<'a>
impl<'a> Unpin for EncodedString<'a>
impl<'a> UnwindSafe for EncodedString<'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