Struct num_format::utils::DecimalStr [−][src]
pub struct DecimalStr<'a>(_);
Simple wrapper type for a &str
to make sure its length is less than the maximum for
a decimal (8 bytes).
Implementations
impl<'a> DecimalStr<'a>
[src]
impl<'a> DecimalStr<'a>
[src]pub fn new(s: &'a str) -> Result<DecimalStr<'a>, Error>
[src]
Constructs an DecimalStr
, ensuring that the length is less than the maximum for
a decimal (8 bytes).
Errors
Returns an error if the provided &str
’s length is more than 8 bytes.
impl<'a> DecimalStr<'a>
[src]
impl<'a> DecimalStr<'a>
[src]Trait Implementations
impl<'a> Clone for DecimalStr<'a>
[src]
impl<'a> Clone for DecimalStr<'a>
[src]fn clone(&self) -> DecimalStr<'a>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Hash for DecimalStr<'a>
[src]
impl<'a> Hash for DecimalStr<'a>
[src]impl<'a> Ord for DecimalStr<'a>
[src]
impl<'a> Ord for DecimalStr<'a>
[src]impl<'a> PartialEq<DecimalStr<'a>> for DecimalStr<'a>
[src]
impl<'a> PartialEq<DecimalStr<'a>> for DecimalStr<'a>
[src]fn eq(&self, other: &DecimalStr<'a>) -> bool
[src]
fn ne(&self, other: &DecimalStr<'a>) -> bool
[src]
impl<'a> PartialOrd<DecimalStr<'a>> for DecimalStr<'a>
[src]
impl<'a> PartialOrd<DecimalStr<'a>> for DecimalStr<'a>
[src]fn partial_cmp(&self, other: &DecimalStr<'a>) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn lt(&self, other: &Rhs) -> bool#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn le(&self, other: &Rhs) -> bool#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn gt(&self, other: &Rhs) -> bool#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn ge(&self, other: &Rhs) -> bool