1#ifndef icu4x_ZonedDateTime_HPP
2#define icu4x_ZonedDateTime_HPP
28 typedef struct icu4x_ZonedDateTime_full_from_string_mv1_result {
union {icu4x::capi::ZonedDateTime ok; icu4x::capi::Rfc9557ParseError err;};
bool is_ok;} icu4x_ZonedDateTime_full_from_string_mv1_result;
29 icu4x_ZonedDateTime_full_from_string_mv1_result icu4x_ZonedDateTime_full_from_string_mv1(diplomat::capi::DiplomatStringView v,
const icu4x::capi::Calendar* calendar,
const icu4x::capi::IanaParser* iana_parser,
const icu4x::capi::VariantOffsetsCalculator* offset_calculator);
31 typedef struct icu4x_ZonedDateTime_location_only_from_string_mv1_result {
union {icu4x::capi::ZonedDateTime ok; icu4x::capi::Rfc9557ParseError err;};
bool is_ok;} icu4x_ZonedDateTime_location_only_from_string_mv1_result;
32 icu4x_ZonedDateTime_location_only_from_string_mv1_result icu4x_ZonedDateTime_location_only_from_string_mv1(diplomat::capi::DiplomatStringView v,
const icu4x::capi::Calendar* calendar,
const icu4x::capi::IanaParser* iana_parser);
34 typedef struct icu4x_ZonedDateTime_offset_only_from_string_mv1_result {
union {icu4x::capi::ZonedDateTime ok; icu4x::capi::Rfc9557ParseError err;};
bool is_ok;} icu4x_ZonedDateTime_offset_only_from_string_mv1_result;
35 icu4x_ZonedDateTime_offset_only_from_string_mv1_result icu4x_ZonedDateTime_offset_only_from_string_mv1(diplomat::capi::DiplomatStringView v,
const icu4x::capi::Calendar* calendar);
37 typedef struct icu4x_ZonedDateTime_lenient_from_string_mv1_result {
union {icu4x::capi::ZonedDateTime ok; icu4x::capi::Rfc9557ParseError err;};
bool is_ok;} icu4x_ZonedDateTime_lenient_from_string_mv1_result;
38 icu4x_ZonedDateTime_lenient_from_string_mv1_result icu4x_ZonedDateTime_lenient_from_string_mv1(diplomat::capi::DiplomatStringView v,
const icu4x::capi::Calendar* calendar,
const icu4x::capi::IanaParser* iana_parser);
45 auto result = icu4x::capi::icu4x_ZonedDateTime_full_from_string_mv1({v.data(), v.size()},
48 offset_calculator.AsFFI());
53 auto result = icu4x::capi::icu4x_ZonedDateTime_location_only_from_string_mv1({v.data(), v.size()},
60 auto result = icu4x::capi::icu4x_ZonedDateTime_offset_only_from_string_mv1({v.data(), v.size()},
66 auto result = icu4x::capi::icu4x_ZonedDateTime_lenient_from_string_mv1({v.data(), v.size()},
73inline icu4x::capi::ZonedDateTime icu4x::ZonedDateTime::AsFFI()
const {
74 return icu4x::capi::ZonedDateTime {
81inline icu4x::ZonedDateTime icu4x::ZonedDateTime::FromFFI(icu4x::capi::ZonedDateTime c_struct) {
82 return icu4x::ZonedDateTime {
83 std::unique_ptr<icu4x::Date>(icu4x::Date::FromFFI(c_struct.date)),
84 std::unique_ptr<icu4x::Time>(icu4x::Time::FromFFI(c_struct.time)),
85 std::unique_ptr<icu4x::TimeZoneInfo>(icu4x::TimeZoneInfo::FromFFI(c_struct.zone)),
Definition diplomat_runtime.hpp:140
Definition Calendar.d.hpp:34
Definition IanaParser.d.hpp:42
Definition VariantOffsetsCalculator.d.hpp:40
Definition diplomat_runtime.hpp:125
Definition diplomat_runtime.hpp:111
static diplomat::result< icu4x::ZonedDateTime, icu4x::Rfc9557ParseError > location_only_from_string(std::string_view v, const icu4x::Calendar &calendar, const icu4x::IanaParser &iana_parser)
Definition ZonedDateTime.hpp:52
static diplomat::result< icu4x::ZonedDateTime, icu4x::Rfc9557ParseError > lenient_from_string(std::string_view v, const icu4x::Calendar &calendar, const icu4x::IanaParser &iana_parser)
Definition ZonedDateTime.hpp:65
static diplomat::result< icu4x::ZonedDateTime, icu4x::Rfc9557ParseError > offset_only_from_string(std::string_view v, const icu4x::Calendar &calendar)
Definition ZonedDateTime.hpp:59
static diplomat::result< icu4x::ZonedDateTime, icu4x::Rfc9557ParseError > full_from_string(std::string_view v, const icu4x::Calendar &calendar, const icu4x::IanaParser &iana_parser, const icu4x::VariantOffsetsCalculator &offset_calculator)
Definition ZonedDateTime.hpp:44