pub struct ChunkDelta {
pub added: Vec<ChunkRef>,
pub removed: Vec<ChunkRef>,
pub unchanged: usize,
pub efficiency: f64,
pub full_upload_recommended: bool,
}Expand description
Result of diffing two ordered chunk lists.
Efficiency semantics:
0.0whennewis empty (no chunks = no efficiency to measure).1.0when all new chunks already exist in old (perfect dedup).
Fields§
§added: Vec<ChunkRef>Chunks in new not present in old – must be uploaded.
removed: Vec<ChunkRef>Chunks in old not present in new – become orphans (handled by compact()).
unchanged: usizeNumber of chunks shared between old and new (reused, no upload needed).
efficiency: f64Fraction of new chunks that are reused: unchanged / new.len().
1.0 = no change. 0.0 = all new (or empty).
full_upload_recommended: boolIf true, >80% of old chunks changed – full re-upload is more efficient than delta.
Trait Implementations§
Source§impl Clone for ChunkDelta
impl Clone for ChunkDelta
Source§fn clone(&self) -> ChunkDelta
fn clone(&self) -> ChunkDelta
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ChunkDelta
impl RefUnwindSafe for ChunkDelta
impl Send for ChunkDelta
impl Sync for ChunkDelta
impl Unpin for ChunkDelta
impl UnsafeUnpin for ChunkDelta
impl UnwindSafe for ChunkDelta
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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