pub struct JsonSerializer {}
Expand description
Implementation of Serializer
for the Json format.
This implements the Serializer
trait for every data that also implements serde Serialize and Deserialize.
Implementations§
Trait Implementations§
Source§impl<T> Serializer<T> for JsonSerializer
impl<T> Serializer<T> for JsonSerializer
Source§fn serialize(&self, data_to_serialize: &T) -> SerializerResult<Box<[u8]>>
fn serialize(&self, data_to_serialize: &T) -> SerializerResult<Box<[u8]>>
Serialize method. It receives a reference to a data and it should return a boxed byte array with the serialized result. Read more
Source§fn deserialize<'a, R: Read + Unpin + 'a>(
&self,
reader: R,
) -> Box<dyn Stream<Item = SerializerResult<T>> + Unpin + 'a>where
T: 'a,
fn deserialize<'a, R: Read + Unpin + 'a>(
&self,
reader: R,
) -> Box<dyn Stream<Item = SerializerResult<T>> + Unpin + 'a>where
T: 'a,
Deserialize method. It receives a reader to the redolog (or snapshot), and it should return a stream of deserialized data 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 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