Struct OxidationStateSet
pub struct OxidationStateSet { /* private fields */ }Expand description
A small insertion-order collection of oxidation-state assignments.
Implementations§
§impl OxidationStateSet
impl OxidationStateSet
pub const fn new() -> OxidationStateSet
pub const fn new() -> OxidationStateSet
Creates an empty oxidation-state set.
pub fn from_assignments(
assignments: impl IntoIterator<Item = OxidationStateAssignment>,
) -> OxidationStateSet
pub fn from_assignments( assignments: impl IntoIterator<Item = OxidationStateAssignment>, ) -> OxidationStateSet
Creates a set from assignments, replacing earlier entries with the same label.
pub 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.
pub fn get(&self, label: &str) -> Option<&OxidationStateAssignment>
pub fn get(&self, label: &str) -> Option<&OxidationStateAssignment>
Returns an assignment by label.
pub fn contains_label(&self, label: &str) -> bool
pub fn contains_label(&self, label: &str) -> bool
Returns true when an assignment for label exists.
pub fn iter(&self) -> Iter<'_, OxidationStateAssignment>
pub fn iter(&self) -> Iter<'_, OxidationStateAssignment>
Returns an iterator over assignments.
Trait Implementations§
§impl Clone for OxidationStateSet
impl Clone for OxidationStateSet
§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 more§impl Debug for OxidationStateSet
impl Debug for OxidationStateSet
§impl Default for OxidationStateSet
impl Default for OxidationStateSet
§fn default() -> OxidationStateSet
fn default() -> OxidationStateSet
Returns the “default value” for a type. Read more
§impl Display for OxidationStateSet
impl Display for OxidationStateSet
§impl<'a> IntoIterator for &'a OxidationStateSet
impl<'a> IntoIterator for &'a OxidationStateSet
§type IntoIter = Iter<'a, OxidationStateAssignment>
type IntoIter = Iter<'a, OxidationStateAssignment>
Which kind of iterator are we turning this into?
§type Item = &'a OxidationStateAssignment
type Item = &'a OxidationStateAssignment
The type of the elements being iterated over.
§fn into_iter(self) -> <&'a OxidationStateSet as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a OxidationStateSet as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
§impl IntoIterator for OxidationStateSet
impl IntoIterator for OxidationStateSet
§type IntoIter = IntoIter<<OxidationStateSet as IntoIterator>::Item>
type IntoIter = IntoIter<<OxidationStateSet as IntoIterator>::Item>
Which kind of iterator are we turning this into?
§type Item = OxidationStateAssignment
type Item = OxidationStateAssignment
The type of the elements being iterated over.
§fn into_iter(self) -> <OxidationStateSet as IntoIterator>::IntoIter
fn into_iter(self) -> <OxidationStateSet as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
§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