pub struct RonSerializer;Expand description
RON (Rusty Object Notation) serializer using ron crate.
Requires types to implement serde::Serialize and serde::de::DeserializeOwned.
Human-readable format ideal for configuration files and debugging.
Available when the ron feature is enabled.
Implementations§
Source§impl RonSerializer
impl RonSerializer
Sourcepub fn new() -> RonSerializer
pub fn new() -> RonSerializer
Creates a new RON serializer.
Trait Implementations§
Source§impl Clone for RonSerializer
impl Clone for RonSerializer
Source§fn clone(&self) -> RonSerializer
fn clone(&self) -> RonSerializer
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 moreSource§impl Default for RonSerializer
impl Default for RonSerializer
Source§fn default() -> RonSerializer
fn default() -> RonSerializer
Returns the “default value” for a type. Read more
Source§impl<T> MessageSerializer<T> for RonSerializerwhere
T: Serialize + DeserializeOwned + 'static,
Available on crate feature ron only.
impl<T> MessageSerializer<T> for RonSerializerwhere
T: Serialize + DeserializeOwned + 'static,
Available on crate feature
ron only.Source§fn serialize(
&self,
data: &T,
) -> Result<Vec<u8>, <RonSerializer as MessageSerializer<T>>::SerializeError>
fn serialize( &self, data: &T, ) -> Result<Vec<u8>, <RonSerializer as MessageSerializer<T>>::SerializeError>
Convert data to bytes for MQTT transmission
Source§fn deserialize(
&self,
bytes: &[u8],
) -> Result<T, <RonSerializer as MessageSerializer<T>>::DeserializeError>
fn deserialize( &self, bytes: &[u8], ) -> Result<T, <RonSerializer as MessageSerializer<T>>::DeserializeError>
Convert bytes from MQTT into typed data
Auto Trait Implementations§
impl Freeze for RonSerializer
impl RefUnwindSafe for RonSerializer
impl Send for RonSerializer
impl Sync for RonSerializer
impl Unpin for RonSerializer
impl UnsafeUnpin for RonSerializer
impl UnwindSafe for RonSerializer
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