Struct icu_decimal::FixedDecimalFormat
source · [−]pub struct FixedDecimalFormat { /* private fields */ }
Expand description
A formatter for FixedDecimal
, rendering decimal digits in an i18n-friendly way.
FixedDecimalFormat
supports:
- Rendering in the local numbering system
- Locale-sensitive grouping separator positions
- Locale-sensitive plus and minus signs
Read more about the options in the options
module.
See the crate-level documentation for examples.
Implementations
sourceimpl FixedDecimalFormat
impl FixedDecimalFormat
sourcepub fn try_new<T: Into<Locale>, D: ResourceProvider<DecimalSymbolsV1Marker> + ?Sized>(
locale: T,
data_provider: &D,
options: FixedDecimalFormatOptions
) -> Result<Self, FixedDecimalFormatError>
pub fn try_new<T: Into<Locale>, D: ResourceProvider<DecimalSymbolsV1Marker> + ?Sized>(
locale: T,
data_provider: &D,
options: FixedDecimalFormatOptions
) -> Result<Self, FixedDecimalFormatError>
Creates a new FixedDecimalFormat
from locale data and an options bag.
sourcepub fn format<'l>(
&'l self,
value: &'l FixedDecimal
) -> FormattedFixedDecimal<'l>
pub fn format<'l>(
&'l self,
value: &'l FixedDecimal
) -> FormattedFixedDecimal<'l>
Formats a FixedDecimal
, returning a FormattedFixedDecimal
.
Auto Trait Implementations
impl RefUnwindSafe for FixedDecimalFormat
impl !Send for FixedDecimalFormat
impl !Sync for FixedDecimalFormat
impl Unpin for FixedDecimalFormat
impl UnwindSafe for FixedDecimalFormat
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more