Skip to main content

Balance

Trait Balance 

Source
pub trait Balance {
    // Required methods
    fn balance(&mut self, balancing: Balancing) -> bool;
    fn pair_up(&mut self, pairing: Pairing) -> Result<bool, &'static str>;

    // Provided method
    fn equilibrate(
        &mut self,
        balancing: Balancing,
        pairing: Pairing,
    ) -> Result<(), &'static str> { ... }
}

Required Methods§

Source

fn balance(&mut self, balancing: Balancing) -> bool

Source

fn pair_up(&mut self, pairing: Pairing) -> Result<bool, &'static str>

Provided Methods§

Source

fn equilibrate( &mut self, balancing: Balancing, pairing: Pairing, ) -> Result<(), &'static str>

Implementors§

Source§

impl<T, U, V> Balance for Orthotree<D, L, M, N, T, U, V>
where T: Add<Output = T> + Copy + Split + Into<usize>, U: Copy + From<usize> + Into<usize>, V: Copy,

Source§

impl<T, U, V> Balance for Orthotree<D, L, M, N, T, U, V>
where T: Add<Output = T> + Copy + Split + Into<usize>, U: Copy + From<usize> + Into<usize>, V: Copy,