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