Trait music_theory::theory::traits::VecWrapper
source · pub trait VecWrapper {
type Item;
// Required methods
fn len(&self) -> usize;
fn is_empty(&self) -> bool;
fn iter(&self) -> Iter<'_, Self::Item>;
fn contains(&self, item: &Self::Item) -> bool;
fn contains_all(&self, items: &[Self::Item]) -> bool;
fn contains_any(&self, items: &[Self::Item]) -> bool;
}
Expand description
Wrapper around existing vector types. Used for the new type pattern.
Required Associated Types§
Required Methods§
sourcefn contains(&self, item: &Self::Item) -> bool
fn contains(&self, item: &Self::Item) -> bool
Returns whether the inner vector contains an item.
sourcefn contains_all(&self, items: &[Self::Item]) -> bool
fn contains_all(&self, items: &[Self::Item]) -> bool
Returns whether the inner vector contains all of the given items.
sourcefn contains_any(&self, items: &[Self::Item]) -> bool
fn contains_any(&self, items: &[Self::Item]) -> bool
Returns whether the inner vector contains any of the given items.