pub trait PermutableCollection{
type Rank;
// Required methods
fn get_perm_of(&self, other: &Self) -> Option<Permutation<Self::Rank>>;
fn permute(&self, perm: &Permutation<Self::Rank>) -> Result<Self, Error>;
fn permute_mut(
&mut self,
perm: &Permutation<Self::Rank>,
) -> Result<(), Error>;
}Expand description
Trait defining a permutable collection consisting of discrete and distinguishable items that can be permuted.
Required Associated Types§
Required Methods§
Sourcefn get_perm_of(&self, other: &Self) -> Option<Permutation<Self::Rank>>
fn get_perm_of(&self, other: &Self) -> Option<Permutation<Self::Rank>>
Determines the permutation, if any, that maps self to other.
Sourcefn permute(&self, perm: &Permutation<Self::Rank>) -> Result<Self, Error>
fn permute(&self, perm: &Permutation<Self::Rank>) -> Result<Self, Error>
Permutes the items in the current collection by perm and returns a new collection with
the permuted items.
Sourcefn permute_mut(&mut self, perm: &Permutation<Self::Rank>) -> Result<(), Error>
fn permute_mut(&mut self, perm: &Permutation<Self::Rank>) -> Result<(), Error>
Permutes in-place the items in the current collection by perm.
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.