ICU4X
International Components for Unicode
Loading...
Searching...
No Matches
DateTimeMismatchedCalendarError.hpp
Go to the documentation of this file.
1#ifndef ICU4X_DateTimeMismatchedCalendarError_HPP
2#define ICU4X_DateTimeMismatchedCalendarError_HPP
3
5
6#include <stdio.h>
7#include <stdint.h>
8#include <stddef.h>
9#include <stdbool.h>
10#include <memory>
11#include <functional>
12#include <optional>
13#include <cstdlib>
14#include "CalendarKind.hpp"
15#include "diplomat_runtime.hpp"
16
17
18namespace icu4x {
19namespace capi {
20
21} // namespace capi
22} // namespace
23
24
25inline icu4x::capi::DateTimeMismatchedCalendarError icu4x::DateTimeMismatchedCalendarError::AsFFI() const {
26 return icu4x::capi::DateTimeMismatchedCalendarError {
27 /* .this_kind = */ this_kind.AsFFI(),
28 /* .date_kind = */ date_kind.has_value() ? (icu4x::capi::CalendarKind_option{ { date_kind.value().AsFFI() }, true }) : (icu4x::capi::CalendarKind_option{ {}, false }),
29 };
30}
31
32inline icu4x::DateTimeMismatchedCalendarError icu4x::DateTimeMismatchedCalendarError::FromFFI(icu4x::capi::DateTimeMismatchedCalendarError c_struct) {
33 return icu4x::DateTimeMismatchedCalendarError {
34 /* .this_kind = */ icu4x::CalendarKind::FromFFI(c_struct.this_kind),
35 /* .date_kind = */ c_struct.date_kind.is_ok ? std::optional(icu4x::CalendarKind::FromFFI(c_struct.date_kind.ok)) : std::nullopt,
36 };
37}
38
39
40#endif // ICU4X_DateTimeMismatchedCalendarError_HPP
Definition Bidi.d.hpp:13
std::optional< icu4x::CalendarKind > date_kind
Definition DateTimeMismatchedCalendarError.d.hpp:38
icu4x::CalendarKind this_kind
Definition DateTimeMismatchedCalendarError.d.hpp:37