pub struct LossyOptions {
pub preserve_paths: Vec<String>,
pub ratio: f64,
pub namespace: String,
}Fields§
§preserve_paths: Vec<String>Dot-separated object-key paths (e.g. "items", "data.results") whose arrays must never
be pruned. Deliberately a minimal path syntax, not full JSONPath — see is_preserved.
ratio: f64BEST-EFFORT selection hint, not an enforced budget (see CompressionPolicy::lossy_ratio):
the fraction (0.0..=1.0, clamped) of the prunable pool’s own estimated token cost to keep.
It sets budget_tokens for the walk below and is never re-checked against the final
document — the pool is only the droppable candidates, so the achieved whole-document ratio
differs by design. >= 1.0 is treated as “nothing to prune” and short-circuits to
Ok(None).
namespace: StringRetrieval namespace pipeline::apply_lossy_reduction will store dropped items under —
only used here to size the marker template for cost accounting, never for storage itself.
Trait Implementations§
Source§impl Clone for LossyOptions
impl Clone for LossyOptions
Source§fn clone(&self) -> LossyOptions
fn clone(&self) -> LossyOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more