pub struct TraitName(/* private fields */);Expand description
A non-empty biological trait name.
Implementations§
Source§impl TraitName
impl TraitName
Sourcepub fn new(value: impl AsRef<str>) -> Result<Self, TraitNameError>
pub fn new(value: impl AsRef<str>) -> Result<Self, TraitNameError>
Creates a trait name from non-empty text.
§Errors
Returns TraitNameError::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 TraitName
impl Ord for TraitName
1.21.0 (const: unstable) · 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 PartialOrd for TraitName
impl PartialOrd for TraitName
impl Eq for TraitName
impl StructuralPartialEq for TraitName
Auto Trait Implementations§
impl Freeze for TraitName
impl RefUnwindSafe for TraitName
impl Send for TraitName
impl Sync for TraitName
impl Unpin for TraitName
impl UnsafeUnpin for TraitName
impl UnwindSafe for TraitName
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