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