tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

ZonedDateTimeFormatterGregorian.d.hpp (12919B)


      1 #ifndef icu4x_ZonedDateTimeFormatterGregorian_D_HPP
      2 #define icu4x_ZonedDateTimeFormatterGregorian_D_HPP
      3 
      4 #include <stdio.h>
      5 #include <stdint.h>
      6 #include <stddef.h>
      7 #include <stdbool.h>
      8 #include <memory>
      9 #include <functional>
     10 #include <optional>
     11 #include <cstdlib>
     12 #include "../diplomat_runtime.hpp"
     13 
     14 namespace icu4x {
     15 namespace capi { struct DataProvider; }
     16 class DataProvider;
     17 namespace capi { struct DateTimeFormatterGregorian; }
     18 class DateTimeFormatterGregorian;
     19 namespace capi { struct IsoDate; }
     20 class IsoDate;
     21 namespace capi { struct Locale; }
     22 class Locale;
     23 namespace capi { struct Time; }
     24 class Time;
     25 namespace capi { struct TimeZoneInfo; }
     26 class TimeZoneInfo;
     27 namespace capi { struct ZonedDateTimeFormatterGregorian; }
     28 class ZonedDateTimeFormatterGregorian;
     29 class DateTimeFormatterLoadError;
     30 class DateTimeWriteError;
     31 }
     32 
     33 
     34 namespace icu4x {
     35 namespace capi {
     36    struct ZonedDateTimeFormatterGregorian;
     37 } // namespace capi
     38 } // namespace
     39 
     40 namespace icu4x {
     41 /**
     42 * See the [Rust documentation for `FixedCalendarDateTimeFormatter`](https://docs.rs/icu/latest/icu/datetime/struct.FixedCalendarDateTimeFormatter.html) for more information.
     43 */
     44 class ZonedDateTimeFormatterGregorian {
     45 public:
     46 
     47  /**
     48   * Creates a zoned formatter based on a non-zoned formatter.
     49   *
     50   * Caution: The locale provided here must match the locale used to construct the non-zoned formatter,
     51   * or else unexpected behavior may occur!
     52   *
     53   * See the [Rust documentation for `SpecificLong`](https://docs.rs/icu/latest/icu/datetime/fieldsets/zone/struct.SpecificLong.html) for more information.
     54   */
     55  inline static diplomat::result<std::unique_ptr<icu4x::ZonedDateTimeFormatterGregorian>, icu4x::DateTimeFormatterLoadError> create_specific_long(const icu4x::Locale& locale, const icu4x::DateTimeFormatterGregorian& formatter);
     56 
     57  /**
     58   * Creates a zoned formatter based on a non-zoned formatter.
     59   *
     60   * Caution: The locale provided here must match the locale used to construct the non-zoned formatter,
     61   * or else unexpected behavior may occur!
     62   *
     63   * See the [Rust documentation for `SpecificLong`](https://docs.rs/icu/latest/icu/datetime/fieldsets/zone/struct.SpecificLong.html) for more information.
     64   */
     65  inline static diplomat::result<std::unique_ptr<icu4x::ZonedDateTimeFormatterGregorian>, icu4x::DateTimeFormatterLoadError> create_specific_long_with_provider(const icu4x::DataProvider& provider, const icu4x::Locale& locale, const icu4x::DateTimeFormatterGregorian& formatter);
     66 
     67  /**
     68   * Creates a zoned formatter based on a non-zoned formatter.
     69   *
     70   * Caution: The locale provided here must match the locale used to construct the non-zoned formatter,
     71   * or else unexpected behavior may occur!
     72   *
     73   * See the [Rust documentation for `SpecificShort`](https://docs.rs/icu/latest/icu/datetime/fieldsets/zone/struct.SpecificShort.html) for more information.
     74   */
     75  inline static diplomat::result<std::unique_ptr<icu4x::ZonedDateTimeFormatterGregorian>, icu4x::DateTimeFormatterLoadError> create_specific_short(const icu4x::Locale& locale, const icu4x::DateTimeFormatterGregorian& formatter);
     76 
     77  /**
     78   * Creates a zoned formatter based on a non-zoned formatter.
     79   *
     80   * Caution: The locale provided here must match the locale used to construct the non-zoned formatter,
     81   * or else unexpected behavior may occur!
     82   *
     83   * See the [Rust documentation for `SpecificShort`](https://docs.rs/icu/latest/icu/datetime/fieldsets/zone/struct.SpecificShort.html) for more information.
     84   */
     85  inline static diplomat::result<std::unique_ptr<icu4x::ZonedDateTimeFormatterGregorian>, icu4x::DateTimeFormatterLoadError> create_specific_short_with_provider(const icu4x::DataProvider& provider, const icu4x::Locale& locale, const icu4x::DateTimeFormatterGregorian& formatter);
     86 
     87  /**
     88   * Creates a zoned formatter based on a non-zoned formatter.
     89   *
     90   * Caution: The locale provided here must match the locale used to construct the non-zoned formatter,
     91   * or else unexpected behavior may occur!
     92   *
     93   * See the [Rust documentation for `LocalizedOffsetLong`](https://docs.rs/icu/latest/icu/datetime/fieldsets/zone/struct.LocalizedOffsetLong.html) for more information.
     94   */
     95  inline static diplomat::result<std::unique_ptr<icu4x::ZonedDateTimeFormatterGregorian>, icu4x::DateTimeFormatterLoadError> create_localized_offset_long(const icu4x::Locale& locale, const icu4x::DateTimeFormatterGregorian& formatter);
     96 
     97  /**
     98   * Creates a zoned formatter based on a non-zoned formatter.
     99   *
    100   * Caution: The locale provided here must match the locale used to construct the non-zoned formatter,
    101   * or else unexpected behavior may occur!
    102   *
    103   * See the [Rust documentation for `LocalizedOffsetLong`](https://docs.rs/icu/latest/icu/datetime/fieldsets/zone/struct.LocalizedOffsetLong.html) for more information.
    104   */
    105  inline static diplomat::result<std::unique_ptr<icu4x::ZonedDateTimeFormatterGregorian>, icu4x::DateTimeFormatterLoadError> create_localized_offset_long_with_provider(const icu4x::DataProvider& provider, const icu4x::Locale& locale, const icu4x::DateTimeFormatterGregorian& formatter);
    106 
    107  /**
    108   * Creates a zoned formatter based on a non-zoned formatter.
    109   *
    110   * Caution: The locale provided here must match the locale used to construct the non-zoned formatter,
    111   * or else unexpected behavior may occur!
    112   *
    113   * See the [Rust documentation for `LocalizedOffsetShort`](https://docs.rs/icu/latest/icu/datetime/fieldsets/zone/struct.LocalizedOffsetShort.html) for more information.
    114   */
    115  inline static diplomat::result<std::unique_ptr<icu4x::ZonedDateTimeFormatterGregorian>, icu4x::DateTimeFormatterLoadError> create_localized_offset_short(const icu4x::Locale& locale, const icu4x::DateTimeFormatterGregorian& formatter);
    116 
    117  /**
    118   * Creates a zoned formatter based on a non-zoned formatter.
    119   *
    120   * Caution: The locale provided here must match the locale used to construct the non-zoned formatter,
    121   * or else unexpected behavior may occur!
    122   *
    123   * See the [Rust documentation for `LocalizedOffsetShort`](https://docs.rs/icu/latest/icu/datetime/fieldsets/zone/struct.LocalizedOffsetShort.html) for more information.
    124   */
    125  inline static diplomat::result<std::unique_ptr<icu4x::ZonedDateTimeFormatterGregorian>, icu4x::DateTimeFormatterLoadError> create_localized_offset_short_with_provider(const icu4x::DataProvider& provider, const icu4x::Locale& locale, const icu4x::DateTimeFormatterGregorian& formatter);
    126 
    127  /**
    128   * Creates a zoned formatter based on a non-zoned formatter.
    129   *
    130   * Caution: The locale provided here must match the locale used to construct the non-zoned formatter,
    131   * or else unexpected behavior may occur!
    132   *
    133   * See the [Rust documentation for `GenericLong`](https://docs.rs/icu/latest/icu/datetime/fieldsets/zone/struct.GenericLong.html) for more information.
    134   */
    135  inline static diplomat::result<std::unique_ptr<icu4x::ZonedDateTimeFormatterGregorian>, icu4x::DateTimeFormatterLoadError> create_generic_long(const icu4x::Locale& locale, const icu4x::DateTimeFormatterGregorian& formatter);
    136 
    137  /**
    138   * Creates a zoned formatter based on a non-zoned formatter.
    139   *
    140   * Caution: The locale provided here must match the locale used to construct the non-zoned formatter,
    141   * or else unexpected behavior may occur!
    142   *
    143   * See the [Rust documentation for `GenericLong`](https://docs.rs/icu/latest/icu/datetime/fieldsets/zone/struct.GenericLong.html) for more information.
    144   */
    145  inline static diplomat::result<std::unique_ptr<icu4x::ZonedDateTimeFormatterGregorian>, icu4x::DateTimeFormatterLoadError> create_generic_long_with_provider(const icu4x::DataProvider& provider, const icu4x::Locale& locale, const icu4x::DateTimeFormatterGregorian& formatter);
    146 
    147  /**
    148   * Creates a zoned formatter based on a non-zoned formatter.
    149   *
    150   * Caution: The locale provided here must match the locale used to construct the non-zoned formatter,
    151   * or else unexpected behavior may occur!
    152   *
    153   * See the [Rust documentation for `GenericShort`](https://docs.rs/icu/latest/icu/datetime/fieldsets/zone/struct.GenericShort.html) for more information.
    154   */
    155  inline static diplomat::result<std::unique_ptr<icu4x::ZonedDateTimeFormatterGregorian>, icu4x::DateTimeFormatterLoadError> create_generic_short(const icu4x::Locale& locale, const icu4x::DateTimeFormatterGregorian& formatter);
    156 
    157  /**
    158   * Creates a zoned formatter based on a non-zoned formatter.
    159   *
    160   * Caution: The locale provided here must match the locale used to construct the non-zoned formatter,
    161   * or else unexpected behavior may occur!
    162   *
    163   * See the [Rust documentation for `GenericShort`](https://docs.rs/icu/latest/icu/datetime/fieldsets/zone/struct.GenericShort.html) for more information.
    164   */
    165  inline static diplomat::result<std::unique_ptr<icu4x::ZonedDateTimeFormatterGregorian>, icu4x::DateTimeFormatterLoadError> create_generic_short_with_provider(const icu4x::DataProvider& provider, const icu4x::Locale& locale, const icu4x::DateTimeFormatterGregorian& formatter);
    166 
    167  /**
    168   * Creates a zoned formatter based on a non-zoned formatter.
    169   *
    170   * Caution: The locale provided here must match the locale used to construct the non-zoned formatter,
    171   * or else unexpected behavior may occur!
    172   *
    173   * See the [Rust documentation for `Location`](https://docs.rs/icu/latest/icu/datetime/fieldsets/zone/struct.Location.html) for more information.
    174   */
    175  inline static diplomat::result<std::unique_ptr<icu4x::ZonedDateTimeFormatterGregorian>, icu4x::DateTimeFormatterLoadError> create_location(const icu4x::Locale& locale, const icu4x::DateTimeFormatterGregorian& formatter);
    176 
    177  /**
    178   * Creates a zoned formatter based on a non-zoned formatter.
    179   *
    180   * Caution: The locale provided here must match the locale used to construct the non-zoned formatter,
    181   * or else unexpected behavior may occur!
    182   *
    183   * See the [Rust documentation for `Location`](https://docs.rs/icu/latest/icu/datetime/fieldsets/zone/struct.Location.html) for more information.
    184   */
    185  inline static diplomat::result<std::unique_ptr<icu4x::ZonedDateTimeFormatterGregorian>, icu4x::DateTimeFormatterLoadError> create_location_with_provider(const icu4x::DataProvider& provider, const icu4x::Locale& locale, const icu4x::DateTimeFormatterGregorian& formatter);
    186 
    187  /**
    188   * Creates a zoned formatter based on a non-zoned formatter.
    189   *
    190   * Caution: The locale provided here must match the locale used to construct the non-zoned formatter,
    191   * or else unexpected behavior may occur!
    192   *
    193   * See the [Rust documentation for `ExemplarCity`](https://docs.rs/icu/latest/icu/datetime/fieldsets/zone/struct.ExemplarCity.html) for more information.
    194   */
    195  inline static diplomat::result<std::unique_ptr<icu4x::ZonedDateTimeFormatterGregorian>, icu4x::DateTimeFormatterLoadError> create_exemplar_city(const icu4x::Locale& locale, const icu4x::DateTimeFormatterGregorian& formatter);
    196 
    197  /**
    198   * Creates a zoned formatter based on a non-zoned formatter.
    199   *
    200   * Caution: The locale provided here must match the locale used to construct the non-zoned formatter,
    201   * or else unexpected behavior may occur!
    202   *
    203   * See the [Rust documentation for `ExemplarCity`](https://docs.rs/icu/latest/icu/datetime/fieldsets/zone/struct.ExemplarCity.html) for more information.
    204   */
    205  inline static diplomat::result<std::unique_ptr<icu4x::ZonedDateTimeFormatterGregorian>, icu4x::DateTimeFormatterLoadError> create_exemplar_city_with_provider(const icu4x::DataProvider& provider, const icu4x::Locale& locale, const icu4x::DateTimeFormatterGregorian& formatter);
    206 
    207  /**
    208   * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.FixedCalendarDateTimeFormatter.html#method.format) for more information.
    209   */
    210  inline diplomat::result<std::string, icu4x::DateTimeWriteError> format_iso(const icu4x::IsoDate& date, const icu4x::Time& time, const icu4x::TimeZoneInfo& zone) const;
    211 
    212  inline const icu4x::capi::ZonedDateTimeFormatterGregorian* AsFFI() const;
    213  inline icu4x::capi::ZonedDateTimeFormatterGregorian* AsFFI();
    214  inline static const icu4x::ZonedDateTimeFormatterGregorian* FromFFI(const icu4x::capi::ZonedDateTimeFormatterGregorian* ptr);
    215  inline static icu4x::ZonedDateTimeFormatterGregorian* FromFFI(icu4x::capi::ZonedDateTimeFormatterGregorian* ptr);
    216  inline static void operator delete(void* ptr);
    217 private:
    218  ZonedDateTimeFormatterGregorian() = delete;
    219  ZonedDateTimeFormatterGregorian(const icu4x::ZonedDateTimeFormatterGregorian&) = delete;
    220  ZonedDateTimeFormatterGregorian(icu4x::ZonedDateTimeFormatterGregorian&&) noexcept = delete;
    221  ZonedDateTimeFormatterGregorian operator=(const icu4x::ZonedDateTimeFormatterGregorian&) = delete;
    222  ZonedDateTimeFormatterGregorian operator=(icu4x::ZonedDateTimeFormatterGregorian&&) noexcept = delete;
    223  static void operator delete[](void*, size_t) = delete;
    224 };
    225 
    226 } // namespace
    227 #endif // icu4x_ZonedDateTimeFormatterGregorian_D_HPP