pub struct ColSet(/* private fields */);Expand description
A compressed set of columns. Like a ColList, but guaranteed to be sorted and to contain no duplicate entries.
Dereferences to a ColList for convenience.
Implementations§
Methods from Deref<Target = ColList>§
Sourcepub fn as_singleton(&self) -> Option<ColId>
pub fn as_singleton(&self) -> Option<ColId>
Returns head if that is the only element.
Sourcepub fn contains(&self, needle: ColId) -> bool
pub fn contains(&self, needle: ColId) -> bool
Returns whether needle is contained in the list.
This an be faster than using list.iter().any(|c| c == needle).
Sourcepub fn iter(&self) -> impl '_ + Clone + Iterator<Item = ColId>
pub fn iter(&self) -> impl '_ + Clone + Iterator<Item = ColId>
Returns an iterator over all the columns in this list.
Sourcepub fn to_u16_vec(&self) -> Box<[u16]>
pub fn to_u16_vec(&self) -> Box<[u16]>
Convert to a Box<[u16]>.
Trait Implementations§
Source§impl<C: Into<ColId>> FromIterator<C> for ColSet
impl<C: Into<ColId>> FromIterator<C> for ColSet
Source§fn from_iter<T: IntoIterator<Item = C>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = C>>(iter: T) -> Self
Creates a value from an iterator. Read more
Source§impl Ord for ColSet
impl Ord for ColSet
Source§impl PartialOrd for ColSet
impl PartialOrd for ColSet
impl Eq for ColSet
impl StructuralPartialEq for ColSet
Auto Trait Implementations§
impl Freeze for ColSet
impl RefUnwindSafe for ColSet
impl Send for ColSet
impl Sync for ColSet
impl Unpin for ColSet
impl UnwindSafe for ColSet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more