1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
#ifndef icu4x_DateFormatter_D_HPP
#define icu4x_DateFormatter_D_HPP
#include <stdio.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <memory>
#include <functional>
#include <optional>
#include <cstdlib>
#include "../diplomat_runtime.hpp"
namespace icu4x {
namespace capi { struct DataProvider; }
class DataProvider;
namespace capi { struct Date; }
class Date;
namespace capi { struct DateFormatter; }
class DateFormatter;
namespace capi { struct IsoDate; }
class IsoDate;
namespace capi { struct Locale; }
class Locale;
struct DateTimeMismatchedCalendarError;
class DateTimeAlignment;
class DateTimeFormatterLoadError;
class DateTimeLength;
class YearStyle;
}
namespace icu4x {
namespace capi {
struct DateFormatter;
} // namespace capi
} // namespace
namespace icu4x {
/**
* See the [Rust documentation for `DateTimeFormatter`](https://docs.rs/icu/2.0.0/icu/datetime/struct.DateTimeFormatter.html) for more information.
*/
class DateFormatter {
public:
/**
* See the [Rust documentation for `try_new`](https://docs.rs/icu/2.0.0/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information.
*
* See the [Rust documentation for `D`](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.D.html) for more information.
*
* Additional information: [1](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.D.html#method.with_alignment), [2](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.D.html#method.for_length)
*/
inline static diplomat::result<std::unique_ptr<icu4x::DateFormatter>, icu4x::DateTimeFormatterLoadError> create_d(const icu4x::Locale& locale, std::optional<icu4x::DateTimeLength> length, std::optional<icu4x::DateTimeAlignment> alignment);
/**
* See the [Rust documentation for `try_new`](https://docs.rs/icu/2.0.0/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information.
*
* See the [Rust documentation for `D`](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.D.html) for more information.
*
* Additional information: [1](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.D.html#method.with_alignment), [2](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.D.html#method.for_length)
*/
inline static diplomat::result<std::unique_ptr<icu4x::DateFormatter>, icu4x::DateTimeFormatterLoadError> create_d_with_provider(const icu4x::DataProvider& provider, const icu4x::Locale& locale, std::optional<icu4x::DateTimeLength> length, std::optional<icu4x::DateTimeAlignment> alignment);
/**
* See the [Rust documentation for `try_new`](https://docs.rs/icu/2.0.0/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information.
*
* See the [Rust documentation for `MD`](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.MD.html) for more information.
*
* Additional information: [1](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.MD.html#method.with_alignment), [2](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.MD.html#method.for_length)
*/
inline static diplomat::result<std::unique_ptr<icu4x::DateFormatter>, icu4x::DateTimeFormatterLoadError> create_md(const icu4x::Locale& locale, std::optional<icu4x::DateTimeLength> length, std::optional<icu4x::DateTimeAlignment> alignment);
/**
* See the [Rust documentation for `try_new`](https://docs.rs/icu/2.0.0/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information.
*
* See the [Rust documentation for `MD`](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.MD.html) for more information.
*
* Additional information: [1](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.MD.html#method.with_alignment), [2](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.MD.html#method.for_length)
*/
inline static diplomat::result<std::unique_ptr<icu4x::DateFormatter>, icu4x::DateTimeFormatterLoadError> create_md_with_provider(const icu4x::DataProvider& provider, const icu4x::Locale& locale, std::optional<icu4x::DateTimeLength> length, std::optional<icu4x::DateTimeAlignment> alignment);
/**
* See the [Rust documentation for `try_new`](https://docs.rs/icu/2.0.0/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information.
*
* See the [Rust documentation for `YMD`](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.YMD.html) for more information.
*
* Additional information: [1](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.YMD.html#method.with_alignment), [2](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.YMD.html#method.with_year_style), [3](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.YMD.html#method.for_length)
*/
inline static diplomat::result<std::unique_ptr<icu4x::DateFormatter>, icu4x::DateTimeFormatterLoadError> create_ymd(const icu4x::Locale& locale, std::optional<icu4x::DateTimeLength> length, std::optional<icu4x::DateTimeAlignment> alignment, std::optional<icu4x::YearStyle> year_style);
/**
* See the [Rust documentation for `try_new`](https://docs.rs/icu/2.0.0/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information.
*
* See the [Rust documentation for `YMD`](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.YMD.html) for more information.
*
* Additional information: [1](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.YMD.html#method.with_alignment), [2](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.YMD.html#method.with_year_style), [3](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.YMD.html#method.for_length)
*/
inline static diplomat::result<std::unique_ptr<icu4x::DateFormatter>, icu4x::DateTimeFormatterLoadError> create_ymd_with_provider(const icu4x::DataProvider& provider, const icu4x::Locale& locale, std::optional<icu4x::DateTimeLength> length, std::optional<icu4x::DateTimeAlignment> alignment, std::optional<icu4x::YearStyle> year_style);
/**
* See the [Rust documentation for `try_new`](https://docs.rs/icu/2.0.0/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information.
*
* See the [Rust documentation for `DE`](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.DE.html) for more information.
*
* Additional information: [1](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.DE.html#method.with_alignment), [2](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.DE.html#method.for_length)
*/
inline static diplomat::result<std::unique_ptr<icu4x::DateFormatter>, icu4x::DateTimeFormatterLoadError> create_de(const icu4x::Locale& locale, std::optional<icu4x::DateTimeLength> length, std::optional<icu4x::DateTimeAlignment> alignment);
/**
* See the [Rust documentation for `try_new`](https://docs.rs/icu/2.0.0/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information.
*
* See the [Rust documentation for `DE`](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.DE.html) for more information.
*
* Additional information: [1](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.DE.html#method.with_alignment), [2](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.DE.html#method.for_length)
*/
inline static diplomat::result<std::unique_ptr<icu4x::DateFormatter>, icu4x::DateTimeFormatterLoadError> create_de_with_provider(const icu4x::DataProvider& provider, const icu4x::Locale& locale, std::optional<icu4x::DateTimeLength> length, std::optional<icu4x::DateTimeAlignment> alignment);
/**
* See the [Rust documentation for `try_new`](https://docs.rs/icu/2.0.0/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information.
*
* See the [Rust documentation for `MDE`](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.MDE.html) for more information.
*
* Additional information: [1](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.MDE.html#method.with_alignment), [2](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.MDE.html#method.for_length)
*/
inline static diplomat::result<std::unique_ptr<icu4x::DateFormatter>, icu4x::DateTimeFormatterLoadError> create_mde(const icu4x::Locale& locale, std::optional<icu4x::DateTimeLength> length, std::optional<icu4x::DateTimeAlignment> alignment);
/**
* See the [Rust documentation for `try_new`](https://docs.rs/icu/2.0.0/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information.
*
* See the [Rust documentation for `MDE`](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.MDE.html) for more information.
*
* Additional information: [1](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.MDE.html#method.with_alignment), [2](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.MDE.html#method.for_length)
*/
inline static diplomat::result<std::unique_ptr<icu4x::DateFormatter>, icu4x::DateTimeFormatterLoadError> create_mde_with_provider(const icu4x::DataProvider& provider, const icu4x::Locale& locale, std::optional<icu4x::DateTimeLength> length, std::optional<icu4x::DateTimeAlignment> alignment);
/**
* See the [Rust documentation for `try_new`](https://docs.rs/icu/2.0.0/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information.
*
* See the [Rust documentation for `YMDE`](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.YMDE.html) for more information.
*
* Additional information: [1](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.YMDE.html#method.with_alignment), [2](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.YMDE.html#method.with_year_style), [3](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.YMDE.html#method.for_length)
*/
inline static diplomat::result<std::unique_ptr<icu4x::DateFormatter>, icu4x::DateTimeFormatterLoadError> create_ymde(const icu4x::Locale& locale, std::optional<icu4x::DateTimeLength> length, std::optional<icu4x::DateTimeAlignment> alignment, std::optional<icu4x::YearStyle> year_style);
/**
* See the [Rust documentation for `try_new`](https://docs.rs/icu/2.0.0/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information.
*
* See the [Rust documentation for `YMDE`](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.YMDE.html) for more information.
*
* Additional information: [1](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.YMDE.html#method.with_alignment), [2](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.YMDE.html#method.with_year_style), [3](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.YMDE.html#method.for_length)
*/
inline static diplomat::result<std::unique_ptr<icu4x::DateFormatter>, icu4x::DateTimeFormatterLoadError> create_ymde_with_provider(const icu4x::DataProvider& provider, const icu4x::Locale& locale, std::optional<icu4x::DateTimeLength> length, std::optional<icu4x::DateTimeAlignment> alignment, std::optional<icu4x::YearStyle> year_style);
/**
* See the [Rust documentation for `try_new`](https://docs.rs/icu/2.0.0/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information.
*
* See the [Rust documentation for `E`](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.E.html) for more information.
*
* Additional information: [1](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.E.html#method.for_length)
*/
inline static diplomat::result<std::unique_ptr<icu4x::DateFormatter>, icu4x::DateTimeFormatterLoadError> create_e(const icu4x::Locale& locale, std::optional<icu4x::DateTimeLength> length);
/**
* See the [Rust documentation for `try_new`](https://docs.rs/icu/2.0.0/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information.
*
* See the [Rust documentation for `E`](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.E.html) for more information.
*
* Additional information: [1](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.E.html#method.for_length)
*/
inline static diplomat::result<std::unique_ptr<icu4x::DateFormatter>, icu4x::DateTimeFormatterLoadError> create_e_with_provider(const icu4x::DataProvider& provider, const icu4x::Locale& locale, std::optional<icu4x::DateTimeLength> length);
/**
* See the [Rust documentation for `try_new`](https://docs.rs/icu/2.0.0/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information.
*
* See the [Rust documentation for `M`](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.M.html) for more information.
*
* Additional information: [1](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.M.html#method.with_alignment), [2](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.M.html#method.for_length)
*/
inline static diplomat::result<std::unique_ptr<icu4x::DateFormatter>, icu4x::DateTimeFormatterLoadError> create_m(const icu4x::Locale& locale, std::optional<icu4x::DateTimeLength> length, std::optional<icu4x::DateTimeAlignment> alignment);
/**
* See the [Rust documentation for `try_new`](https://docs.rs/icu/2.0.0/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information.
*
* See the [Rust documentation for `M`](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.M.html) for more information.
*
* Additional information: [1](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.M.html#method.with_alignment), [2](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.M.html#method.for_length)
*/
inline static diplomat::result<std::unique_ptr<icu4x::DateFormatter>, icu4x::DateTimeFormatterLoadError> create_m_with_provider(const icu4x::DataProvider& provider, const icu4x::Locale& locale, std::optional<icu4x::DateTimeLength> length, std::optional<icu4x::DateTimeAlignment> alignment);
/**
* See the [Rust documentation for `try_new`](https://docs.rs/icu/2.0.0/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information.
*
* See the [Rust documentation for `YM`](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.YM.html) for more information.
*
* Additional information: [1](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.YM.html#method.with_alignment), [2](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.YM.html#method.with_year_style), [3](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.YM.html#method.for_length)
*/
inline static diplomat::result<std::unique_ptr<icu4x::DateFormatter>, icu4x::DateTimeFormatterLoadError> create_ym(const icu4x::Locale& locale, std::optional<icu4x::DateTimeLength> length, std::optional<icu4x::DateTimeAlignment> alignment, std::optional<icu4x::YearStyle> year_style);
/**
* See the [Rust documentation for `try_new`](https://docs.rs/icu/2.0.0/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information.
*
* See the [Rust documentation for `YM`](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.YM.html) for more information.
*
* Additional information: [1](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.YM.html#method.with_alignment), [2](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.YM.html#method.with_year_style), [3](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.YM.html#method.for_length)
*/
inline static diplomat::result<std::unique_ptr<icu4x::DateFormatter>, icu4x::DateTimeFormatterLoadError> create_ym_with_provider(const icu4x::DataProvider& provider, const icu4x::Locale& locale, std::optional<icu4x::DateTimeLength> length, std::optional<icu4x::DateTimeAlignment> alignment, std::optional<icu4x::YearStyle> year_style);
/**
* See the [Rust documentation for `try_new`](https://docs.rs/icu/2.0.0/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information.
*
* See the [Rust documentation for `Y`](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.Y.html) for more information.
*
* Additional information: [1](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.Y.html#method.with_alignment), [2](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.Y.html#method.with_year_style), [3](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.Y.html#method.for_length)
*/
inline static diplomat::result<std::unique_ptr<icu4x::DateFormatter>, icu4x::DateTimeFormatterLoadError> create_y(const icu4x::Locale& locale, std::optional<icu4x::DateTimeLength> length, std::optional<icu4x::DateTimeAlignment> alignment, std::optional<icu4x::YearStyle> year_style);
/**
* See the [Rust documentation for `try_new`](https://docs.rs/icu/2.0.0/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information.
*
* See the [Rust documentation for `Y`](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.Y.html) for more information.
*
* Additional information: [1](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.Y.html#method.with_alignment), [2](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.Y.html#method.with_year_style), [3](https://docs.rs/icu/2.0.0/icu/datetime/fieldsets/struct.Y.html#method.for_length)
*/
inline static diplomat::result<std::unique_ptr<icu4x::DateFormatter>, icu4x::DateTimeFormatterLoadError> create_y_with_provider(const icu4x::DataProvider& provider, const icu4x::Locale& locale, std::optional<icu4x::DateTimeLength> length, std::optional<icu4x::DateTimeAlignment> alignment, std::optional<icu4x::YearStyle> year_style);
/**
* See the [Rust documentation for `format`](https://docs.rs/icu/2.0.0/icu/datetime/struct.DateTimeFormatter.html#method.format) for more information.
*/
inline std::string format_iso(const icu4x::IsoDate& iso_date) const;
/**
* See the [Rust documentation for `format_same_calendar`](https://docs.rs/icu/2.0.0/icu/datetime/struct.DateTimeFormatter.html#method.format_same_calendar) for more information.
*/
inline diplomat::result<std::string, icu4x::DateTimeMismatchedCalendarError> format_same_calendar(const icu4x::Date& date) const;
inline const icu4x::capi::DateFormatter* AsFFI() const;
inline icu4x::capi::DateFormatter* AsFFI();
inline static const icu4x::DateFormatter* FromFFI(const icu4x::capi::DateFormatter* ptr);
inline static icu4x::DateFormatter* FromFFI(icu4x::capi::DateFormatter* ptr);
inline static void operator delete(void* ptr);
private:
DateFormatter() = delete;
DateFormatter(const icu4x::DateFormatter&) = delete;
DateFormatter(icu4x::DateFormatter&&) noexcept = delete;
DateFormatter operator=(const icu4x::DateFormatter&) = delete;
DateFormatter operator=(icu4x::DateFormatter&&) noexcept = delete;
static void operator delete[](void*, size_t) = delete;
};
} // namespace
#endif // icu4x_DateFormatter_D_HPP