pub fn swap(&mut self, other: &mut Block<T>) -> Result<(), Error> {
        if self.order() != other.order() || !self.container.ptr_eq(&other.container) {
            return Err(format_err!("cannot swap blocks of different order or container"));
        }
        std::mem::swap(&mut self.index, &mut other.index);
        Ok(())
    }
/// Swaps two blocks if they are the same order.
Swaps two blocks if they are the same order.
Swaps two blocks if they are the same order .
pub fn swap(&mut self, other: &mut Block<T>) -> Result<(), Error> {
        if self.order() != other.order() || !self.container.ptr_eq(&other.container) {
            return Err(format_err!("cannot swap blocks of different order or container"));
        }
        std::mem::swap(&mut self.index, &mut other.index);
        Ok(())
    }
pub fn swap ( & mut self , other : & mut Block < T > ) -> Result < ( ) , Error > { if self . order ( ) != other . order ( ) || ! self . container . ptr_eq ( & other . container ) { return Err ( format_err ! ( " " ) ) ; } std :: mem :: swap ( & mut self . index , & mut other . index ) ; Ok ( ( ) ) }
Swaps two blocks if they are the same order.
Swaps two blocks if they are the same order .
&mut self
other
&mut Block<T>
&mut self
other
&mut Block<T>