pub enum Compaction {
NotApplicable,
BaseRecorded {
base: String,
},
Compacted {
base: String,
full_bytes: usize,
delta_bytes: usize,
},
FullRetained {
base: String,
reason: FullRetainedReason,
},
}Expand description
What the encoder did with one event, so the caller can record it.
Every arm is reported, including the ones where nothing was saved. A compaction pass that quietly declined to compact would be indistinguishable from one that was never reached.
Variants§
NotApplicable
The event is not a provider response envelope (or is ephemeral, and so is never persisted): untouched.
BaseRecorded
The first frame of a turn. Persisted in full and remembered as that turn’s base.
Compacted
A later frame of a turn, persisted as a delta against the base.
Fields
FullRetained
A later frame of a turn that was persisted in full anyway, and why.
This is the safe outcome, not the failure outcome: the stream is exactly what it would have been without this module.
Fields
§
reason: FullRetainedReasonWhy the delta was declined.
Trait Implementations§
Source§impl Clone for Compaction
impl Clone for Compaction
Source§fn clone(&self) -> Compaction
fn clone(&self) -> Compaction
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 Compaction
impl Debug for Compaction
impl Eq for Compaction
Source§impl PartialEq for Compaction
impl PartialEq for Compaction
impl StructuralPartialEq for Compaction
Auto Trait Implementations§
impl Freeze for Compaction
impl RefUnwindSafe for Compaction
impl Send for Compaction
impl Sync for Compaction
impl Unpin for Compaction
impl UnsafeUnpin for Compaction
impl UnwindSafe for Compaction
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