pub struct Json;Expand description
The JSON codec of events and snapshots.
Trait Implementations§
impl Copy for Json
Source§impl EventCodec for Json
impl EventCodec for Json
Source§impl SnapshotCodec for Json
impl SnapshotCodec for Json
Source§fn format(&self) -> u8
fn format(&self) -> u8
The first byte of every record this codec writes, which tells its
records from other codecs’ (
Codecs::decode_snapshot).Source§fn encode(&self, snapshot: Snapshot<'_>, out: &mut Vec<u8>) -> Result<(), Error>
fn encode(&self, snapshot: Snapshot<'_>, out: &mut Vec<u8>) -> Result<(), Error>
Appends a record of
snapshot to out, starting with
SnapshotCodec::format. On an error, part of it may have been
written: the caller truncates out.Auto Trait Implementations§
impl Forget for Json
impl Freeze for Json
impl Move for Json
impl RefUnwindSafe for Json
impl Send for Json
impl Sync for Json
impl Unpin for Json
impl UnsafeUnpin for Json
impl UnwindSafe for Json
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