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

#include <ICU4XTimeFormatter.hpp>

Public Member Functions

template<typename W>
diplomat::result< std::monostate, ICU4XErrorformat_time_to_writeable (const ICU4XTime &value, W &write) const
 
diplomat::result< std::string, ICU4XErrorformat_time (const ICU4XTime &value) const
 
template<typename W>
diplomat::result< std::monostate, ICU4XErrorformat_datetime_to_writeable (const ICU4XDateTime &value, W &write) const
 
diplomat::result< std::string, ICU4XErrorformat_datetime (const ICU4XDateTime &value) const
 
template<typename W>
diplomat::result< std::monostate, ICU4XErrorformat_iso_datetime_to_writeable (const ICU4XIsoDateTime &value, W &write) const
 
diplomat::result< std::string, ICU4XErrorformat_iso_datetime (const ICU4XIsoDateTime &value) const
 
 ICU4XTimeFormatter (capi::ICU4XTimeFormatter *i)
 
 ICU4XTimeFormatter ()=default
 
 ICU4XTimeFormatter (ICU4XTimeFormatter &&) noexcept=default
 
ICU4XTimeFormatteroperator= (ICU4XTimeFormatter &&other) noexcept=default
 

Static Public Member Functions

static diplomat::result< ICU4XTimeFormatter, ICU4XErrorcreate_with_length (const ICU4XDataProvider &provider, const ICU4XLocale &locale, ICU4XTimeLength length)
 

Detailed Description

An ICU4X TimeFormatter object capable of formatting an [ICU4XTime] type (and others) as a string

See the Rust documentation for TimeFormatter for more information.

Constructor & Destructor Documentation

◆ ICU4XTimeFormatter() [1/3]

ICU4XTimeFormatter::ICU4XTimeFormatter ( capi::ICU4XTimeFormatter * i)
inlineexplicit

◆ ICU4XTimeFormatter() [2/3]

ICU4XTimeFormatter::ICU4XTimeFormatter ( )
default

◆ ICU4XTimeFormatter() [3/3]

ICU4XTimeFormatter::ICU4XTimeFormatter ( ICU4XTimeFormatter && )
defaultnoexcept

Member Function Documentation

◆ create_with_length()

diplomat::result< ICU4XTimeFormatter, ICU4XError > ICU4XTimeFormatter::create_with_length ( const ICU4XDataProvider & provider,
const ICU4XLocale & locale,
ICU4XTimeLength length )
inlinestatic

Creates a new [ICU4XTimeFormatter] from locale data.

See the Rust documentation for try_new_with_length for more information.

◆ format_datetime()

diplomat::result< std::string, ICU4XError > ICU4XTimeFormatter::format_datetime ( const ICU4XDateTime & value) const
inline

Formats a [ICU4XDateTime] to a string.

See the Rust documentation for format for more information.

◆ format_datetime_to_writeable()

template<typename W>
diplomat::result< std::monostate, ICU4XError > ICU4XTimeFormatter::format_datetime_to_writeable ( const ICU4XDateTime & value,
W & write ) const
inline

Formats a [ICU4XDateTime] to a string.

See the Rust documentation for format for more information.

◆ format_iso_datetime()

diplomat::result< std::string, ICU4XError > ICU4XTimeFormatter::format_iso_datetime ( const ICU4XIsoDateTime & value) const
inline

Formats a [ICU4XIsoDateTime] to a string.

See the Rust documentation for format for more information.

◆ format_iso_datetime_to_writeable()

template<typename W>
diplomat::result< std::monostate, ICU4XError > ICU4XTimeFormatter::format_iso_datetime_to_writeable ( const ICU4XIsoDateTime & value,
W & write ) const
inline

Formats a [ICU4XIsoDateTime] to a string.

See the Rust documentation for format for more information.

◆ format_time()

diplomat::result< std::string, ICU4XError > ICU4XTimeFormatter::format_time ( const ICU4XTime & value) const
inline

Formats a [ICU4XTime] to a string.

See the Rust documentation for format for more information.

◆ format_time_to_writeable()

template<typename W>
diplomat::result< std::monostate, ICU4XError > ICU4XTimeFormatter::format_time_to_writeable ( const ICU4XTime & value,
W & write ) const
inline

Formats a [ICU4XTime] to a string.

See the Rust documentation for format for more information.

◆ operator=()

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

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