Struct num_format::utils::NanStr
source · pub struct NanStr<'a>(_);
Expand description
Simple wrapper type for a &str
to make sure its length is less than the maximum for
a nan symbol (64 bytes).
Implementations§
Trait Implementations§
source§impl<'a> Ord for NanStr<'a>
impl<'a> Ord for NanStr<'a>
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<NanStr<'a>> for NanStr<'a>
impl<'a> PartialEq<NanStr<'a>> for NanStr<'a>
source§impl<'a> PartialOrd<NanStr<'a>> for NanStr<'a>
impl<'a> PartialOrd<NanStr<'a>> for NanStr<'a>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<'a> Eq for NanStr<'a>
impl<'a> StructuralEq for NanStr<'a>
impl<'a> StructuralPartialEq for NanStr<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for NanStr<'a>
impl<'a> Send for NanStr<'a>
impl<'a> Sync for NanStr<'a>
impl<'a> Unpin for NanStr<'a>
impl<'a> UnwindSafe for NanStr<'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<S> ParseFormatted for Swhere
S: AsRef<str>,
impl<S> ParseFormatted for Swhere S: AsRef<str>,
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).