pub struct ResidueSegment {
pub lines: Vec<String>,
pub end_of_source: bool,
pub trailing_newline: bool,
pub digest: String,
pub source: String,
pub source_session: Option<String>,
}Expand description
One stored segment: the verbatim source lines of a message group.
Fields§
§lines: Vec<String>The verbatim source lines, in order.
end_of_source: boolThe segment ends its source file (whose trailing newline it records).
trailing_newline: boolWhether that source file ended with a newline.
digest: StringBLAKE3 over the lines, checked before a segment is used: a segment altered or damaged in the store is treated as missing.
source: StringThe source session the lines were cut from. Sessions can share a conversation prefix (sub-agents opened with one prompt, forks), so a key can hold segments of several sources, and a restoration takes all of its segments from one.
source_session: Option<String>That source’s session id, when it has one.
Implementations§
Trait Implementations§
Source§impl Clone for ResidueSegment
impl Clone for ResidueSegment
Source§impl Debug for ResidueSegment
impl Debug for ResidueSegment
Source§impl<'de> Deserialize<'de> for ResidueSegment
impl<'de> Deserialize<'de> for ResidueSegment
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
impl Eq for ResidueSegment
Source§impl PartialEq for ResidueSegment
impl PartialEq for ResidueSegment
Source§impl Serialize for ResidueSegment
impl Serialize for ResidueSegment
impl StructuralPartialEq for ResidueSegment
Auto Trait Implementations§
impl Freeze for ResidueSegment
impl RefUnwindSafe for ResidueSegment
impl Send for ResidueSegment
impl Sync for ResidueSegment
impl Unpin for ResidueSegment
impl UnsafeUnpin for ResidueSegment
impl UnwindSafe for ResidueSegment
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key and return true if they are equal.