ICU4X
International Components for Unicode
Loading...
Searching...
No Matches
ICU4XFixedDecimalFormatter Class Reference

#include <ICU4XFixedDecimalFormatter.hpp>

Public Member Functions

template<typename W >
diplomat::result< std::monostate, ICU4XErrorformat_to_writeable (const ICU4XFixedDecimal &value, W &write) const
 
diplomat::result< std::string, ICU4XErrorformat (const ICU4XFixedDecimal &value) const
 
 ICU4XFixedDecimalFormatter (capi::ICU4XFixedDecimalFormatter *i)
 
 ICU4XFixedDecimalFormatter ()=default
 
 ICU4XFixedDecimalFormatter (ICU4XFixedDecimalFormatter &&) noexcept=default
 
ICU4XFixedDecimalFormatteroperator= (ICU4XFixedDecimalFormatter &&other) noexcept=default
 

Static Public Member Functions

static diplomat::result< ICU4XFixedDecimalFormatter, ICU4XErrorcreate_with_grouping_strategy (const ICU4XDataProvider &provider, const ICU4XLocale &locale, ICU4XFixedDecimalGroupingStrategy grouping_strategy)
 
static diplomat::result< ICU4XFixedDecimalFormatter, ICU4XErrorcreate_with_decimal_symbols_v1 (const ICU4XDataStruct &data_struct, ICU4XFixedDecimalGroupingStrategy grouping_strategy)
 

Detailed Description

An ICU4X Fixed Decimal Format object, capable of formatting a [ICU4XFixedDecimal] as a string.

See the Rust documentation for FixedDecimalFormatter for more information.

Constructor & Destructor Documentation

◆ ICU4XFixedDecimalFormatter() [1/3]

ICU4XFixedDecimalFormatter::ICU4XFixedDecimalFormatter ( capi::ICU4XFixedDecimalFormatter *  i)
inlineexplicit

◆ ICU4XFixedDecimalFormatter() [2/3]

ICU4XFixedDecimalFormatter::ICU4XFixedDecimalFormatter ( )
default

◆ ICU4XFixedDecimalFormatter() [3/3]

ICU4XFixedDecimalFormatter::ICU4XFixedDecimalFormatter ( ICU4XFixedDecimalFormatter &&  )
defaultnoexcept

Member Function Documentation

◆ create_with_decimal_symbols_v1()

diplomat::result< ICU4XFixedDecimalFormatter, ICU4XError > ICU4XFixedDecimalFormatter::create_with_decimal_symbols_v1 ( const ICU4XDataStruct data_struct,
ICU4XFixedDecimalGroupingStrategy  grouping_strategy 
)
inlinestatic

Creates a new [ICU4XFixedDecimalFormatter] from preconstructed locale data in the form of an [ICU4XDataStruct] constructed from ICU4XDataStruct::create_decimal_symbols().

The contents of the data struct will be consumed: if you wish to use the struct again it will have to be reconstructed. Passing a consumed struct to this method will return an error.

◆ create_with_grouping_strategy()

diplomat::result< ICU4XFixedDecimalFormatter, ICU4XError > ICU4XFixedDecimalFormatter::create_with_grouping_strategy ( const ICU4XDataProvider provider,
const ICU4XLocale locale,
ICU4XFixedDecimalGroupingStrategy  grouping_strategy 
)
inlinestatic

Creates a new [ICU4XFixedDecimalFormatter] from locale data.

See the Rust documentation for try_new for more information.

◆ format()

diplomat::result< std::string, ICU4XError > ICU4XFixedDecimalFormatter::format ( const ICU4XFixedDecimal value) const
inline

Formats a [ICU4XFixedDecimal] to a string.

See the Rust documentation for format for more information.

◆ format_to_writeable()

template<typename W >
diplomat::result< std::monostate, ICU4XError > ICU4XFixedDecimalFormatter::format_to_writeable ( const ICU4XFixedDecimal value,
W &  write 
) const
inline

Formats a [ICU4XFixedDecimal] to a string.

See the Rust documentation for format for more information.

◆ operator=()

ICU4XFixedDecimalFormatter & ICU4XFixedDecimalFormatter::operator= ( ICU4XFixedDecimalFormatter &&  other)
defaultnoexcept

The documentation for this class was generated from the following file: