pub struct CacheSegmentDelta {
pub tools: Option<SegmentChange>,
pub system: Option<SegmentChange>,
pub history_tail: Option<SegmentChange>,
pub changed_tool_ids: Vec<TraceId>,
pub tool_order_changed: bool,
pub estimated_reused_bytes: Option<u64>,
pub estimated_recomputed_bytes: Option<u64>,
}Expand description
Per-segment previous-turn change report plus changed-tool detail and
reuse estimates (spec §6.6). Every field is bounded metadata: enums,
validated tool IDs, and byte counts — never content. All fields are
optional/defaulted so synaps-request-trace/1 records written before
this struct existed still deserialize.
Fields§
§tools: Option<SegmentChange>§system: Option<SegmentChange>§history_tail: Option<SegmentChange>§changed_tool_ids: Vec<TraceId>Stable IDs of tools whose schema digest changed, or that were added or removed, relative to the previous emitted request.
tool_order_changed: boolTrue when the same tool set was sent in a different order — an intentional-looking prefix invalidation.
estimated_reused_bytes: Option<u64>Estimated bytes the provider can reuse from its cached prefix (sum of unchanged-segment canonical byte lengths). An estimate over canonical component bytes, not provider-internal token accounting.
estimated_recomputed_bytes: Option<u64>Estimated bytes the provider must recompute (changed/new segments + the history tail when it changed).
Trait Implementations§
Source§impl Clone for CacheSegmentDelta
impl Clone for CacheSegmentDelta
Source§fn clone(&self) -> CacheSegmentDelta
fn clone(&self) -> CacheSegmentDelta
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CacheSegmentDelta
impl Debug for CacheSegmentDelta
Source§impl Default for CacheSegmentDelta
impl Default for CacheSegmentDelta
Source§fn default() -> CacheSegmentDelta
fn default() -> CacheSegmentDelta
Source§impl<'de> Deserialize<'de> for CacheSegmentDelta
impl<'de> Deserialize<'de> for CacheSegmentDelta
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CacheSegmentDelta, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CacheSegmentDelta, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for CacheSegmentDelta
Source§impl PartialEq for CacheSegmentDelta
impl PartialEq for CacheSegmentDelta
Source§impl Serialize for CacheSegmentDelta
impl Serialize for CacheSegmentDelta
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for CacheSegmentDelta
Auto Trait Implementations§
impl Freeze for CacheSegmentDelta
impl RefUnwindSafe for CacheSegmentDelta
impl Send for CacheSegmentDelta
impl Sync for CacheSegmentDelta
impl Unpin for CacheSegmentDelta
impl UnsafeUnpin for CacheSegmentDelta
impl UnwindSafe for CacheSegmentDelta
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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