Struct UnitDesignator
pub struct UnitDesignator(/* private fields */);Implementations§
§impl UnitDesignator
impl UnitDesignator
pub fn new(
value: impl AsRef<str>,
) -> Result<UnitDesignator, UnitDesignatorError>
pub fn new( value: impl AsRef<str>, ) -> Result<UnitDesignator, UnitDesignatorError>
Creates a value from non-empty text.
§Errors
Returns UnitDesignatorError::Empty when the trimmed value is empty.
pub fn as_str(&self) -> &str
Trait Implementations§
§impl AsRef<str> for UnitDesignator
impl AsRef<str> for UnitDesignator
§impl Clone for UnitDesignator
impl Clone for UnitDesignator
§fn clone(&self) -> UnitDesignator
fn clone(&self) -> UnitDesignator
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 more§impl Debug for UnitDesignator
impl Debug for UnitDesignator
§impl Display for UnitDesignator
impl Display for UnitDesignator
§impl FromStr for UnitDesignator
impl FromStr for UnitDesignator
§type Err = UnitDesignatorError
type Err = UnitDesignatorError
The associated error which can be returned from parsing.
§fn from_str(
value: &str,
) -> Result<UnitDesignator, <UnitDesignator as FromStr>::Err>
fn from_str( value: &str, ) -> Result<UnitDesignator, <UnitDesignator as FromStr>::Err>
Parses a string
s to return a value of this type. Read more§impl Hash for UnitDesignator
impl Hash for UnitDesignator
§impl Ord for UnitDesignator
impl Ord for UnitDesignator
§impl PartialEq for UnitDesignator
impl PartialEq for UnitDesignator
§impl PartialOrd for UnitDesignator
impl PartialOrd for UnitDesignator
§impl TryFrom<&str> for UnitDesignator
impl TryFrom<&str> for UnitDesignator
§type Error = UnitDesignatorError
type Error = UnitDesignatorError
The type returned in the event of a conversion error.
§fn try_from(
value: &str,
) -> Result<UnitDesignator, <UnitDesignator as TryFrom<&str>>::Error>
fn try_from( value: &str, ) -> Result<UnitDesignator, <UnitDesignator as TryFrom<&str>>::Error>
Performs the conversion.
impl Eq for UnitDesignator
impl StructuralPartialEq for UnitDesignator
Auto Trait Implementations§
impl Freeze for UnitDesignator
impl RefUnwindSafe for UnitDesignator
impl Send for UnitDesignator
impl Sync for UnitDesignator
impl Unpin for UnitDesignator
impl UnsafeUnpin for UnitDesignator
impl UnwindSafe for UnitDesignator
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