pub trait LazyModifiable: Clone {
type Diff: Clone + Default;
// Required methods
fn budget(&self) -> usize;
fn cost(work: &Self::Diff) -> usize;
fn fastforward(&mut self, work: Self::Diff);
// Provided methods
fn fastforward_from(&self, work: Self::Diff) -> Self { ... }
fn fastforward_with(&self, work: &Self::Diff) -> Self { ... }
}Required Associated Types§
Required Methods§
fn budget(&self) -> usize
fn cost(work: &Self::Diff) -> usize
fn fastforward(&mut self, work: Self::Diff)
Provided Methods§
fn fastforward_from(&self, work: Self::Diff) -> Self
fn fastforward_with(&self, work: &Self::Diff) -> Self
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.