Struct MqttBytes
#[repr(transparent)]pub struct MqttBytes([u8]);Expand description
A byte slice that satisfies the MQTT v5 Binary Data length limit (at most 65 535 bytes).
This is an unsized type like [[u8]]. Use it for borrowed
references and MqttBytesBuf for owned values.
Tuple Fields§
§0: [u8]Implementations§
Source§impl MqttBytes
impl MqttBytes
Source§impl MqttBytes
impl MqttBytes
Sourcepub fn try_to_owned(&self) -> Result<MqttBytesBuf, TryReserveError>
pub fn try_to_owned(&self) -> Result<MqttBytesBuf, TryReserveError>
Copies the data into an MqttBytesBuf without panicking if the
allocation fails.
§Errors
Returns TryReserveError if the allocation fails.
Trait Implementations§
Source§impl AsRef<MqttBytes> for MqttBytesBuf
impl AsRef<MqttBytes> for MqttBytesBuf
Source§impl Borrow<MqttBytes> for MqttBytesBuf
impl Borrow<MqttBytes> for MqttBytesBuf
impl Eq for MqttBytes
impl StructuralPartialEq for MqttBytes
Source§impl ToOwned for MqttBytes
impl ToOwned for MqttBytes
Source§type Owned = MqttBytesBuf
type Owned = MqttBytesBuf
The resulting type after obtaining ownership.
Source§fn to_owned(&self) -> <MqttBytes as ToOwned>::Owned
fn to_owned(&self) -> <MqttBytes as ToOwned>::Owned
Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · Source§fn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
Uses borrowed data to replace owned data, usually by cloning. Read more
Auto Trait Implementations§
impl !Sized for MqttBytes
impl Freeze for MqttBytes
impl RefUnwindSafe for MqttBytes
impl Send for MqttBytes
impl Sync for MqttBytes
impl Unpin for MqttBytes
impl UnsafeUnpin for MqttBytes
impl UnwindSafe for MqttBytes
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<K, Q> Equivalent<Q> for K
impl<K, Q> Equivalent<Q> for K
§fn equivalent(&self, key: &Q) -> bool
fn equivalent(&self, key: &Q) -> bool
Compare self to
key and return true if they are equal.