Struct SystematicName
pub struct SystematicName(/* private fields */);Expand description
A validated systematic compound name.
Implementations§
§impl SystematicName
impl SystematicName
pub fn new(name: &str) -> Result<SystematicName, CompoundValidationError>
pub fn new(name: &str) -> Result<SystematicName, CompoundValidationError>
Creates a systematic name.
§Errors
Returns CompoundValidationError::EmptySystematicName when name is empty after trimming.
pub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the name and returns the owned text.
Trait Implementations§
§impl AsRef<str> for SystematicName
impl AsRef<str> for SystematicName
§impl Clone for SystematicName
impl Clone for SystematicName
§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 more§impl Debug for SystematicName
impl Debug for SystematicName
§impl Display for SystematicName
impl Display for SystematicName
§impl Hash for SystematicName
impl Hash for SystematicName
§impl Ord for SystematicName
impl Ord for SystematicName
§impl PartialEq for SystematicName
impl PartialEq for SystematicName
§impl PartialOrd for SystematicName
impl PartialOrd for SystematicName
§impl TryFrom<&str> for SystematicName
impl TryFrom<&str> for SystematicName
§type Error = CompoundValidationError
type Error = CompoundValidationError
The type returned in the event of a conversion error.
§fn try_from(
value: &str,
) -> Result<SystematicName, <SystematicName as TryFrom<&str>>::Error>
fn try_from( value: &str, ) -> Result<SystematicName, <SystematicName as TryFrom<&str>>::Error>
Performs the conversion.
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