pub struct SystematicName(/* private fields */);Expand description
A validated systematic compound name.
Implementations§
Source§impl SystematicName
impl SystematicName
Sourcepub fn new(name: &str) -> Result<Self, CompoundValidationError>
pub fn new(name: &str) -> Result<Self, CompoundValidationError>
Creates a systematic name.
§Errors
Returns CompoundValidationError::EmptySystematicName when name is empty after trimming.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the name and returns the owned text.
Trait Implementations§
Source§impl AsRef<str> for SystematicName
impl AsRef<str> for SystematicName
Source§impl Clone for SystematicName
impl Clone for SystematicName
Source§fn clone(&self) -> SystematicName
fn clone(&self) -> SystematicName
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 SystematicName
impl Debug for SystematicName
Source§impl Display for SystematicName
impl Display for SystematicName
Source§impl Hash for SystematicName
impl Hash for SystematicName
Source§impl Ord for SystematicName
impl Ord for SystematicName
Source§fn cmp(&self, other: &SystematicName) -> Ordering
fn cmp(&self, other: &SystematicName) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SystematicName
impl PartialEq for SystematicName
Source§impl PartialOrd for SystematicName
impl PartialOrd for SystematicName
Source§impl TryFrom<&str> for SystematicName
impl TryFrom<&str> for SystematicName
impl Eq for SystematicName
impl StructuralPartialEq for SystematicName
Auto Trait Implementations§
impl Freeze for SystematicName
impl RefUnwindSafe for SystematicName
impl Send for SystematicName
impl Sync for SystematicName
impl Unpin for SystematicName
impl UnsafeUnpin for SystematicName
impl UnwindSafe for SystematicName
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