pub struct ElementMask(/* private fields */);Expand description
The set of elements present, one bit per atomic number.
The periodic table fits in two machine words, so membership is a shift and a test rather than a search.
Implementations§
Source§impl ElementMask
impl ElementMask
Sourcepub const fn contains(self, element: Element) -> bool
pub const fn contains(self, element: Element) -> bool
Returns true when the element may be present.
Sourcepub const fn union_with(&mut self, other: Self)
pub const fn union_with(&mut self, other: Self)
Adds everything in other.
Sourcepub const fn intersects(self, other: Self) -> bool
pub const fn intersects(self, other: Self) -> bool
Returns true when the two sets share an element.
Trait Implementations§
Source§impl Clone for ElementMask
impl Clone for ElementMask
impl Copy for ElementMask
Source§impl Debug for ElementMask
impl Debug for ElementMask
Source§impl Default for ElementMask
impl Default for ElementMask
impl Eq for ElementMask
Source§impl FromIterator<Element> for ElementMask
impl FromIterator<Element> for ElementMask
Source§impl Hash for ElementMask
impl Hash for ElementMask
Source§impl PartialEq for ElementMask
impl PartialEq for ElementMask
impl StructuralPartialEq for ElementMask
Auto Trait Implementations§
impl Freeze for ElementMask
impl RefUnwindSafe for ElementMask
impl Send for ElementMask
impl Sync for ElementMask
impl Unpin for ElementMask
impl UnsafeUnpin for ElementMask
impl UnwindSafe for ElementMask
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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