Delta

Trait Delta 

Source
pub trait Delta: Sized {
    type DeltaType;

    // Required methods
    fn compute_delta(start: &Self, end: &Self) -> Self::DeltaType;
    fn apply_delta(start: &Self, delta: &Self::DeltaType) -> Self;
}
Expand description

Trait for types that support delta encoding.

Required Associated Types§

Required Methods§

Source

fn compute_delta(start: &Self, end: &Self) -> Self::DeltaType

Computes the delta required to go from start to end. start + delta = end

Source

fn apply_delta(start: &Self, delta: &Self::DeltaType) -> Self

Applies a delta to start to get end. start + delta = end

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§