Struct MqttBytesBuf
pub struct MqttBytesBuf(Box<[u8]>);Available on crate feature
alloc only.Expand description
Owned binary data that satisfies the MQTT v5 length limit.
This is the owned counterpart to MqttBytes.
Tuple Fields§
§0: Box<[u8]>Implementations§
§impl MqttBytesBuf
impl MqttBytesBuf
pub const fn as_mqtt_bytes(&self) -> &MqttBytes
pub const fn as_mqtt_bytes(&self) -> &MqttBytes
Returns a borrowed reference to the underlying MqttBytes.
Methods from Deref<Target = MqttBytes>§
pub const EMPTY: &'static Self
pub fn encoded_len(&self) -> usize
pub fn encoded_len(&self) -> usize
Returns the number of bytes needed to encode this value.
Trait Implementations§
§impl AsRef<[u8]> for MqttBytesBuf
impl AsRef<[u8]> for MqttBytesBuf
§impl AsRef<MqttBytes> for MqttBytesBuf
impl AsRef<MqttBytes> for MqttBytesBuf
§impl Borrow<MqttBytes> for MqttBytesBuf
impl Borrow<MqttBytes> for MqttBytesBuf
§impl Clone for MqttBytesBuf
impl Clone for MqttBytesBuf
§fn clone(&self) -> MqttBytesBuf
fn clone(&self) -> MqttBytesBuf
Returns a duplicate 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 more§impl Debug for MqttBytesBuf
impl Debug for MqttBytesBuf
§impl Deref for MqttBytesBuf
impl Deref for MqttBytesBuf
§impl Hash for MqttBytesBuf
impl Hash for MqttBytesBuf
§impl PartialEq for MqttBytesBuf
impl PartialEq for MqttBytesBuf
§impl TryFrom<&[u8]> for MqttBytesBuf
impl TryFrom<&[u8]> for MqttBytesBuf
§impl TryFrom<Box<[u8]>> for MqttBytesBuf
impl TryFrom<Box<[u8]>> for MqttBytesBuf
§impl TryFrom<Vec<u8>> for MqttBytesBuf
impl TryFrom<Vec<u8>> for MqttBytesBuf
impl Eq for MqttBytesBuf
impl StructuralPartialEq for MqttBytesBuf
Auto Trait Implementations§
impl Freeze for MqttBytesBuf
impl RefUnwindSafe for MqttBytesBuf
impl Send for MqttBytesBuf
impl Sync for MqttBytesBuf
impl Unpin for MqttBytesBuf
impl UnwindSafe for MqttBytesBuf
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