Trait Action
pub trait Action<T>:
Eq
+ Hash
+ Clone
+ Debugwhere
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
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.