pub struct GenusName(/* private fields */);Expand description
A non-empty genus name.
Implementations§
Source§impl GenusName
impl GenusName
Sourcepub fn new(value: impl AsRef<str>) -> Result<Self, SpeciesNameError>
pub fn new(value: impl AsRef<str>) -> Result<Self, SpeciesNameError>
Creates a genus name from non-empty text.
Surrounding whitespace is trimmed; the remaining text and casing are preserved.
§Errors
Returns SpeciesNameError::Empty when the trimmed name is empty.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the name and returns the owned string.
Trait Implementations§
Source§impl Ord for GenusName
impl Ord for GenusName
Source§impl PartialOrd for GenusName
impl PartialOrd for GenusName
impl Eq for GenusName
impl StructuralPartialEq for GenusName
Auto Trait Implementations§
impl Freeze for GenusName
impl RefUnwindSafe for GenusName
impl Send for GenusName
impl Sync for GenusName
impl Unpin for GenusName
impl UnsafeUnpin for GenusName
impl UnwindSafe for GenusName
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