pub struct CompressOutput {
pub text: String,
pub lossy: bool,
pub kind: CompressorKind,
pub facts: Option<HashMap<String, usize>>,
}Expand description
Output of a compressor. text is the compacted body without any CCR
retrieval footer — the router (crate::compress)
adds the marker after offloading the original.
Fields§
§text: StringThe compacted body.
lossy: boolTrue when data was dropped (vs. a faithful reformat). Changes the footer wording and whether the original is mandatory for fidelity.
kind: CompressorKindWhich compressor produced this.
facts: Option<HashMap<String, usize>>Optional named counts (e.g. error/warning tallies).
Implementations§
Source§impl CompressOutput
impl CompressOutput
Sourcepub fn reformatted(text: String, kind: CompressorKind) -> Self
pub fn reformatted(text: String, kind: CompressorKind) -> Self
A faithful reformat — every value preserved, only layout changed.
Sourcepub fn lossy(text: String, kind: CompressorKind) -> Self
pub fn lossy(text: String, kind: CompressorKind) -> Self
A lossy view — data was dropped; the original must be offloaded for recovery.
Trait Implementations§
Source§impl Clone for CompressOutput
impl Clone for CompressOutput
Source§fn clone(&self) -> CompressOutput
fn clone(&self) -> CompressOutput
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 moreAuto Trait Implementations§
impl Freeze for CompressOutput
impl RefUnwindSafe for CompressOutput
impl Send for CompressOutput
impl Sync for CompressOutput
impl Unpin for CompressOutput
impl UnsafeUnpin for CompressOutput
impl UnwindSafe for CompressOutput
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