pub enum UpdateStrategy {
AlwaysFull,
AlwaysDelta,
Adaptive {
threshold: u8,
},
}Expand description
Strategy for deciding between full and delta encoding
Variants§
AlwaysFull
Always send full vector
AlwaysDelta
Always send delta (when available)
Adaptive
Automatically decide based on change ratio Uses delta if change_ratio < threshold (default 0.3)
Implementations§
Source§impl UpdateStrategy
impl UpdateStrategy
Sourcepub fn should_use_delta(&self, delta: &VectorDelta, vector_dim: u16) -> bool
pub fn should_use_delta(&self, delta: &VectorDelta, vector_dim: u16) -> bool
Decide whether to use delta based on the strategy
Trait Implementations§
Source§impl Clone for UpdateStrategy
impl Clone for UpdateStrategy
Source§fn clone(&self) -> UpdateStrategy
fn clone(&self) -> UpdateStrategy
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 moreSource§impl Debug for UpdateStrategy
impl Debug for UpdateStrategy
Source§impl Default for UpdateStrategy
impl Default for UpdateStrategy
Source§impl PartialEq for UpdateStrategy
impl PartialEq for UpdateStrategy
impl Copy for UpdateStrategy
impl Eq for UpdateStrategy
impl StructuralPartialEq for UpdateStrategy
Auto Trait Implementations§
impl Freeze for UpdateStrategy
impl RefUnwindSafe for UpdateStrategy
impl Send for UpdateStrategy
impl Sync for UpdateStrategy
impl Unpin for UpdateStrategy
impl UnwindSafe for UpdateStrategy
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