pub enum PayloadCodec {
Json,
Cbor,
Raw,
}Expand description
How an MQTT payload encodes a crate::Value.
Variants§
Json
JSON object {"value": ...} — default for cloud bridges.
Cbor
CBOR-encoded value — compact for cellular links.
Raw
Raw bytes / utf-8 string — payload IS the value.
Trait Implementations§
Source§impl Clone for PayloadCodec
impl Clone for PayloadCodec
Source§fn clone(&self) -> PayloadCodec
fn clone(&self) -> PayloadCodec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PayloadCodec
Source§impl Debug for PayloadCodec
impl Debug for PayloadCodec
Source§impl Default for PayloadCodec
impl Default for PayloadCodec
Source§fn default() -> PayloadCodec
fn default() -> PayloadCodec
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PayloadCodec
impl<'de> Deserialize<'de> for PayloadCodec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PayloadCodec
Source§impl Hash for PayloadCodec
impl Hash for PayloadCodec
Source§impl PartialEq for PayloadCodec
impl PartialEq for PayloadCodec
Source§impl Serialize for PayloadCodec
impl Serialize for PayloadCodec
impl StructuralPartialEq for PayloadCodec
Auto Trait Implementations§
impl Freeze for PayloadCodec
impl RefUnwindSafe for PayloadCodec
impl Send for PayloadCodec
impl Sync for PayloadCodec
impl Unpin for PayloadCodec
impl UnsafeUnpin for PayloadCodec
impl UnwindSafe for PayloadCodec
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