pub trait SetPos<P: PosT, const WORDS: usize, const SIZE: usize> {
// Required methods
fn contains(&self, pos: &P) -> bool;
fn insert(&mut self, pos: P);
fn remove(&mut self, pos: &P);
// Provided method
fn set(&mut self, pos: P, add: bool) { ... }
}Expand description
Trait that abstracts sets of super::pos::Pos values
Required Methods§
Sourcefn contains(&self, pos: &P) -> bool
fn contains(&self, pos: &P) -> bool
Check if the provided super::pos::Pos is in the set
Sourcefn insert(&mut self, pos: P)
fn insert(&mut self, pos: P)
Insert the provided super::pos::Pos
Sourcefn remove(&mut self, pos: &P)
fn remove(&mut self, pos: &P)
Remove the provided super::pos::Pos
Provided Methods§
Sourcefn set(&mut self, pos: P, add: bool)
fn set(&mut self, pos: P, add: bool)
Insert or remove the provided super::pos::Pos