Struct num_format::utils::NanStr
source · pub struct NanStr<'a>(/* private fields */);
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 for NanStr<'a>
impl<'a> PartialEq for NanStr<'a>
source§impl<'a> PartialOrd for NanStr<'a>
impl<'a> PartialOrd 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> StructuralPartialEq for NanStr<'a>
Auto Trait Implementations§
impl<'a> Freeze for NanStr<'a>
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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).