Struct SpecificEpithet
pub struct SpecificEpithet(/* private fields */);Expand description
A non-empty specific epithet.
Implementations§
§impl SpecificEpithet
impl SpecificEpithet
pub fn new(value: impl AsRef<str>) -> Result<SpecificEpithet, SpeciesNameError>
pub fn new(value: impl AsRef<str>) -> Result<SpecificEpithet, SpeciesNameError>
Creates a specific epithet from non-empty text.
§Errors
Returns SpeciesNameError::Empty when the trimmed epithet is empty.
pub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the epithet and returns the owned string.
Trait Implementations§
§impl AsRef<str> for SpecificEpithet
impl AsRef<str> for SpecificEpithet
§impl Clone for SpecificEpithet
impl Clone for SpecificEpithet
§fn clone(&self) -> SpecificEpithet
fn clone(&self) -> SpecificEpithet
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 SpecificEpithet
impl Debug for SpecificEpithet
§impl Display for SpecificEpithet
impl Display for SpecificEpithet
§impl FromStr for SpecificEpithet
impl FromStr for SpecificEpithet
§type Err = SpeciesNameError
type Err = SpeciesNameError
The associated error which can be returned from parsing.
§fn from_str(
value: &str,
) -> Result<SpecificEpithet, <SpecificEpithet as FromStr>::Err>
fn from_str( value: &str, ) -> Result<SpecificEpithet, <SpecificEpithet as FromStr>::Err>
Parses a string
s to return a value of this type. Read more§impl Hash for SpecificEpithet
impl Hash for SpecificEpithet
§impl Ord for SpecificEpithet
impl Ord for SpecificEpithet
§impl PartialEq for SpecificEpithet
impl PartialEq for SpecificEpithet
§impl PartialOrd for SpecificEpithet
impl PartialOrd for SpecificEpithet
impl Eq for SpecificEpithet
impl StructuralPartialEq for SpecificEpithet
Auto Trait Implementations§
impl Freeze for SpecificEpithet
impl RefUnwindSafe for SpecificEpithet
impl Send for SpecificEpithet
impl Sync for SpecificEpithet
impl Unpin for SpecificEpithet
impl UnsafeUnpin for SpecificEpithet
impl UnwindSafe for SpecificEpithet
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