Trait State

Source
pub trait State: Clone {
    type Derivative: StateDerivative;

    // Required method
    fn shift_in_place(&mut self, dir: &Self::Derivative, amount: f64);

    // Provided method
    fn shift(&self, dir: &Self::Derivative, amount: f64) -> Self { ... }
}

Required Associated Types§

Required Methods§

Source

fn shift_in_place(&mut self, dir: &Self::Derivative, amount: f64)

Provided Methods§

Source

fn shift(&self, dir: &Self::Derivative, amount: f64) -> 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.

Implementors§