pub struct OxidationStateSet { /* private fields */ }Expand description
A small insertion-order collection of oxidation-state assignments.
Implementations§
Source§impl OxidationStateSet
impl OxidationStateSet
Sourcepub fn from_assignments(
assignments: impl IntoIterator<Item = OxidationStateAssignment>,
) -> Self
pub fn from_assignments( assignments: impl IntoIterator<Item = OxidationStateAssignment>, ) -> Self
Creates a set from assignments, replacing earlier entries with the same label.
Sourcepub fn insert(
&mut self,
assignment: OxidationStateAssignment,
) -> Option<OxidationStateAssignment>
pub fn insert( &mut self, assignment: OxidationStateAssignment, ) -> Option<OxidationStateAssignment>
Inserts an assignment and returns the previous assignment with the same label, if any.
Sourcepub fn get(&self, label: &str) -> Option<&OxidationStateAssignment>
pub fn get(&self, label: &str) -> Option<&OxidationStateAssignment>
Returns an assignment by label.
Sourcepub fn contains_label(&self, label: &str) -> bool
pub fn contains_label(&self, label: &str) -> bool
Returns true when an assignment for label exists.
Sourcepub fn iter(&self) -> Iter<'_, OxidationStateAssignment>
pub fn iter(&self) -> Iter<'_, OxidationStateAssignment>
Returns an iterator over assignments.
Trait Implementations§
Source§impl Clone for OxidationStateSet
impl Clone for OxidationStateSet
Source§fn clone(&self) -> OxidationStateSet
fn clone(&self) -> OxidationStateSet
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OxidationStateSet
impl Debug for OxidationStateSet
Source§impl Default for OxidationStateSet
impl Default for OxidationStateSet
Source§fn default() -> OxidationStateSet
fn default() -> OxidationStateSet
Returns the “default value” for a type. Read more
Source§impl Display for OxidationStateSet
impl Display for OxidationStateSet
Source§impl<'a> IntoIterator for &'a OxidationStateSet
impl<'a> IntoIterator for &'a OxidationStateSet
Source§impl IntoIterator for OxidationStateSet
impl IntoIterator for OxidationStateSet
Source§impl PartialEq for OxidationStateSet
impl PartialEq for OxidationStateSet
impl Eq for OxidationStateSet
impl StructuralPartialEq for OxidationStateSet
Auto Trait Implementations§
impl Freeze for OxidationStateSet
impl RefUnwindSafe for OxidationStateSet
impl Send for OxidationStateSet
impl Sync for OxidationStateSet
impl Unpin for OxidationStateSet
impl UnsafeUnpin for OxidationStateSet
impl UnwindSafe for OxidationStateSet
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