pub struct AtomLabel(/* private fields */);Expand description
A validated atom label with a basic element-symbol shape.
Implementations§
Source§impl AtomLabel
impl AtomLabel
Sourcepub fn new(label: &str) -> Result<Self, MoleculeValidationError>
pub fn new(label: &str) -> Result<Self, MoleculeValidationError>
Creates an atom label.
§Errors
Returns MoleculeValidationError::EmptyAtomLabel when label is empty after trimming, or
MoleculeValidationError::InvalidAtomLabel when the label does not match the supported
element-symbol shape.
Sourcepub const fn as_element_symbol(&self) -> &ElementSymbol
pub const fn as_element_symbol(&self) -> &ElementSymbol
Returns the wrapped formula element-symbol value.
Trait Implementations§
Source§impl Ord for AtomLabel
impl Ord for AtomLabel
Source§impl PartialOrd for AtomLabel
impl PartialOrd for AtomLabel
impl Eq for AtomLabel
impl StructuralPartialEq for AtomLabel
Auto Trait Implementations§
impl Freeze for AtomLabel
impl RefUnwindSafe for AtomLabel
impl Send for AtomLabel
impl Sync for AtomLabel
impl Unpin for AtomLabel
impl UnsafeUnpin for AtomLabel
impl UnwindSafe for AtomLabel
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