Actions

Trait Actions 

pub trait Actions:
    Action<Multiple>
    + Clone
    + Hash
    + Eq {
    // Required methods
    fn ndim(&self) -> usize;
    fn diff(&self, rhs: &Self) -> usize;
    fn resize_(&mut self, to: usize, offset: usize);
    fn index(&self, index: usize) -> &Self::S;
    fn index_mut(&mut self, index: usize) -> &mut Self::S;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}
Expand description

Container of multiple actions.

Represent a sequence of actions.

Required Methods§

fn ndim(&self) -> usize

fn diff(&self, rhs: &Self) -> usize

fn resize_(&mut self, to: usize, offset: usize)

fn index(&self, index: usize) -> &Self::S

fn index_mut(&mut self, index: usize) -> &mut Self::S

Provided Methods§

fn is_empty(&self) -> bool

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.

Implementations on Foreign Types§

§

impl<A> Actions for Rc<A>
where A: Actions,

§

fn ndim(&self) -> usize

§

fn diff(&self, rhs: &Rc<A>) -> usize

§

fn resize_(&mut self, to: usize, offset: usize)

§

fn index(&self, index: usize) -> &<Rc<A> as Action<Multiple>>::S

§

fn index_mut(&mut self, index: usize) -> &mut <Rc<A> as Action<Multiple>>::S

Implementors§

§

impl<A> Actions for SeqAction<A>
where A: Action<Single> + Copy,