Struct num_format::CustomFormatBuilder [−][src]
Type for building CustomFormat
s.
Implementations
impl CustomFormatBuilder
[src]
pub fn build(self) -> Result<CustomFormat, Error>
[src]
Construct a CustomFormat
.
Errors
Return an error if:
- The “decimal” is longer than 8 bytes
- The “infinity sign” is longer than 128 bytes
- The “minus sign” is longer than 8 bytes
- The “nan symbol” is longer than 64 bytes
- The “plus sign” is longer than 8 bytes
- The “separator” is longer than 8 bytes
pub fn decimal<S>(self, s: S) -> Self where
S: AsRef<str>,
[src]
S: AsRef<str>,
Sets the character used to represent decimal points.
pub fn format<F>(self, value: &F) -> Self where
F: Format,
[src]
F: Format,
Sets all fields based on the provided format.
pub fn grouping(self, value: Grouping) -> Self
[src]
Sets the Grouping
used to separate digits.
pub fn infinity<S>(self, s: S) -> Self where
S: AsRef<str>,
[src]
S: AsRef<str>,
Sets the string representation of infinity.
pub fn minus_sign<S>(self, s: S) -> Self where
S: AsRef<str>,
[src]
S: AsRef<str>,
Sets the string representation of a minus sign.
pub fn nan<S>(self, s: S) -> Self where
S: AsRef<str>,
[src]
S: AsRef<str>,
Sets the string representation of NaN.
pub fn plus_sign<S>(self, s: S) -> Self where
S: AsRef<str>,
[src]
S: AsRef<str>,
Sets the string representation of a plus sign.
pub fn separator<S>(self, s: S) -> Self where
S: AsRef<str>,
[src]
S: AsRef<str>,
Sets the string representation of a thousands separator.
Trait Implementations
impl Clone for CustomFormatBuilder
[src]
fn clone(&self) -> CustomFormatBuilder
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for CustomFormatBuilder
[src]
impl Eq for CustomFormatBuilder
[src]
impl From<CustomFormat> for CustomFormatBuilder
[src]
fn from(format: CustomFormat) -> Self
[src]
impl From<Locale> for CustomFormatBuilder
[src]
impl Hash for CustomFormatBuilder
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<CustomFormatBuilder> for CustomFormatBuilder
[src]
fn eq(&self, other: &CustomFormatBuilder) -> bool
[src]
fn ne(&self, other: &CustomFormatBuilder) -> bool
[src]
impl StructuralEq for CustomFormatBuilder
[src]
impl StructuralPartialEq for CustomFormatBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for CustomFormatBuilder
impl Send for CustomFormatBuilder
impl Sync for CustomFormatBuilder
impl Unpin for CustomFormatBuilder
impl UnwindSafe for CustomFormatBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,