[−][src]Struct num_format::format::CustomFormatBuilder
Type for building CustomFormat
s.
Methods
impl CustomFormatBuilder
[src]
pub fn build(self) -> Result<CustomFormat, Error>
[src]
Construct a CustomFormat
.
Errors
Return an error if:
- The "infinity sign" is longer than 64 bytes
- The "minus sign" is longer than 7 bytes
- The "nan symbol" is longer than 64 bytes
pub fn decimal(self, value: char) -> Self
[src]
Sets the character used to represent decimal points.
pub fn format<F>(self, value: &F) -> Self where
F: Format,
[src]
F: Format,
Sets the decimal, grouping, infinity, minus sign, nan, and separator representations according to the provided format.
pub fn grouping(self, value: Grouping) -> Self
[src]
Sets the Grouping
used to separate digits.
pub fn infinity<S>(self, value: S) -> Self where
S: AsRef<str>,
[src]
S: AsRef<str>,
Sets the string used for infinity. Note: If the length is greater than 64 bytes
build
will return an error (see build
).
pub fn minus_sign<S>(self, value: S) -> Self where
S: AsRef<str>,
[src]
S: AsRef<str>,
Sets the string used for minus signs. Note: If the length is greater than 7 bytes
build
will return an error (see build
).
pub fn nan<S>(self, value: S) -> Self where
S: AsRef<str>,
[src]
S: AsRef<str>,
Sets the string used for NaN. Note: If the length is greater than 64 bytes
build
will return an error (see build
).
pub fn separator(self, value: Option<char>) -> Self
[src]
Sets the character, if any, used to represent separtors.
Trait Implementations
impl Eq for CustomFormatBuilder
[src]
impl Clone for CustomFormatBuilder
[src]
fn clone(&self) -> CustomFormatBuilder
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for CustomFormatBuilder
[src]
impl PartialEq<CustomFormatBuilder> for CustomFormatBuilder
[src]
fn eq(&self, other: &CustomFormatBuilder) -> bool
[src]
fn ne(&self, other: &CustomFormatBuilder) -> bool
[src]
impl From<CustomFormat> for CustomFormatBuilder
[src]
fn from(format: CustomFormat) -> CustomFormatBuilder
[src]
impl Hash for CustomFormatBuilder
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for CustomFormatBuilder
[src]
Auto Trait Implementations
impl Send for CustomFormatBuilder
impl Sync for CustomFormatBuilder
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,