pub struct Slice {
pub schema: SchemaId,
pub payload: Value,
pub lossy: bool,
}Expand description
What a slicer produced, before it becomes a Condensate.
The slicer says what it made and whether it dropped anything; condense
turns that into the addressed, typed value the rest of the system sees.
Fields§
§schema: SchemaIdThe shape of the summary.
payload: ValueThe summary itself.
lossy: boolWhether information was dropped.
Set honestly. A slicer that under-reports this is telling a downstream
step it has the whole picture when it does not, and nothing downstream
can detect the lie — which is why every slicer in this crate has a test
that a lossless slice reports false and a dropping one reports true.
Implementations§
Source§impl Slice
impl Slice
Sourcepub fn rendered(&self) -> String
pub fn rendered(&self) -> String
The rendered form, which is what the cap is measured against.
A condensate’s payload is structured, but what reaches a model is its serialisation — so that is what has to fit. Measuring the structure instead would let a slicer pass the check and overrun the window.