TimeZoneAndCanonical.d.hpp (1196B)
1 #ifndef icu4x_TimeZoneAndCanonical_D_HPP 2 #define icu4x_TimeZoneAndCanonical_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 TimeZone; } 16 class TimeZone; 17 } 18 19 20 namespace icu4x { 21 namespace capi { 22 struct TimeZoneAndCanonical { 23 icu4x::capi::TimeZone* time_zone; 24 diplomat::capi::DiplomatStringView canonical; 25 }; 26 27 typedef struct TimeZoneAndCanonical_option {union { TimeZoneAndCanonical ok; }; bool is_ok; } TimeZoneAndCanonical_option; 28 } // namespace capi 29 } // namespace 30 31 32 namespace icu4x { 33 /** 34 * See the [Rust documentation for `TimeZoneAndCanonical`](https://docs.rs/icu/latest/icu/time/zone/iana/struct.TimeZoneAndCanonical.html) for more information. 35 */ 36 struct TimeZoneAndCanonical { 37 std::unique_ptr<icu4x::TimeZone> time_zone; 38 std::string_view canonical; 39 40 inline icu4x::capi::TimeZoneAndCanonical AsFFI() const; 41 inline static icu4x::TimeZoneAndCanonical FromFFI(icu4x::capi::TimeZoneAndCanonical c_struct); 42 }; 43 44 } // namespace 45 #endif // icu4x_TimeZoneAndCanonical_D_HPP