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

#include <ICU4XTimeZoneFormatter.hpp>

Public Member Functions

diplomat::result< std::monostate, ICU4XErrorload_generic_non_location_long (const ICU4XDataProvider &provider)
 
diplomat::result< std::monostate, ICU4XErrorload_generic_non_location_short (const ICU4XDataProvider &provider)
 
diplomat::result< std::monostate, ICU4XErrorload_specific_non_location_long (const ICU4XDataProvider &provider)
 
diplomat::result< std::monostate, ICU4XErrorload_specific_non_location_short (const ICU4XDataProvider &provider)
 
diplomat::result< std::monostate, ICU4XErrorload_generic_location_format (const ICU4XDataProvider &provider)
 
diplomat::result< std::monostate, ICU4XErrorinclude_localized_gmt_format ()
 
diplomat::result< std::monostate, ICU4XErrorload_iso_8601_format (ICU4XIsoTimeZoneOptions options)
 
template<typename W>
diplomat::result< std::monostate, ICU4XErrorformat_custom_time_zone_to_writeable (const ICU4XCustomTimeZone &value, W &write) const
 
diplomat::result< std::string, ICU4XErrorformat_custom_time_zone (const ICU4XCustomTimeZone &value) const
 
template<typename W>
diplomat::result< std::monostate, ICU4XErrorformat_custom_time_zone_no_fallback_to_writeable (const ICU4XCustomTimeZone &value, W &write) const
 
diplomat::result< std::string, ICU4XErrorformat_custom_time_zone_no_fallback (const ICU4XCustomTimeZone &value) const
 
 ICU4XTimeZoneFormatter (capi::ICU4XTimeZoneFormatter *i)
 
 ICU4XTimeZoneFormatter ()=default
 
 ICU4XTimeZoneFormatter (ICU4XTimeZoneFormatter &&) noexcept=default
 
ICU4XTimeZoneFormatteroperator= (ICU4XTimeZoneFormatter &&other) noexcept=default
 

Static Public Member Functions

static diplomat::result< ICU4XTimeZoneFormatter, ICU4XErrorcreate_with_localized_gmt_fallback (const ICU4XDataProvider &provider, const ICU4XLocale &locale)
 
static diplomat::result< ICU4XTimeZoneFormatter, ICU4XErrorcreate_with_iso_8601_fallback (const ICU4XDataProvider &provider, const ICU4XLocale &locale, ICU4XIsoTimeZoneOptions options)
 

Detailed Description

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

See the Rust documentation for TimeZoneFormatter for more information.

Constructor & Destructor Documentation

◆ ICU4XTimeZoneFormatter() [1/3]

ICU4XTimeZoneFormatter::ICU4XTimeZoneFormatter ( capi::ICU4XTimeZoneFormatter * i)
inlineexplicit

◆ ICU4XTimeZoneFormatter() [2/3]

ICU4XTimeZoneFormatter::ICU4XTimeZoneFormatter ( )
default

◆ ICU4XTimeZoneFormatter() [3/3]

ICU4XTimeZoneFormatter::ICU4XTimeZoneFormatter ( ICU4XTimeZoneFormatter && )
defaultnoexcept

Member Function Documentation

◆ create_with_iso_8601_fallback()

diplomat::result< ICU4XTimeZoneFormatter, ICU4XError > ICU4XTimeZoneFormatter::create_with_iso_8601_fallback ( const ICU4XDataProvider & provider,
const ICU4XLocale & locale,
ICU4XIsoTimeZoneOptions options )
inlinestatic

Creates a new [ICU4XTimeZoneFormatter] from locale data.

Uses ISO-8601 as the fallback format.

See the Rust documentation for try_new for more information.

Additional information: 1

◆ create_with_localized_gmt_fallback()

diplomat::result< ICU4XTimeZoneFormatter, ICU4XError > ICU4XTimeZoneFormatter::create_with_localized_gmt_fallback ( const ICU4XDataProvider & provider,
const ICU4XLocale & locale )
inlinestatic

Creates a new [ICU4XTimeZoneFormatter] from locale data.

Uses localized GMT as the fallback format.

See the Rust documentation for try_new for more information.

Additional information: 1

◆ format_custom_time_zone()

diplomat::result< std::string, ICU4XError > ICU4XTimeZoneFormatter::format_custom_time_zone ( const ICU4XCustomTimeZone & value) const
inline

Formats a [ICU4XCustomTimeZone] to a string.

See the Rust documentation for format for more information.

See the Rust documentation for format_to_string for more information.

◆ format_custom_time_zone_no_fallback()

diplomat::result< std::string, ICU4XError > ICU4XTimeZoneFormatter::format_custom_time_zone_no_fallback ( const ICU4XCustomTimeZone & value) const
inline

Formats a [ICU4XCustomTimeZone] to a string, performing no fallback

See the Rust documentation for write_no_fallback for more information.

◆ format_custom_time_zone_no_fallback_to_writeable()

template<typename W>
diplomat::result< std::monostate, ICU4XError > ICU4XTimeZoneFormatter::format_custom_time_zone_no_fallback_to_writeable ( const ICU4XCustomTimeZone & value,
W & write ) const
inline

Formats a [ICU4XCustomTimeZone] to a string, performing no fallback

See the Rust documentation for write_no_fallback for more information.

◆ format_custom_time_zone_to_writeable()

template<typename W>
diplomat::result< std::monostate, ICU4XError > ICU4XTimeZoneFormatter::format_custom_time_zone_to_writeable ( const ICU4XCustomTimeZone & value,
W & write ) const
inline

Formats a [ICU4XCustomTimeZone] to a string.

See the Rust documentation for format for more information.

See the Rust documentation for format_to_string for more information.

◆ include_localized_gmt_format()

diplomat::result< std::monostate, ICU4XError > ICU4XTimeZoneFormatter::include_localized_gmt_format ( )
inline

Loads localized GMT format. Example: "GMT-07:00"

See the Rust documentation for include_localized_gmt_format for more information.

◆ load_generic_location_format()

diplomat::result< std::monostate, ICU4XError > ICU4XTimeZoneFormatter::load_generic_location_format ( const ICU4XDataProvider & provider)
inline

Loads generic location format. Example: "Los Angeles Time"

See the Rust documentation for include_generic_location_format for more information.

◆ load_generic_non_location_long()

diplomat::result< std::monostate, ICU4XError > ICU4XTimeZoneFormatter::load_generic_non_location_long ( const ICU4XDataProvider & provider)
inline

Loads generic non-location long format. Example: "Pacific Time"

See the Rust documentation for include_generic_non_location_long for more information.

◆ load_generic_non_location_short()

diplomat::result< std::monostate, ICU4XError > ICU4XTimeZoneFormatter::load_generic_non_location_short ( const ICU4XDataProvider & provider)
inline

Loads generic non-location short format. Example: "PT"

See the Rust documentation for include_generic_non_location_short for more information.

◆ load_iso_8601_format()

diplomat::result< std::monostate, ICU4XError > ICU4XTimeZoneFormatter::load_iso_8601_format ( ICU4XIsoTimeZoneOptions options)
inline

Loads ISO-8601 format. Example: "-07:00"

See the Rust documentation for include_iso_8601_format for more information.

◆ load_specific_non_location_long()

diplomat::result< std::monostate, ICU4XError > ICU4XTimeZoneFormatter::load_specific_non_location_long ( const ICU4XDataProvider & provider)
inline

Loads specific non-location long format. Example: "Pacific Standard Time"

See the Rust documentation for include_specific_non_location_long for more information.

◆ load_specific_non_location_short()

diplomat::result< std::monostate, ICU4XError > ICU4XTimeZoneFormatter::load_specific_non_location_short ( const ICU4XDataProvider & provider)
inline

Loads specific non-location short format. Example: "PST"

See the Rust documentation for include_specific_non_location_short for more information.

◆ operator=()

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

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