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