ICU4X
International Components for Unicode
|
#include <ICU4XUnitsConverterFactory.hpp>
Public Member Functions | |
std::optional< ICU4XUnitsConverter > | converter (const ICU4XMeasureUnit &from, const ICU4XMeasureUnit &to) const |
ICU4XMeasureUnitParser | parser () const |
ICU4XUnitsConverterFactory (capi::ICU4XUnitsConverterFactory *i) | |
ICU4XUnitsConverterFactory ()=default | |
ICU4XUnitsConverterFactory (ICU4XUnitsConverterFactory &&) noexcept=default | |
ICU4XUnitsConverterFactory & | operator= (ICU4XUnitsConverterFactory &&other) noexcept=default |
Static Public Member Functions | |
static diplomat::result< ICU4XUnitsConverterFactory, ICU4XError > | create (const ICU4XDataProvider &provider) |
An ICU4X Units Converter Factory object, capable of creating converters a [ICU4XUnitsConverter
] for converting between two [ICU4XMeasureUnit
]s. Also, it can parse the CLDR unit identifier (e.g. meter-per-square-second
) and get the [ICU4XMeasureUnit
].
See the Rust documentation for ConverterFactory
for more information.
|
inlineexplicit |
|
default |
|
defaultnoexcept |
|
inline |
Creates a new [ICU4XUnitsConverter
] from the input and output [ICU4XMeasureUnit
]s. Returns nothing if the conversion between the two units is not possible. For example, conversion between meter
and second
is not possible.
See the Rust documentation for converter
for more information.
|
inlinestatic |
Construct a new [ICU4XUnitsConverterFactory
] instance.
See the Rust documentation for new
for more information.
|
defaultnoexcept |
|
inline |
Creates a parser to parse the CLDR unit identifier (e.g. meter-per-square-second
) and get the [ICU4XMeasureUnit
].
See the Rust documentation for parser
for more information.
Lifetimes: this
must live at least as long as the output.