Trait sqrid::SetQa

source ·
pub trait SetQa<const W: u16, const H: u16, const WORDS: usize, const SIZE: usize> {
    // Required methods
    fn contains(&self, qa: &Qa<W, H>) -> bool;
    fn insert(&mut self, qa: &Qa<W, H>);
    fn remove(&mut self, qa: &Qa<W, H>);

    // Provided method
    fn set(&mut self, qa: &Qa<W, H>, add: bool) { ... }
}
Expand description

Trait that abstracts sets of Qa values

Required Methods§

source

fn contains(&self, qa: &Qa<W, H>) -> bool

Check if the provided Qa is in the set

source

fn insert(&mut self, qa: &Qa<W, H>)

Insert the provided Qa

source

fn remove(&mut self, qa: &Qa<W, H>)

Remove the provided Qa

Provided Methods§

source

fn set(&mut self, qa: &Qa<W, H>, add: bool)

Insert or remove the provided Qa

Implementations on Foreign Types§

source§

impl<const W: u16, const H: u16, const WORDS: usize, const SIZE: usize> SetQa<W, H, WORDS, SIZE> for BTreeSet<Qa<W, H>>

source§

fn contains(&self, qa: &Qa<W, H>) -> bool

source§

fn insert(&mut self, qa: &Qa<W, H>)

source§

fn remove(&mut self, qa: &Qa<W, H>)

source§

impl<const W: u16, const H: u16, const WORDS: usize, const SIZE: usize> SetQa<W, H, WORDS, SIZE> for HashSet<Qa<W, H>>

source§

fn contains(&self, qa: &Qa<W, H>) -> bool

source§

fn insert(&mut self, qa: &Qa<W, H>)

source§

fn remove(&mut self, qa: &Qa<W, H>)

Implementors§

source§

impl<const W: u16, const H: u16, const WORDS: usize, const SIZE: usize> SetQa<W, H, WORDS, SIZE> for Gridbool<W, H, WORDS>