pub struct MinusSignStr<'a>(/* private fields */);
Expand description
Simple wrapper type for a &str
to make sure its length is less than the maximum for
a minus sign (8 bytes).
Implementations§
Source§impl<'a> MinusSignStr<'a>
impl<'a> MinusSignStr<'a>
Sourcepub fn new(s: &'a str) -> Result<MinusSignStr<'a>, Error>
pub fn new(s: &'a str) -> Result<MinusSignStr<'a>, Error>
Constructs a MinusSignStr
, ensuring that the length is less than the maximum for
a minus sign (8 bytes).
§Errors
Returns an error if the provided &str
’s length is more than 7 bytes.
Trait Implementations§
Source§impl<'a> AsRef<str> for MinusSignStr<'a>
impl<'a> AsRef<str> for MinusSignStr<'a>
Source§impl<'a> Clone for MinusSignStr<'a>
impl<'a> Clone for MinusSignStr<'a>
Source§fn clone(&self) -> MinusSignStr<'a>
fn clone(&self) -> MinusSignStr<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for MinusSignStr<'a>
impl<'a> Debug for MinusSignStr<'a>
Source§impl<'a> Display for MinusSignStr<'a>
impl<'a> Display for MinusSignStr<'a>
Source§impl<'a> Hash for MinusSignStr<'a>
impl<'a> Hash for MinusSignStr<'a>
Source§impl<'a> Ord for MinusSignStr<'a>
impl<'a> Ord for MinusSignStr<'a>
Source§fn cmp(&self, other: &MinusSignStr<'a>) -> Ordering
fn cmp(&self, other: &MinusSignStr<'a>) -> 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<'a> PartialEq for MinusSignStr<'a>
impl<'a> PartialEq for MinusSignStr<'a>
Source§impl<'a> PartialOrd for MinusSignStr<'a>
impl<'a> PartialOrd for MinusSignStr<'a>
impl<'a> Eq for MinusSignStr<'a>
impl<'a> StructuralPartialEq for MinusSignStr<'a>
Auto Trait Implementations§
impl<'a> Freeze for MinusSignStr<'a>
impl<'a> RefUnwindSafe for MinusSignStr<'a>
impl<'a> Send for MinusSignStr<'a>
impl<'a> Sync for MinusSignStr<'a>
impl<'a> Unpin for MinusSignStr<'a>
impl<'a> UnwindSafe for MinusSignStr<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S> ParseFormatted for S
impl<S> ParseFormatted for S
Source§fn parse_formatted<F, N>(&self, format: &F) -> Result<N, Error>where
F: Format,
N: FromFormattedStr,
fn parse_formatted<F, N>(&self, format: &F) -> Result<N, Error>where
F: Format,
N: FromFormattedStr,
Converts
self
(typically a formatted string) into a number (see Examples above).