pub struct JsonCodec;Expand description
JSON codec using serde_json.
Trait Implementations§
Source§impl Codec for JsonCodec
impl Codec for JsonCodec
Source§fn serialise_json_value(&self, value: &Value) -> Result<ValueBytes>
fn serialise_json_value(&self, value: &Value) -> Result<ValueBytes>
Serialises a JSON value into bytes for storage.
Source§fn deserialise_json_value(&self, bytes: &ValueBytes) -> Result<Value>
fn deserialise_json_value(&self, bytes: &ValueBytes) -> Result<Value>
Deserialises bytes into a JSON value.
impl Copy for JsonCodec
Auto Trait Implementations§
impl Freeze for JsonCodec
impl RefUnwindSafe for JsonCodec
impl Send for JsonCodec
impl Sync for JsonCodec
impl Unpin for JsonCodec
impl UnsafeUnpin for JsonCodec
impl UnwindSafe for JsonCodec
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CodecExt for T
impl<T> CodecExt for T
Source§fn serialise<T>(&self, value: &T) -> Result<ValueBytes>where
T: Serialize,
fn serialise<T>(&self, value: &T) -> Result<ValueBytes>where
T: Serialize,
Serialises a typed value into bytes.
Source§fn deserialise<T>(&self, bytes: &ValueBytes) -> Result<T>where
T: DeserializeOwned,
fn deserialise<T>(&self, bytes: &ValueBytes) -> Result<T>where
T: DeserializeOwned,
Deserialises bytes into a typed value.