pub struct PlusSignStr<'a>(/* private fields */);
Expand description
Simple wrapper type for a &str
to make sure its length is less than the maximum for
a plus sign (8 bytes).
Implementations§
Source§impl<'a> PlusSignStr<'a>
impl<'a> PlusSignStr<'a>
Sourcepub fn new(s: &'a str) -> Result<PlusSignStr<'a>, Error>
pub fn new(s: &'a str) -> Result<PlusSignStr<'a>, Error>
Constructs an PlusSignStr
, ensuring that the length is less than the maximum for
a plus sign (8 bytes).
§Errors
Returns an error if the provided &str
’s length is more than 8 bytes.
Trait Implementations§
Source§impl<'a> AsRef<str> for PlusSignStr<'a>
impl<'a> AsRef<str> for PlusSignStr<'a>
Source§impl<'a> Clone for PlusSignStr<'a>
impl<'a> Clone for PlusSignStr<'a>
Source§fn clone(&self) -> PlusSignStr<'a>
fn clone(&self) -> PlusSignStr<'a>
Returns a copy 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 moreSource§impl<'a> Debug for PlusSignStr<'a>
impl<'a> Debug for PlusSignStr<'a>
Source§impl<'a> Display for PlusSignStr<'a>
impl<'a> Display for PlusSignStr<'a>
Source§impl<'a> Hash for PlusSignStr<'a>
impl<'a> Hash for PlusSignStr<'a>
Source§impl<'a> Ord for PlusSignStr<'a>
impl<'a> Ord for PlusSignStr<'a>
Source§fn cmp(&self, other: &PlusSignStr<'a>) -> Ordering
fn cmp(&self, other: &PlusSignStr<'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 PlusSignStr<'a>
impl<'a> PartialEq for PlusSignStr<'a>
Source§impl<'a> PartialOrd for PlusSignStr<'a>
impl<'a> PartialOrd for PlusSignStr<'a>
impl<'a> Eq for PlusSignStr<'a>
impl<'a> StructuralPartialEq for PlusSignStr<'a>
Auto Trait Implementations§
impl<'a> Freeze for PlusSignStr<'a>
impl<'a> RefUnwindSafe for PlusSignStr<'a>
impl<'a> Send for PlusSignStr<'a>
impl<'a> Sync for PlusSignStr<'a>
impl<'a> Unpin for PlusSignStr<'a>
impl<'a> UnwindSafe for PlusSignStr<'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).