pub struct Compressed {
pub content: String,
pub format: Format,
pub baseline_tokens: u32,
pub compressed_tokens: u32,
pub model: Model,
pub content_hash: String,
pub fallback: Option<FallbackReason>,
}Expand description
Output of a single compression operation.
Fields§
§content: StringCompressed text ready to send to an upstream LLM.
format: FormatWhich format was selected.
baseline_tokens: u32Real tokenizer count of the original prose input.
compressed_tokens: u32Real tokenizer count of the compressed output.
model: ModelModel whose tokenizer was used for the measurement.
content_hash: StringBlake3 hash of the original prose input (32 bytes hex-encoded).
fallback: Option<FallbackReason>Fallback reason if format is Prose and baseline != compressed semantically.
Trait Implementations§
Source§impl Clone for Compressed
impl Clone for Compressed
Source§fn clone(&self) -> Compressed
fn clone(&self) -> Compressed
Returns a duplicate of the value. Read more
1.0.0 · 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 Compressed
impl Debug for Compressed
Source§impl<'de> Deserialize<'de> for Compressed
impl<'de> Deserialize<'de> for Compressed
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Compressed
impl RefUnwindSafe for Compressed
impl Send for Compressed
impl Sync for Compressed
impl Unpin for Compressed
impl UnsafeUnpin for Compressed
impl UnwindSafe for Compressed
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more