Skip to main content

CompressionPolicy

Struct CompressionPolicy 

Source
pub struct CompressionPolicy {
Show 15 fields pub target_tokens: Option<usize>, pub reserve_output_tokens: usize, pub mode: CompressionMode, pub task_scope: TaskScope, pub cache_boundary: Option<CacheBoundary>, pub preserve_latest_user_message: bool, pub disabled: Vec<String>, pub unsafe_disable_redaction: bool, pub experimental: bool, pub enable: Vec<String>, pub store_originals: bool, pub retrieval_namespace: String, pub retrieval_ttl_seconds: Option<u64>, pub retrieval_backend: String, pub retrieval_store_path: Option<PathBuf>,
}

Fields§

§target_tokens: Option<usize>§reserve_output_tokens: usize§mode: CompressionMode§task_scope: TaskScope§cache_boundary: Option<CacheBoundary>§preserve_latest_user_message: bool§disabled: Vec<String>§unsafe_disable_redaction: bool§experimental: bool

CLI --experimental: enables transforms with ModeEntry.experimental == true (currently diff_compaction; log_compaction was promoted out of --experimental after the Phase 5 fidelity gate, see modes::ALL_ENTRIES) at their validated ratio band.

§enable: Vec<String>

CLI --enable <id>: force-enable a specific transform ID even though its mode-matrix entry doesn’t enable it for the current mode. Still requires experimental for any transform whose ModeEntry.experimental == true (see modes::pipeline_for).

§store_originals: bool

F-045: when true, and the full pre-transform input contains no secret-shaped content, pipeline::compress_with_estimator persists it to the reversible evidence store (retrieval_backend/retrieval_store_path) under its SHA-256 hash.

§retrieval_namespace: String

F-045: the namespace stored-original entries are keyed under (see retrieval_store::RetrievalStore::store).

§retrieval_ttl_seconds: Option<u64>

F-045: TTL passed to RetrievalStore::store for newly stored originals. None means “use retrieval_store::DEFAULT_TTL_SECONDS” (this is a default, not “never expire” — that per-entry meaning belongs to RetrievalStore::store’s own ttl_seconds parameter).

§retrieval_backend: String

F-045: backend name passed to RetrievalStore::open (“memory” | “filesystem” | “sqlite” — the latter fails clearly, handled as best-effort skip, see pipeline::maybe_store_originals).

§retrieval_store_path: Option<PathBuf>

F-045: filesystem backend root override. None means retrieval_store::default_store_path().

Implementations§

Trait Implementations§

Source§

impl Clone for CompressionPolicy

Source§

fn clone(&self) -> CompressionPolicy

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CompressionPolicy

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for CompressionPolicy

Source§

impl PartialEq for CompressionPolicy

Source§

fn eq(&self, other: &CompressionPolicy) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for CompressionPolicy

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.