pub struct MineralName(/* private fields */);Implementations§
Source§impl MineralName
impl MineralName
Sourcepub fn new(value: impl AsRef<str>) -> Result<Self, MineralTextError>
pub fn new(value: impl AsRef<str>) -> Result<Self, MineralTextError>
Creates a mineral name from non-empty text.
§Errors
Returns MineralTextError::Empty when the trimmed value is empty.
pub fn as_str(&self) -> &str
pub fn into_string(self) -> String
Trait Implementations§
Source§impl AsRef<str> for MineralName
impl AsRef<str> for MineralName
Source§impl Clone for MineralName
impl Clone for MineralName
Source§fn clone(&self) -> MineralName
fn clone(&self) -> MineralName
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 MineralName
impl Debug for MineralName
Source§impl Display for MineralName
impl Display for MineralName
Source§impl FromStr for MineralName
impl FromStr for MineralName
Source§impl Hash for MineralName
impl Hash for MineralName
Source§impl Ord for MineralName
impl Ord for MineralName
Source§fn cmp(&self, other: &MineralName) -> Ordering
fn cmp(&self, other: &MineralName) -> 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 MineralName
impl PartialEq for MineralName
Source§impl PartialOrd for MineralName
impl PartialOrd for MineralName
impl Eq for MineralName
impl StructuralPartialEq for MineralName
Auto Trait Implementations§
impl Freeze for MineralName
impl RefUnwindSafe for MineralName
impl Send for MineralName
impl Sync for MineralName
impl Unpin for MineralName
impl UnsafeUnpin for MineralName
impl UnwindSafe for MineralName
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