pub struct ModeDelta {
pub mode: String,
pub added_lines: Vec<String>,
pub removed_lines: Vec<String>,
pub changed_lines: Vec<(String, String)>,
pub unchanged_count: usize,
}Expand description
Represents a structural delta between two mode outputs.
Fields§
§mode: String§added_lines: Vec<String>§removed_lines: Vec<String>§changed_lines: Vec<(String, String)>§unchanged_count: usizeImplementations§
Source§impl ModeDelta
impl ModeDelta
Sourcepub fn format_compact(&self) -> String
pub fn format_compact(&self) -> String
Format the delta for compact token-efficient output.
Sourcepub fn token_savings_estimate(&self, full_output_tokens: usize) -> f64
pub fn token_savings_estimate(&self, full_output_tokens: usize) -> f64
Calculate token savings compared to sending the full output.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ModeDelta
impl RefUnwindSafe for ModeDelta
impl Send for ModeDelta
impl Sync for ModeDelta
impl Unpin for ModeDelta
impl UnsafeUnpin for ModeDelta
impl UnwindSafe for ModeDelta
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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