pub struct OrganismName(/* private fields */);Expand description
A non-empty organism name.
Implementations§
Source§impl OrganismName
impl OrganismName
Sourcepub fn new(value: impl AsRef<str>) -> Result<Self, OrganismNameError>
pub fn new(value: impl AsRef<str>) -> Result<Self, OrganismNameError>
Creates an organism name from non-empty text.
§Errors
Returns OrganismNameError::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 AsRef<str> for OrganismName
impl AsRef<str> for OrganismName
Source§impl Clone for OrganismName
impl Clone for OrganismName
Source§fn clone(&self) -> OrganismName
fn clone(&self) -> OrganismName
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 OrganismName
impl Debug for OrganismName
Source§impl Display for OrganismName
impl Display for OrganismName
Source§impl FromStr for OrganismName
impl FromStr for OrganismName
Source§impl Hash for OrganismName
impl Hash for OrganismName
Source§impl Ord for OrganismName
impl Ord for OrganismName
Source§fn cmp(&self, other: &OrganismName) -> Ordering
fn cmp(&self, other: &OrganismName) -> 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 OrganismName
impl PartialEq for OrganismName
Source§impl PartialOrd for OrganismName
impl PartialOrd for OrganismName
impl Eq for OrganismName
impl StructuralPartialEq for OrganismName
Auto Trait Implementations§
impl Freeze for OrganismName
impl RefUnwindSafe for OrganismName
impl Send for OrganismName
impl Sync for OrganismName
impl Unpin for OrganismName
impl UnsafeUnpin for OrganismName
impl UnwindSafe for OrganismName
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