tor-browser

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

DateTimeMismatchedCalendarError.hpp (1339B)


      1 #ifndef icu4x_DateTimeMismatchedCalendarError_HPP
      2 #define icu4x_DateTimeMismatchedCalendarError_HPP
      3 
      4 #include "DateTimeMismatchedCalendarError.d.hpp"
      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 "../diplomat_runtime.hpp"
     15 #include "CalendarKind.hpp"
     16 
     17 
     18 namespace icu4x {
     19 namespace capi {
     20    extern "C" {
     21 
     22    } // extern "C"
     23 } // namespace capi
     24 } // namespace
     25 
     26 
     27 inline icu4x::capi::DateTimeMismatchedCalendarError icu4x::DateTimeMismatchedCalendarError::AsFFI() const {
     28  return icu4x::capi::DateTimeMismatchedCalendarError {
     29    /* .this_kind = */ this_kind.AsFFI(),
     30    /* .date_kind = */ date_kind.has_value() ? (icu4x::capi::CalendarKind_option{ { date_kind.value().AsFFI() }, true }) : (icu4x::capi::CalendarKind_option{ {}, false }),
     31  };
     32 }
     33 
     34 inline icu4x::DateTimeMismatchedCalendarError icu4x::DateTimeMismatchedCalendarError::FromFFI(icu4x::capi::DateTimeMismatchedCalendarError c_struct) {
     35  return icu4x::DateTimeMismatchedCalendarError {
     36    /* .this_kind = */ icu4x::CalendarKind::FromFFI(c_struct.this_kind),
     37    /* .date_kind = */ c_struct.date_kind.is_ok ? std::optional(icu4x::CalendarKind::FromFFI(c_struct.date_kind.ok)) : std::nullopt,
     38  };
     39 }
     40 
     41 
     42 #endif // icu4x_DateTimeMismatchedCalendarError_HPP