Action

Trait Action 

pub trait Action<T>:
    Eq
    + Hash
    + Clone
    + Debug
where T: Dimension,
{ type S: Action<Single> + Copy; // Required methods fn default_action() -> Self; fn no_overwrite() -> Self; fn overwritten(&self, rhs: &Self) -> Self; fn overwritten_(&mut self, rhs: &Self); fn from_single(single: Self::S) -> Self; }
Expand description

Action trait represents an action of desired dimension. Use type parameter to distinguish the dimension of action.

Required methods are:

  • default_action: return an action that represents the default action.
  • no_overwrite: return an action that represents no action overwrite in Fast-IMT theory.
  • overwrite: return an action that represents the overwrite of self by rhs.
  • overwrite_: in-place version of overwrite.
  • from_single: new from an action of the single form.

Required Associated Types§

type S: Action<Single> + Copy

What single form of action it contains. For structs that implements Action<Single>, S must be itself, while for Action<Multiple> structs, it should define one.

Required Methods§

fn default_action() -> Self

fn no_overwrite() -> Self

fn overwritten(&self, rhs: &Self) -> Self

fn overwritten_(&mut self, rhs: &Self)

fn from_single(single: Self::S) -> 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.

Implementations on Foreign Types§

§

impl Action<Single> for i8

§

type S = i8

§

fn default_action() -> i8

§

fn no_overwrite() -> i8

§

fn overwritten(&self, rhs: &i8) -> i8

§

fn overwritten_(&mut self, rhs: &i8)

§

fn from_single(single: <i8 as Action<Single>>::S) -> i8

§

impl Action<Single> for i16

§

type S = i16

§

fn default_action() -> i16

§

fn no_overwrite() -> i16

§

fn overwritten(&self, rhs: &i16) -> i16

§

fn overwritten_(&mut self, rhs: &i16)

§

fn from_single(single: <i16 as Action<Single>>::S) -> i16

§

impl Action<Single> for i32

§

type S = i32

§

fn default_action() -> i32

§

fn no_overwrite() -> i32

§

fn overwritten(&self, rhs: &i32) -> i32

§

fn overwritten_(&mut self, rhs: &i32)

§

fn from_single(single: <i32 as Action<Single>>::S) -> i32

§

impl Action<Single> for i64

§

type S = i64

§

fn default_action() -> i64

§

fn no_overwrite() -> i64

§

fn overwritten(&self, rhs: &i64) -> i64

§

fn overwritten_(&mut self, rhs: &i64)

§

fn from_single(single: <i64 as Action<Single>>::S) -> i64

§

impl Action<Single> for i128

§

type S = i128

§

fn default_action() -> i128

§

fn no_overwrite() -> i128

§

fn overwritten(&self, rhs: &i128) -> i128

§

fn overwritten_(&mut self, rhs: &i128)

§

fn from_single(single: <i128 as Action<Single>>::S) -> i128

§

impl Action<Single> for isize

§

type S = isize

§

fn default_action() -> isize

§

fn no_overwrite() -> isize

§

fn overwritten(&self, rhs: &isize) -> isize

§

fn overwritten_(&mut self, rhs: &isize)

§

fn from_single(single: <isize as Action<Single>>::S) -> isize

§

impl Action<Single> for u8

§

type S = u8

§

fn default_action() -> u8

§

fn no_overwrite() -> u8

§

fn overwritten(&self, rhs: &u8) -> u8

§

fn overwritten_(&mut self, rhs: &u8)

§

fn from_single(single: <u8 as Action<Single>>::S) -> u8

§

impl Action<Single> for u16

§

type S = u16

§

fn default_action() -> u16

§

fn no_overwrite() -> u16

§

fn overwritten(&self, rhs: &u16) -> u16

§

fn overwritten_(&mut self, rhs: &u16)

§

fn from_single(single: <u16 as Action<Single>>::S) -> u16

§

impl Action<Single> for u32

§

type S = u32

§

fn default_action() -> u32

§

fn no_overwrite() -> u32

§

fn overwritten(&self, rhs: &u32) -> u32

§

fn overwritten_(&mut self, rhs: &u32)

§

fn from_single(single: <u32 as Action<Single>>::S) -> u32

§

impl Action<Single> for u64

§

type S = u64

§

fn default_action() -> u64

§

fn no_overwrite() -> u64

§

fn overwritten(&self, rhs: &u64) -> u64

§

fn overwritten_(&mut self, rhs: &u64)

§

fn from_single(single: <u64 as Action<Single>>::S) -> u64

§

impl Action<Single> for u128

§

type S = u128

§

fn default_action() -> u128

§

fn no_overwrite() -> u128

§

fn overwritten(&self, rhs: &u128) -> u128

§

fn overwritten_(&mut self, rhs: &u128)

§

fn from_single(single: <u128 as Action<Single>>::S) -> u128

§

impl Action<Single> for usize

§

type S = usize

§

fn default_action() -> usize

§

fn no_overwrite() -> usize

§

fn overwritten(&self, rhs: &usize) -> usize

§

fn overwritten_(&mut self, rhs: &usize)

§

fn from_single(single: <usize as Action<Single>>::S) -> usize

§

impl<T, A> Action<T> for Rc<A>
where T: Dimension, A: Action<T>,

§

type S = <A as Action<T>>::S

§

fn default_action() -> Rc<A>

§

fn no_overwrite() -> Rc<A>

§

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

§

fn overwritten_(&mut self, rhs: &Rc<A>)

§

fn from_single(single: <Rc<A> as Action<T>>::S) -> Rc<A>

Implementors§

§

impl Action<Single> for TypedAction<'_>

§

type S = TypedAction<'_>

§

impl<'a> Action<Single> for IbAction<'a>

§

type S = IbAction<'a>

§

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

§

type S = A