pub trait Action: Debug + Clone {
type Target: Clone;
// Required methods
fn id_action() -> Self;
fn composition(&mut self, rhs: &Self);
fn apply(&self, target: &mut Self::Target);
}Expand description
作用
作用自体もモノイドであることを要求
作用素を合成させてから作用させるのと、作用素を一つ一つ作用させる結果が同じであることを要求
Required Associated Types§
Required Methods§
Sourcefn composition(&mut self, rhs: &Self)
fn composition(&mut self, rhs: &Self)
作用の合成(selfが先、rhsが後)
(atcoder libraryとは作用の順が逆なので注意)
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.