pub struct ContextDelta { /* private fields */ }Expand description
A verified transport delta. It saves network/storage bytes, not stateless model prompt tokens.
Implementations§
Source§impl ContextDelta
impl ContextDelta
Sourcepub fn added_blocks(&self) -> usize
pub fn added_blocks(&self) -> usize
Number of blocks whose complete bytes must be transported.
Sourcepub fn apply(
&self,
base: &ContextSnapshot,
tokenizer: &impl TokenCounter,
) -> Result<ContextSnapshot, ContextError>
pub fn apply( &self, base: &ContextSnapshot, tokenizer: &impl TokenCounter, ) -> Result<ContextSnapshot, ContextError>
Reconstructs and verifies a complete snapshot; omission in order withdraws old content.
Trait Implementations§
Source§impl Clone for ContextDelta
impl Clone for ContextDelta
Source§impl Debug for ContextDelta
impl Debug for ContextDelta
Source§impl<'de> Deserialize<'de> for ContextDelta
impl<'de> Deserialize<'de> for ContextDelta
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 ContextDelta
Source§impl PartialEq for ContextDelta
impl PartialEq for ContextDelta
Source§impl Serialize for ContextDelta
impl Serialize for ContextDelta
impl StructuralPartialEq for ContextDelta
Auto Trait Implementations§
impl Forget for ContextDelta
impl Freeze for ContextDelta
impl Move for ContextDelta
impl RefUnwindSafe for ContextDelta
impl Send for ContextDelta
impl Sync for ContextDelta
impl Unpin for ContextDelta
impl UnsafeUnpin for ContextDelta
impl UnwindSafe for ContextDelta
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