pub enum SpeciesName {
Binomial(BinomialName),
Trinomial(TrinomialName),
Custom(String),
}Expand description
A species name represented as binomial, trinomial, or caller-defined descriptive text.
Variants§
Binomial(BinomialName)
A binomial species name.
Trinomial(TrinomialName)
A trinomial species name.
Custom(String)
Caller-defined descriptive species text.
Implementations§
Source§impl SpeciesName
impl SpeciesName
Sourcepub fn custom(value: impl AsRef<str>) -> Result<Self, SpeciesNameError>
pub fn custom(value: impl AsRef<str>) -> Result<Self, SpeciesNameError>
Creates a custom descriptive species name from non-empty text.
§Errors
Returns SpeciesNameError::Empty when the trimmed text is empty.
Trait Implementations§
Source§impl Clone for SpeciesName
impl Clone for SpeciesName
Source§fn clone(&self) -> SpeciesName
fn clone(&self) -> SpeciesName
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 SpeciesName
impl Debug for SpeciesName
Source§impl Display for SpeciesName
impl Display for SpeciesName
Source§impl From<BinomialName> for SpeciesName
impl From<BinomialName> for SpeciesName
Source§fn from(name: BinomialName) -> Self
fn from(name: BinomialName) -> Self
Converts to this type from the input type.
Source§impl From<TrinomialName> for SpeciesName
impl From<TrinomialName> for SpeciesName
Source§fn from(name: TrinomialName) -> Self
fn from(name: TrinomialName) -> Self
Converts to this type from the input type.
Source§impl Hash for SpeciesName
impl Hash for SpeciesName
Source§impl Ord for SpeciesName
impl Ord for SpeciesName
Source§fn cmp(&self, other: &SpeciesName) -> Ordering
fn cmp(&self, other: &SpeciesName) -> 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 SpeciesName
impl PartialEq for SpeciesName
Source§impl PartialOrd for SpeciesName
impl PartialOrd for SpeciesName
impl Eq for SpeciesName
impl StructuralPartialEq for SpeciesName
Auto Trait Implementations§
impl Freeze for SpeciesName
impl RefUnwindSafe for SpeciesName
impl Send for SpeciesName
impl Sync for SpeciesName
impl Unpin for SpeciesName
impl UnsafeUnpin for SpeciesName
impl UnwindSafe for SpeciesName
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