pub struct JsonSerializer;Expand description
JSON serializer
Human-readable text serialization using JSON format. Useful for debugging and development environments.
Implementations§
Trait Implementations§
Source§impl CheckpointSerializer for JsonSerializer
impl CheckpointSerializer for JsonSerializer
Source§fn serialize_value(&self, value: &Value) -> Result<Vec<u8>, CheckpointError>
fn serialize_value(&self, value: &Value) -> Result<Vec<u8>, CheckpointError>
Serialize a JSON value to bytes Read more
Source§fn deserialize_value(&self, data: &[u8]) -> Result<Value, CheckpointError>
fn deserialize_value(&self, data: &[u8]) -> Result<Value, CheckpointError>
Deserialize bytes back to a JSON value Read more
Source§fn serialize<T: Serialize>(&self, value: &T) -> Result<Vec<u8>, CheckpointError>
fn serialize<T: Serialize>(&self, value: &T) -> Result<Vec<u8>, CheckpointError>
Serialize any serializable type to bytes Read more
Source§fn deserialize<T: DeserializeOwned>(
&self,
data: &[u8],
) -> Result<T, CheckpointError>
fn deserialize<T: DeserializeOwned>( &self, data: &[u8], ) -> Result<T, CheckpointError>
Deserialize bytes to any deserializable type Read more
Source§fn format(&self) -> SerializationFormat
fn format(&self) -> SerializationFormat
Get the format identifier
Source§impl Clone for JsonSerializer
impl Clone for JsonSerializer
Source§fn clone(&self) -> JsonSerializer
fn clone(&self) -> JsonSerializer
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 Debug for JsonSerializer
impl Debug for JsonSerializer
Source§impl Default for JsonSerializer
impl Default for JsonSerializer
Source§fn default() -> JsonSerializer
fn default() -> JsonSerializer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for JsonSerializer
impl RefUnwindSafe for JsonSerializer
impl Send for JsonSerializer
impl Sync for JsonSerializer
impl Unpin for JsonSerializer
impl UnsafeUnpin for JsonSerializer
impl UnwindSafe for JsonSerializer
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