diff --git a/ffi/capi/bindings/c/ICU4XBidi.h b/ffi/capi/bindings/c/ICU4XBidi.h index 26187beb820..64e9577ed60 100644 --- a/ffi/capi/bindings/c/ICU4XBidi.h +++ b/ffi/capi/bindings/c/ICU4XBidi.h @@ -12,7 +12,7 @@ #include "ICU4XDataProvider.h" #include "ICU4XReorderedIndexMap.d.h" #include "ICU4XReorderedIndexMap.h" -#include "diplomat_result_box_ICU4XBidi_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XBidi_ICU4XDataError.d.h" #include "ICU4XBidi.d.h" @@ -22,7 +22,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XBidi_ICU4XError ICU4XBidi_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XBidi_ICU4XDataError ICU4XBidi_create(const ICU4XDataProvider* provider); ICU4XBidiInfo* ICU4XBidi_for_text(const ICU4XBidi* self, const char* text_data, size_t text_len, uint8_t default_level); diff --git a/ffi/capi/bindings/c/ICU4XCalendar.h b/ffi/capi/bindings/c/ICU4XCalendar.h index b3e735a2900..397126a3841 100644 --- a/ffi/capi/bindings/c/ICU4XCalendar.h +++ b/ffi/capi/bindings/c/ICU4XCalendar.h @@ -12,7 +12,7 @@ #include "ICU4XDataProvider.h" #include "ICU4XLocale.d.h" #include "ICU4XLocale.h" -#include "diplomat_result_box_ICU4XCalendar_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XCalendar_ICU4XDataError.d.h" #include "ICU4XCalendar.d.h" @@ -22,9 +22,9 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XCalendar_ICU4XError ICU4XCalendar_create_for_locale(const ICU4XDataProvider* provider, const ICU4XLocale* locale); +diplomat_result_box_ICU4XCalendar_ICU4XDataError ICU4XCalendar_create_for_locale(const ICU4XDataProvider* provider, const ICU4XLocale* locale); -diplomat_result_box_ICU4XCalendar_ICU4XError ICU4XCalendar_create_for_kind(const ICU4XDataProvider* provider, ICU4XAnyCalendarKind kind); +diplomat_result_box_ICU4XCalendar_ICU4XDataError ICU4XCalendar_create_for_kind(const ICU4XDataProvider* provider, ICU4XAnyCalendarKind kind); ICU4XAnyCalendarKind ICU4XCalendar_kind(const ICU4XCalendar* self); diff --git a/ffi/capi/bindings/c/ICU4XCalendarError.d.h b/ffi/capi/bindings/c/ICU4XCalendarError.d.h new file mode 100644 index 00000000000..3d896ab5f6a --- /dev/null +++ b/ffi/capi/bindings/c/ICU4XCalendarError.d.h @@ -0,0 +1,29 @@ +#ifndef ICU4XCalendarError_D_H +#define ICU4XCalendarError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef enum ICU4XCalendarError { + ICU4XCalendarError_Unknown = 0, + ICU4XCalendarError_OutOfRange = 1, + ICU4XCalendarError_UnknownEra = 2, + ICU4XCalendarError_UnknownMonthCode = 3, +} ICU4XCalendarError; + + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // ICU4XCalendarError_D_H diff --git a/ffi/capi/bindings/c/ICU4XCalendarError.h b/ffi/capi/bindings/c/ICU4XCalendarError.h new file mode 100644 index 00000000000..1781db635b6 --- /dev/null +++ b/ffi/capi/bindings/c/ICU4XCalendarError.h @@ -0,0 +1,26 @@ +#ifndef ICU4XCalendarError_H +#define ICU4XCalendarError_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + +#include "ICU4XCalendarError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +// No Content + + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // ICU4XCalendarError_H diff --git a/ffi/capi/bindings/c/ICU4XCanonicalCombiningClassMap.h b/ffi/capi/bindings/c/ICU4XCanonicalCombiningClassMap.h index bea5928bbc4..bd392840a98 100644 --- a/ffi/capi/bindings/c/ICU4XCanonicalCombiningClassMap.h +++ b/ffi/capi/bindings/c/ICU4XCanonicalCombiningClassMap.h @@ -8,7 +8,7 @@ #include "diplomat_runtime.h" #include "ICU4XDataProvider.d.h" #include "ICU4XDataProvider.h" -#include "diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XDataError.d.h" #include "ICU4XCanonicalCombiningClassMap.d.h" @@ -18,7 +18,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError ICU4XCanonicalCombiningClassMap_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XDataError ICU4XCanonicalCombiningClassMap_create(const ICU4XDataProvider* provider); uint8_t ICU4XCanonicalCombiningClassMap_get(const ICU4XCanonicalCombiningClassMap* self, char32_t ch); diff --git a/ffi/capi/bindings/c/ICU4XCanonicalComposition.h b/ffi/capi/bindings/c/ICU4XCanonicalComposition.h index ffa176fc257..28a4e2322ef 100644 --- a/ffi/capi/bindings/c/ICU4XCanonicalComposition.h +++ b/ffi/capi/bindings/c/ICU4XCanonicalComposition.h @@ -8,7 +8,7 @@ #include "diplomat_runtime.h" #include "ICU4XDataProvider.d.h" #include "ICU4XDataProvider.h" -#include "diplomat_result_box_ICU4XCanonicalComposition_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XCanonicalComposition_ICU4XDataError.d.h" #include "ICU4XCanonicalComposition.d.h" @@ -18,7 +18,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XCanonicalComposition_ICU4XError ICU4XCanonicalComposition_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCanonicalComposition_ICU4XDataError ICU4XCanonicalComposition_create(const ICU4XDataProvider* provider); char32_t ICU4XCanonicalComposition_compose(const ICU4XCanonicalComposition* self, char32_t starter, char32_t second); diff --git a/ffi/capi/bindings/c/ICU4XCanonicalDecomposition.h b/ffi/capi/bindings/c/ICU4XCanonicalDecomposition.h index b6c804557e8..1a8f3f622eb 100644 --- a/ffi/capi/bindings/c/ICU4XCanonicalDecomposition.h +++ b/ffi/capi/bindings/c/ICU4XCanonicalDecomposition.h @@ -10,7 +10,7 @@ #include "ICU4XDataProvider.h" #include "ICU4XDecomposed.d.h" #include "ICU4XDecomposed.h" -#include "diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XDataError.d.h" #include "ICU4XCanonicalDecomposition.d.h" @@ -20,7 +20,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError ICU4XCanonicalDecomposition_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XDataError ICU4XCanonicalDecomposition_create(const ICU4XDataProvider* provider); ICU4XDecomposed ICU4XCanonicalDecomposition_decompose(const ICU4XCanonicalDecomposition* self, char32_t c); diff --git a/ffi/capi/bindings/c/ICU4XCaseMapCloser.h b/ffi/capi/bindings/c/ICU4XCaseMapCloser.h index 85173039ff8..56a0223da6d 100644 --- a/ffi/capi/bindings/c/ICU4XCaseMapCloser.h +++ b/ffi/capi/bindings/c/ICU4XCaseMapCloser.h @@ -10,7 +10,7 @@ #include "ICU4XCodePointSetBuilder.h" #include "ICU4XDataProvider.d.h" #include "ICU4XDataProvider.h" -#include "diplomat_result_box_ICU4XCaseMapCloser_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XCaseMapCloser_ICU4XDataError.d.h" #include "ICU4XCaseMapCloser.d.h" @@ -20,7 +20,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XCaseMapCloser_ICU4XError ICU4XCaseMapCloser_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCaseMapCloser_ICU4XDataError ICU4XCaseMapCloser_create(const ICU4XDataProvider* provider); void ICU4XCaseMapCloser_add_case_closure_to(const ICU4XCaseMapCloser* self, char32_t c, ICU4XCodePointSetBuilder* builder); diff --git a/ffi/capi/bindings/c/ICU4XCaseMapper.h b/ffi/capi/bindings/c/ICU4XCaseMapper.h index d278dd38e56..93f101239b0 100644 --- a/ffi/capi/bindings/c/ICU4XCaseMapper.h +++ b/ffi/capi/bindings/c/ICU4XCaseMapper.h @@ -14,7 +14,7 @@ #include "ICU4XLocale.h" #include "ICU4XTitlecaseOptionsV1.d.h" #include "ICU4XTitlecaseOptionsV1.h" -#include "diplomat_result_box_ICU4XCaseMapper_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XCaseMapper_ICU4XDataError.d.h" #include "ICU4XCaseMapper.d.h" @@ -24,7 +24,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XCaseMapper_ICU4XError ICU4XCaseMapper_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCaseMapper_ICU4XDataError ICU4XCaseMapper_create(const ICU4XDataProvider* provider); void ICU4XCaseMapper_lowercase(const ICU4XCaseMapper* self, const char* s_data, size_t s_len, const ICU4XLocale* locale, DiplomatWrite* write); diff --git a/ffi/capi/bindings/c/ICU4XCodePointMapData16.h b/ffi/capi/bindings/c/ICU4XCodePointMapData16.h index 88d5a021c0d..b59d3ca94a2 100644 --- a/ffi/capi/bindings/c/ICU4XCodePointMapData16.h +++ b/ffi/capi/bindings/c/ICU4XCodePointMapData16.h @@ -12,7 +12,7 @@ #include "ICU4XCodePointSetData.h" #include "ICU4XDataProvider.d.h" #include "ICU4XDataProvider.h" -#include "diplomat_result_box_ICU4XCodePointMapData16_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XCodePointMapData16_ICU4XDataError.d.h" #include "ICU4XCodePointMapData16.d.h" @@ -32,7 +32,7 @@ ICU4XCodePointRangeIterator* ICU4XCodePointMapData16_iter_ranges_for_value_compl ICU4XCodePointSetData* ICU4XCodePointMapData16_get_set_for_value(const ICU4XCodePointMapData16* self, uint16_t value); -diplomat_result_box_ICU4XCodePointMapData16_ICU4XError ICU4XCodePointMapData16_load_script(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointMapData16_ICU4XDataError ICU4XCodePointMapData16_load_script(const ICU4XDataProvider* provider); void ICU4XCodePointMapData16_destroy(ICU4XCodePointMapData16* self); diff --git a/ffi/capi/bindings/c/ICU4XCodePointMapData8.h b/ffi/capi/bindings/c/ICU4XCodePointMapData8.h index 47576609dd4..cbe43ea8c33 100644 --- a/ffi/capi/bindings/c/ICU4XCodePointMapData8.h +++ b/ffi/capi/bindings/c/ICU4XCodePointMapData8.h @@ -12,7 +12,7 @@ #include "ICU4XCodePointSetData.h" #include "ICU4XDataProvider.d.h" #include "ICU4XDataProvider.h" -#include "diplomat_result_box_ICU4XCodePointMapData8_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError.d.h" #include "ICU4XCodePointMapData8.d.h" @@ -36,25 +36,25 @@ ICU4XCodePointRangeIterator* ICU4XCodePointMapData8_iter_ranges_for_mask(const I ICU4XCodePointSetData* ICU4XCodePointMapData8_get_set_for_value(const ICU4XCodePointMapData8* self, uint8_t value); -diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_general_category(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError ICU4XCodePointMapData8_load_general_category(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_bidi_class(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError ICU4XCodePointMapData8_load_bidi_class(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_east_asian_width(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError ICU4XCodePointMapData8_load_east_asian_width(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_hangul_syllable_type(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError ICU4XCodePointMapData8_load_hangul_syllable_type(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_indic_syllabic_category(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError ICU4XCodePointMapData8_load_indic_syllabic_category(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_line_break(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError ICU4XCodePointMapData8_load_line_break(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_try_grapheme_cluster_break(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError ICU4XCodePointMapData8_try_grapheme_cluster_break(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_word_break(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError ICU4XCodePointMapData8_load_word_break(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_sentence_break(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError ICU4XCodePointMapData8_load_sentence_break(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_joining_type(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError ICU4XCodePointMapData8_load_joining_type(const ICU4XDataProvider* provider); void ICU4XCodePointMapData8_destroy(ICU4XCodePointMapData8* self); diff --git a/ffi/capi/bindings/c/ICU4XCodePointSetData.h b/ffi/capi/bindings/c/ICU4XCodePointSetData.h index aff5a9fbaa4..73f62252d1a 100644 --- a/ffi/capi/bindings/c/ICU4XCodePointSetData.h +++ b/ffi/capi/bindings/c/ICU4XCodePointSetData.h @@ -10,6 +10,7 @@ #include "ICU4XCodePointRangeIterator.h" #include "ICU4XDataProvider.d.h" #include "ICU4XDataProvider.h" +#include "diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError.d.h" #include "diplomat_result_box_ICU4XCodePointSetData_ICU4XError.d.h" #include "ICU4XCodePointSetData.d.h" @@ -28,137 +29,137 @@ ICU4XCodePointRangeIterator* ICU4XCodePointSetData_iter_ranges(const ICU4XCodePo ICU4XCodePointRangeIterator* ICU4XCodePointSetData_iter_ranges_complemented(const ICU4XCodePointSetData* self); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_for_general_category_group(const ICU4XDataProvider* provider, uint32_t group); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_for_general_category_group(const ICU4XDataProvider* provider, uint32_t group); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_ascii_hex_digit(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_ascii_hex_digit(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_alnum(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_alnum(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_alphabetic(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_alphabetic(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_bidi_control(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_bidi_control(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_bidi_mirrored(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_bidi_mirrored(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_blank(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_blank(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_cased(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_cased(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_case_ignorable(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_case_ignorable(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_full_composition_exclusion(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_full_composition_exclusion(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_changes_when_casefolded(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_changes_when_casefolded(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_changes_when_casemapped(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_changes_when_casemapped(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_changes_when_nfkc_casefolded(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_changes_when_nfkc_casefolded(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_changes_when_lowercased(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_changes_when_lowercased(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_changes_when_titlecased(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_changes_when_titlecased(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_changes_when_uppercased(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_changes_when_uppercased(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_dash(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_dash(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_deprecated(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_deprecated(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_default_ignorable_code_point(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_default_ignorable_code_point(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_diacritic(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_diacritic(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_emoji_modifier_base(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_emoji_modifier_base(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_emoji_component(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_emoji_component(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_emoji_modifier(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_emoji_modifier(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_emoji(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_emoji(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_emoji_presentation(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_emoji_presentation(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_extender(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_extender(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_extended_pictographic(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_extended_pictographic(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_graph(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_graph(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_grapheme_base(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_grapheme_base(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_grapheme_extend(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_grapheme_extend(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_grapheme_link(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_grapheme_link(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_hex_digit(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_hex_digit(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_hyphen(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_hyphen(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_id_continue(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_id_continue(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_ideographic(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_ideographic(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_id_start(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_id_start(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_ids_binary_operator(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_ids_binary_operator(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_ids_trinary_operator(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_ids_trinary_operator(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_join_control(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_join_control(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_logical_order_exception(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_logical_order_exception(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_lowercase(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_lowercase(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_math(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_math(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_noncharacter_code_point(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_noncharacter_code_point(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_nfc_inert(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_nfc_inert(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_nfd_inert(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_nfd_inert(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_nfkc_inert(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_nfkc_inert(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_nfkd_inert(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_nfkd_inert(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_pattern_syntax(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_pattern_syntax(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_pattern_white_space(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_pattern_white_space(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_prepended_concatenation_mark(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_prepended_concatenation_mark(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_print(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_print(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_quotation_mark(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_quotation_mark(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_radical(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_radical(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_regional_indicator(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_regional_indicator(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_soft_dotted(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_soft_dotted(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_segment_starter(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_segment_starter(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_case_sensitive(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_case_sensitive(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_sentence_terminal(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_sentence_terminal(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_terminal_punctuation(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_terminal_punctuation(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_unified_ideograph(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_unified_ideograph(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_uppercase(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_uppercase(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_variation_selector(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_variation_selector(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_white_space(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_white_space(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_xdigit(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_xdigit(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_xid_continue(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_xid_continue(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_xid_start(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_xid_start(const ICU4XDataProvider* provider); diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_for_ecma262(const ICU4XDataProvider* provider, const char* property_name_data, size_t property_name_len); diff --git a/ffi/capi/bindings/c/ICU4XCollator.h b/ffi/capi/bindings/c/ICU4XCollator.h index 4eb3e1586be..0119e575c89 100644 --- a/ffi/capi/bindings/c/ICU4XCollator.h +++ b/ffi/capi/bindings/c/ICU4XCollator.h @@ -14,7 +14,7 @@ #include "ICU4XDataProvider.h" #include "ICU4XLocale.d.h" #include "ICU4XLocale.h" -#include "diplomat_result_box_ICU4XCollator_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XCollator_ICU4XDataError.d.h" #include "ICU4XCollator.d.h" @@ -24,7 +24,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XCollator_ICU4XError ICU4XCollator_create_v1(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XCollatorOptionsV1 options); +diplomat_result_box_ICU4XCollator_ICU4XDataError ICU4XCollator_create_v1(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XCollatorOptionsV1 options); int8_t ICU4XCollator_compare_utf16_(const ICU4XCollator* self, const char16_t* left_data, size_t left_len, const char16_t* right_data, size_t right_len); diff --git a/ffi/capi/bindings/c/ICU4XComposingNormalizer.h b/ffi/capi/bindings/c/ICU4XComposingNormalizer.h index b9831c2a65e..3aeae4aa3c3 100644 --- a/ffi/capi/bindings/c/ICU4XComposingNormalizer.h +++ b/ffi/capi/bindings/c/ICU4XComposingNormalizer.h @@ -8,7 +8,7 @@ #include "diplomat_runtime.h" #include "ICU4XDataProvider.d.h" #include "ICU4XDataProvider.h" -#include "diplomat_result_box_ICU4XComposingNormalizer_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XComposingNormalizer_ICU4XDataError.d.h" #include "ICU4XComposingNormalizer.d.h" @@ -18,9 +18,9 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XComposingNormalizer_ICU4XError ICU4XComposingNormalizer_create_nfc(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XComposingNormalizer_ICU4XDataError ICU4XComposingNormalizer_create_nfc(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XComposingNormalizer_ICU4XError ICU4XComposingNormalizer_create_nfkc(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XComposingNormalizer_ICU4XDataError ICU4XComposingNormalizer_create_nfkc(const ICU4XDataProvider* provider); void ICU4XComposingNormalizer_normalize(const ICU4XComposingNormalizer* self, const char* s_data, size_t s_len, DiplomatWrite* write); diff --git a/ffi/capi/bindings/c/ICU4XCustomTimeZone.h b/ffi/capi/bindings/c/ICU4XCustomTimeZone.h index 91c077986ad..1a7fdb1b765 100644 --- a/ffi/capi/bindings/c/ICU4XCustomTimeZone.h +++ b/ffi/capi/bindings/c/ICU4XCustomTimeZone.h @@ -13,9 +13,10 @@ #include "ICU4XTimeZoneIdMapper.d.h" #include "ICU4XTimeZoneIdMapper.h" #include "diplomat_result_bool_void.d.h" -#include "diplomat_result_box_ICU4XCustomTimeZone_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XCustomTimeZone_ICU4XTimeZoneInvalidOffsetError.d.h" #include "diplomat_result_int32_t_void.d.h" -#include "diplomat_result_void_ICU4XError.d.h" +#include "diplomat_result_void_ICU4XTimeZoneInvalidIdError.d.h" +#include "diplomat_result_void_ICU4XTimeZoneInvalidOffsetError.d.h" #include "diplomat_result_void_void.d.h" #include "ICU4XCustomTimeZone.d.h" @@ -26,7 +27,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XCustomTimeZone_ICU4XError ICU4XCustomTimeZone_create_from_string(const char* s_data, size_t s_len); +diplomat_result_box_ICU4XCustomTimeZone_ICU4XTimeZoneInvalidOffsetError ICU4XCustomTimeZone_create_from_string(const char* s_data, size_t s_len); ICU4XCustomTimeZone* ICU4XCustomTimeZone_create_empty(); @@ -36,7 +37,7 @@ ICU4XCustomTimeZone* ICU4XCustomTimeZone_create_gmt(); ICU4XCustomTimeZone* ICU4XCustomTimeZone_create_bst(); -diplomat_result_void_ICU4XError ICU4XCustomTimeZone_try_set_gmt_offset_seconds(ICU4XCustomTimeZone* self, int32_t offset_seconds); +diplomat_result_void_ICU4XTimeZoneInvalidOffsetError ICU4XCustomTimeZone_try_set_gmt_offset_seconds(ICU4XCustomTimeZone* self, int32_t offset_seconds); void ICU4XCustomTimeZone_clear_gmt_offset(ICU4XCustomTimeZone* self); @@ -50,15 +51,15 @@ diplomat_result_bool_void ICU4XCustomTimeZone_gmt_offset_has_minutes(const ICU4X diplomat_result_bool_void ICU4XCustomTimeZone_gmt_offset_has_seconds(const ICU4XCustomTimeZone* self); -diplomat_result_void_ICU4XError ICU4XCustomTimeZone_try_set_time_zone_id(ICU4XCustomTimeZone* self, const char* id_data, size_t id_len); +diplomat_result_void_ICU4XTimeZoneInvalidIdError ICU4XCustomTimeZone_try_set_time_zone_id(ICU4XCustomTimeZone* self, const char* id_data, size_t id_len); -diplomat_result_void_ICU4XError ICU4XCustomTimeZone_try_set_iana_time_zone_id(ICU4XCustomTimeZone* self, const ICU4XTimeZoneIdMapper* mapper, const char* id_data, size_t id_len); +diplomat_result_void_ICU4XTimeZoneInvalidIdError ICU4XCustomTimeZone_try_set_iana_time_zone_id(ICU4XCustomTimeZone* self, const ICU4XTimeZoneIdMapper* mapper, const char* id_data, size_t id_len); void ICU4XCustomTimeZone_clear_time_zone_id(ICU4XCustomTimeZone* self); diplomat_result_void_void ICU4XCustomTimeZone_time_zone_id(const ICU4XCustomTimeZone* self, DiplomatWrite* write); -diplomat_result_void_ICU4XError ICU4XCustomTimeZone_try_set_metazone_id(ICU4XCustomTimeZone* self, const char* id_data, size_t id_len); +diplomat_result_void_ICU4XTimeZoneInvalidIdError ICU4XCustomTimeZone_try_set_metazone_id(ICU4XCustomTimeZone* self, const char* id_data, size_t id_len); void ICU4XCustomTimeZone_clear_metazone_id(ICU4XCustomTimeZone* self); diff --git a/ffi/capi/bindings/c/ICU4XDataError.d.h b/ffi/capi/bindings/c/ICU4XDataError.d.h new file mode 100644 index 00000000000..24d578e3559 --- /dev/null +++ b/ffi/capi/bindings/c/ICU4XDataError.d.h @@ -0,0 +1,41 @@ +#ifndef ICU4XDataError_D_H +#define ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef enum ICU4XDataError { + ICU4XDataError_Unknown = 0, + ICU4XDataError_MissingDataMarker = 1, + ICU4XDataError_MissingVariant = 2, + ICU4XDataError_MissingLocale = 3, + ICU4XDataError_NeedsVariant = 4, + ICU4XDataError_NeedsLocale = 5, + ICU4XDataError_ExtraneousLocale = 6, + ICU4XDataError_FilteredResource = 7, + ICU4XDataError_MismatchedType = 8, + ICU4XDataError_MissingPayload = 9, + ICU4XDataError_InvalidState = 10, + ICU4XDataError_Custom = 11, + ICU4XDataError_Io = 12, + ICU4XDataError_UnavailableBufferFormat = 13, + ICU4XDataError_MismatchedAnyBuffer = 14, + ICU4XDataError_DataStructValidityError = 15, +} ICU4XDataError; + + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/ICU4XDataError.h b/ffi/capi/bindings/c/ICU4XDataError.h new file mode 100644 index 00000000000..3270569f73f --- /dev/null +++ b/ffi/capi/bindings/c/ICU4XDataError.h @@ -0,0 +1,26 @@ +#ifndef ICU4XDataError_H +#define ICU4XDataError_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + +#include "ICU4XDataError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +// No Content + + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // ICU4XDataError_H diff --git a/ffi/capi/bindings/c/ICU4XDataProvider.h b/ffi/capi/bindings/c/ICU4XDataProvider.h index d1f4d2a7344..c80fd3f5824 100644 --- a/ffi/capi/bindings/c/ICU4XDataProvider.h +++ b/ffi/capi/bindings/c/ICU4XDataProvider.h @@ -8,8 +8,8 @@ #include "diplomat_runtime.h" #include "ICU4XLocaleFallbacker.d.h" #include "ICU4XLocaleFallbacker.h" -#include "diplomat_result_box_ICU4XDataProvider_ICU4XError.d.h" -#include "diplomat_result_void_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XDataProvider_ICU4XDataError.d.h" +#include "diplomat_result_void_ICU4XDataError.d.h" #include "ICU4XDataProvider.d.h" @@ -21,19 +21,19 @@ extern "C" { ICU4XDataProvider* ICU4XDataProvider_create_compiled(); -diplomat_result_box_ICU4XDataProvider_ICU4XError ICU4XDataProvider_create_fs(const char* path_data, size_t path_len); +diplomat_result_box_ICU4XDataProvider_ICU4XDataError ICU4XDataProvider_create_fs(const char* path_data, size_t path_len); -diplomat_result_box_ICU4XDataProvider_ICU4XError ICU4XDataProvider_create_from_byte_slice(const uint8_t* blob_data, size_t blob_len); +diplomat_result_box_ICU4XDataProvider_ICU4XDataError ICU4XDataProvider_create_from_byte_slice(const uint8_t* blob_data, size_t blob_len); ICU4XDataProvider* ICU4XDataProvider_create_empty(); -diplomat_result_void_ICU4XError ICU4XDataProvider_fork_by_key(ICU4XDataProvider* self, ICU4XDataProvider* other); +diplomat_result_void_ICU4XDataError ICU4XDataProvider_fork_by_key(ICU4XDataProvider* self, ICU4XDataProvider* other); -diplomat_result_void_ICU4XError ICU4XDataProvider_fork_by_locale(ICU4XDataProvider* self, ICU4XDataProvider* other); +diplomat_result_void_ICU4XDataError ICU4XDataProvider_fork_by_locale(ICU4XDataProvider* self, ICU4XDataProvider* other); -diplomat_result_void_ICU4XError ICU4XDataProvider_enable_locale_fallback(ICU4XDataProvider* self); +diplomat_result_void_ICU4XDataError ICU4XDataProvider_enable_locale_fallback(ICU4XDataProvider* self); -diplomat_result_void_ICU4XError ICU4XDataProvider_enable_locale_fallback_with(ICU4XDataProvider* self, const ICU4XLocaleFallbacker* fallbacker); +diplomat_result_void_ICU4XDataError ICU4XDataProvider_enable_locale_fallback_with(ICU4XDataProvider* self, const ICU4XLocaleFallbacker* fallbacker); void ICU4XDataProvider_destroy(ICU4XDataProvider* self); diff --git a/ffi/capi/bindings/c/ICU4XDataStruct.h b/ffi/capi/bindings/c/ICU4XDataStruct.h index fcb6051e1b5..3b98f7dee32 100644 --- a/ffi/capi/bindings/c/ICU4XDataStruct.h +++ b/ffi/capi/bindings/c/ICU4XDataStruct.h @@ -6,7 +6,7 @@ #include #include #include "diplomat_runtime.h" -#include "diplomat_result_box_ICU4XDataStruct_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XDataStruct_ICU4XDataError.d.h" #include "ICU4XDataStruct.d.h" @@ -16,7 +16,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XDataStruct_ICU4XError ICU4XDataStruct_create_decimal_symbols_v1(const char* plus_sign_prefix_data, size_t plus_sign_prefix_len, const char* plus_sign_suffix_data, size_t plus_sign_suffix_len, const char* minus_sign_prefix_data, size_t minus_sign_prefix_len, const char* minus_sign_suffix_data, size_t minus_sign_suffix_len, const char* decimal_separator_data, size_t decimal_separator_len, const char* grouping_separator_data, size_t grouping_separator_len, uint8_t primary_group_size, uint8_t secondary_group_size, uint8_t min_group_size, const char32_t* digits_data, size_t digits_len); +diplomat_result_box_ICU4XDataStruct_ICU4XDataError ICU4XDataStruct_create_decimal_symbols_v1(const char* plus_sign_prefix_data, size_t plus_sign_prefix_len, const char* plus_sign_suffix_data, size_t plus_sign_suffix_len, const char* minus_sign_prefix_data, size_t minus_sign_prefix_len, const char* minus_sign_suffix_data, size_t minus_sign_suffix_len, const char* decimal_separator_data, size_t decimal_separator_len, const char* grouping_separator_data, size_t grouping_separator_len, uint8_t primary_group_size, uint8_t secondary_group_size, uint8_t min_group_size, const char32_t* digits_data, size_t digits_len); void ICU4XDataStruct_destroy(ICU4XDataStruct* self); diff --git a/ffi/capi/bindings/c/ICU4XDate.h b/ffi/capi/bindings/c/ICU4XDate.h index 4013a8f9a89..edf7d0276c6 100644 --- a/ffi/capi/bindings/c/ICU4XDate.h +++ b/ffi/capi/bindings/c/ICU4XDate.h @@ -16,7 +16,7 @@ #include "ICU4XWeekCalculator.h" #include "ICU4XWeekOf.d.h" #include "ICU4XWeekOf.h" -#include "diplomat_result_box_ICU4XDate_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XDate_ICU4XCalendarError.d.h" #include "ICU4XDate.d.h" @@ -26,9 +26,9 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XDate_ICU4XError ICU4XDate_create_from_iso_in_calendar(int32_t year, uint8_t month, uint8_t day, const ICU4XCalendar* calendar); +diplomat_result_box_ICU4XDate_ICU4XCalendarError ICU4XDate_create_from_iso_in_calendar(int32_t year, uint8_t month, uint8_t day, const ICU4XCalendar* calendar); -diplomat_result_box_ICU4XDate_ICU4XError ICU4XDate_create_from_codes_in_calendar(const char* era_code_data, size_t era_code_len, int32_t year, const char* month_code_data, size_t month_code_len, uint8_t day, const ICU4XCalendar* calendar); +diplomat_result_box_ICU4XDate_ICU4XCalendarError ICU4XDate_create_from_codes_in_calendar(const char* era_code_data, size_t era_code_len, int32_t year, const char* month_code_data, size_t month_code_len, uint8_t day, const ICU4XCalendar* calendar); ICU4XDate* ICU4XDate_to_calendar(const ICU4XDate* self, const ICU4XCalendar* calendar); diff --git a/ffi/capi/bindings/c/ICU4XDateTime.h b/ffi/capi/bindings/c/ICU4XDateTime.h index 544e1a50a8d..0ecc65850b7 100644 --- a/ffi/capi/bindings/c/ICU4XDateTime.h +++ b/ffi/capi/bindings/c/ICU4XDateTime.h @@ -20,7 +20,7 @@ #include "ICU4XWeekCalculator.h" #include "ICU4XWeekOf.d.h" #include "ICU4XWeekOf.h" -#include "diplomat_result_box_ICU4XDateTime_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XDateTime_ICU4XCalendarError.d.h" #include "ICU4XDateTime.d.h" @@ -30,9 +30,9 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XDateTime_ICU4XError ICU4XDateTime_create_from_iso_in_calendar(int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond, const ICU4XCalendar* calendar); +diplomat_result_box_ICU4XDateTime_ICU4XCalendarError ICU4XDateTime_create_from_iso_in_calendar(int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond, const ICU4XCalendar* calendar); -diplomat_result_box_ICU4XDateTime_ICU4XError ICU4XDateTime_create_from_codes_in_calendar(const char* era_code_data, size_t era_code_len, int32_t year, const char* month_code_data, size_t month_code_len, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond, const ICU4XCalendar* calendar); +diplomat_result_box_ICU4XDateTime_ICU4XCalendarError ICU4XDateTime_create_from_codes_in_calendar(const char* era_code_data, size_t era_code_len, int32_t year, const char* month_code_data, size_t month_code_len, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond, const ICU4XCalendar* calendar); ICU4XDateTime* ICU4XDateTime_create_from_date_and_time(const ICU4XDate* date, const ICU4XTime* time); diff --git a/ffi/capi/bindings/c/ICU4XDecomposingNormalizer.h b/ffi/capi/bindings/c/ICU4XDecomposingNormalizer.h index 2a7317017af..3f1ab1f2323 100644 --- a/ffi/capi/bindings/c/ICU4XDecomposingNormalizer.h +++ b/ffi/capi/bindings/c/ICU4XDecomposingNormalizer.h @@ -8,7 +8,7 @@ #include "diplomat_runtime.h" #include "ICU4XDataProvider.d.h" #include "ICU4XDataProvider.h" -#include "diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XDataError.d.h" #include "ICU4XDecomposingNormalizer.d.h" @@ -18,9 +18,9 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError ICU4XDecomposingNormalizer_create_nfd(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XDataError ICU4XDecomposingNormalizer_create_nfd(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError ICU4XDecomposingNormalizer_create_nfkd(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XDataError ICU4XDecomposingNormalizer_create_nfkd(const ICU4XDataProvider* provider); void ICU4XDecomposingNormalizer_normalize(const ICU4XDecomposingNormalizer* self, const char* s_data, size_t s_len, DiplomatWrite* write); diff --git a/ffi/capi/bindings/c/ICU4XError.d.h b/ffi/capi/bindings/c/ICU4XError.d.h index ac61514aeed..2395114f6a0 100644 --- a/ffi/capi/bindings/c/ICU4XError.d.h +++ b/ffi/capi/bindings/c/ICU4XError.d.h @@ -29,17 +29,7 @@ typedef enum ICU4XError { ICU4XError_DataIoError = 267, ICU4XError_DataUnavailableBufferFormatError = 268, ICU4XError_DataMismatchedAnyBufferError = 269, - ICU4XError_LocaleParserLanguageError = 513, - ICU4XError_LocaleParserSubtagError = 514, - ICU4XError_LocaleParserExtensionError = 515, - ICU4XError_DataStructValidityError = 768, ICU4XError_PropertyUnexpectedPropertyNameError = 1026, - ICU4XError_FixedDecimalLimitError = 1280, - ICU4XError_FixedDecimalSyntaxError = 1281, - ICU4XError_PluralsParseError = 1536, - ICU4XError_CalendarOutOfRangeError = 1795, - ICU4XError_CalendarUnknownEraError = 1796, - ICU4XError_CalendarUnknownMonthCodeError = 1797, ICU4XError_DateTimePatternError = 2048, ICU4XError_DateTimeMissingInputFieldError = 2049, ICU4XError_DateTimeSkeletonError = 2050, @@ -49,8 +39,6 @@ typedef enum ICU4XError { ICU4XError_DateTimeMissingMonthSymbolError = 2054, ICU4XError_DateTimeFixedDecimalError = 2055, ICU4XError_DateTimeMismatchedCalendarError = 2056, - ICU4XError_TimeZoneInvalidOffsetError = 2561, - ICU4XError_TimeZoneInvalidIdError = 2563, } ICU4XError; diff --git a/ffi/capi/bindings/c/ICU4XFixedDecimal.h b/ffi/capi/bindings/c/ICU4XFixedDecimal.h index 307b1698f73..d4fc7a66153 100644 --- a/ffi/capi/bindings/c/ICU4XFixedDecimal.h +++ b/ffi/capi/bindings/c/ICU4XFixedDecimal.h @@ -12,7 +12,8 @@ #include "ICU4XFixedDecimalSign.h" #include "ICU4XFixedDecimalSignDisplay.d.h" #include "ICU4XFixedDecimalSignDisplay.h" -#include "diplomat_result_box_ICU4XFixedDecimal_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalLimitError.d.h" +#include "diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalParseError.d.h" #include "diplomat_result_void_void.d.h" #include "ICU4XFixedDecimal.d.h" @@ -31,15 +32,15 @@ ICU4XFixedDecimal* ICU4XFixedDecimal_create_from_i64(int64_t v); ICU4XFixedDecimal* ICU4XFixedDecimal_create_from_u64(uint64_t v); -diplomat_result_box_ICU4XFixedDecimal_ICU4XError ICU4XFixedDecimal_create_from_f64_with_integer_precision(double f); +diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalLimitError ICU4XFixedDecimal_create_from_f64_with_integer_precision(double f); -diplomat_result_box_ICU4XFixedDecimal_ICU4XError ICU4XFixedDecimal_create_from_f64_with_lower_magnitude(double f, int16_t magnitude); +diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalLimitError ICU4XFixedDecimal_create_from_f64_with_lower_magnitude(double f, int16_t magnitude); -diplomat_result_box_ICU4XFixedDecimal_ICU4XError ICU4XFixedDecimal_create_from_f64_with_significant_digits(double f, uint8_t digits); +diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalLimitError ICU4XFixedDecimal_create_from_f64_with_significant_digits(double f, uint8_t digits); -diplomat_result_box_ICU4XFixedDecimal_ICU4XError ICU4XFixedDecimal_create_from_f64_with_floating_precision(double f); +diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalLimitError ICU4XFixedDecimal_create_from_f64_with_floating_precision(double f); -diplomat_result_box_ICU4XFixedDecimal_ICU4XError ICU4XFixedDecimal_create_from_string(const char* v_data, size_t v_len); +diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalParseError ICU4XFixedDecimal_create_from_string(const char* v_data, size_t v_len); uint8_t ICU4XFixedDecimal_digit_at(const ICU4XFixedDecimal* self, int16_t magnitude); diff --git a/ffi/capi/bindings/c/ICU4XFixedDecimalFormatter.h b/ffi/capi/bindings/c/ICU4XFixedDecimalFormatter.h index 87105b09ffe..9950d306e08 100644 --- a/ffi/capi/bindings/c/ICU4XFixedDecimalFormatter.h +++ b/ffi/capi/bindings/c/ICU4XFixedDecimalFormatter.h @@ -16,7 +16,7 @@ #include "ICU4XFixedDecimalGroupingStrategy.h" #include "ICU4XLocale.d.h" #include "ICU4XLocale.h" -#include "diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XDataError.d.h" #include "ICU4XFixedDecimalFormatter.d.h" @@ -26,9 +26,9 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError ICU4XFixedDecimalFormatter_create_with_grouping_strategy(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XFixedDecimalGroupingStrategy grouping_strategy); +diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XDataError ICU4XFixedDecimalFormatter_create_with_grouping_strategy(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XFixedDecimalGroupingStrategy grouping_strategy); -diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError ICU4XFixedDecimalFormatter_create_with_decimal_symbols_v1(const ICU4XDataStruct* data_struct, ICU4XFixedDecimalGroupingStrategy grouping_strategy); +diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XDataError ICU4XFixedDecimalFormatter_create_with_decimal_symbols_v1(const ICU4XDataStruct* data_struct, ICU4XFixedDecimalGroupingStrategy grouping_strategy); void ICU4XFixedDecimalFormatter_format(const ICU4XFixedDecimalFormatter* self, const ICU4XFixedDecimal* value, DiplomatWrite* write); diff --git a/ffi/capi/bindings/c/ICU4XFixedDecimalLimitError.d.h b/ffi/capi/bindings/c/ICU4XFixedDecimalLimitError.d.h new file mode 100644 index 00000000000..bf4543c6597 --- /dev/null +++ b/ffi/capi/bindings/c/ICU4XFixedDecimalLimitError.d.h @@ -0,0 +1,26 @@ +#ifndef ICU4XFixedDecimalLimitError_D_H +#define ICU4XFixedDecimalLimitError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef enum ICU4XFixedDecimalLimitError { + ICU4XFixedDecimalLimitError_TodoZst = 0, +} ICU4XFixedDecimalLimitError; + + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // ICU4XFixedDecimalLimitError_D_H diff --git a/ffi/capi/bindings/c/ICU4XFixedDecimalLimitError.h b/ffi/capi/bindings/c/ICU4XFixedDecimalLimitError.h new file mode 100644 index 00000000000..5d157f744bc --- /dev/null +++ b/ffi/capi/bindings/c/ICU4XFixedDecimalLimitError.h @@ -0,0 +1,26 @@ +#ifndef ICU4XFixedDecimalLimitError_H +#define ICU4XFixedDecimalLimitError_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + +#include "ICU4XFixedDecimalLimitError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +// No Content + + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // ICU4XFixedDecimalLimitError_H diff --git a/ffi/capi/bindings/c/ICU4XFixedDecimalParseError.d.h b/ffi/capi/bindings/c/ICU4XFixedDecimalParseError.d.h new file mode 100644 index 00000000000..257ec18adf8 --- /dev/null +++ b/ffi/capi/bindings/c/ICU4XFixedDecimalParseError.d.h @@ -0,0 +1,28 @@ +#ifndef ICU4XFixedDecimalParseError_D_H +#define ICU4XFixedDecimalParseError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef enum ICU4XFixedDecimalParseError { + ICU4XFixedDecimalParseError_Unknown = 0, + ICU4XFixedDecimalParseError_Limit = 1, + ICU4XFixedDecimalParseError_Syntax = 2, +} ICU4XFixedDecimalParseError; + + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // ICU4XFixedDecimalParseError_D_H diff --git a/ffi/capi/bindings/c/ICU4XFixedDecimalParseError.h b/ffi/capi/bindings/c/ICU4XFixedDecimalParseError.h new file mode 100644 index 00000000000..ddca494e725 --- /dev/null +++ b/ffi/capi/bindings/c/ICU4XFixedDecimalParseError.h @@ -0,0 +1,26 @@ +#ifndef ICU4XFixedDecimalParseError_H +#define ICU4XFixedDecimalParseError_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + +#include "ICU4XFixedDecimalParseError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +// No Content + + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // ICU4XFixedDecimalParseError_H diff --git a/ffi/capi/bindings/c/ICU4XGeneralCategoryNameToMaskMapper.h b/ffi/capi/bindings/c/ICU4XGeneralCategoryNameToMaskMapper.h index bc05d09763b..7914dd03683 100644 --- a/ffi/capi/bindings/c/ICU4XGeneralCategoryNameToMaskMapper.h +++ b/ffi/capi/bindings/c/ICU4XGeneralCategoryNameToMaskMapper.h @@ -8,7 +8,7 @@ #include "diplomat_runtime.h" #include "ICU4XDataProvider.d.h" #include "ICU4XDataProvider.h" -#include "diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XDataError.d.h" #include "ICU4XGeneralCategoryNameToMaskMapper.d.h" @@ -22,7 +22,7 @@ uint32_t ICU4XGeneralCategoryNameToMaskMapper_get_strict(const ICU4XGeneralCateg uint32_t ICU4XGeneralCategoryNameToMaskMapper_get_loose(const ICU4XGeneralCategoryNameToMaskMapper* self, const char* name_data, size_t name_len); -diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError ICU4XGeneralCategoryNameToMaskMapper_load(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XDataError ICU4XGeneralCategoryNameToMaskMapper_load(const ICU4XDataProvider* provider); void ICU4XGeneralCategoryNameToMaskMapper_destroy(ICU4XGeneralCategoryNameToMaskMapper* self); diff --git a/ffi/capi/bindings/c/ICU4XGraphemeClusterSegmenter.h b/ffi/capi/bindings/c/ICU4XGraphemeClusterSegmenter.h index ec9f9777f98..cbdcc973e4b 100644 --- a/ffi/capi/bindings/c/ICU4XGraphemeClusterSegmenter.h +++ b/ffi/capi/bindings/c/ICU4XGraphemeClusterSegmenter.h @@ -14,7 +14,7 @@ #include "ICU4XGraphemeClusterBreakIteratorUtf16.h" #include "ICU4XGraphemeClusterBreakIteratorUtf8.d.h" #include "ICU4XGraphemeClusterBreakIteratorUtf8.h" -#include "diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XDataError.d.h" #include "ICU4XGraphemeClusterSegmenter.d.h" @@ -24,7 +24,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError ICU4XGraphemeClusterSegmenter_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XDataError ICU4XGraphemeClusterSegmenter_create(const ICU4XDataProvider* provider); ICU4XGraphemeClusterBreakIteratorUtf8* ICU4XGraphemeClusterSegmenter_segment_utf8(const ICU4XGraphemeClusterSegmenter* self, const char* input_data, size_t input_len); diff --git a/ffi/capi/bindings/c/ICU4XIsoDate.h b/ffi/capi/bindings/c/ICU4XIsoDate.h index ed334930ab2..1af90675e15 100644 --- a/ffi/capi/bindings/c/ICU4XIsoDate.h +++ b/ffi/capi/bindings/c/ICU4XIsoDate.h @@ -16,7 +16,7 @@ #include "ICU4XWeekCalculator.h" #include "ICU4XWeekOf.d.h" #include "ICU4XWeekOf.h" -#include "diplomat_result_box_ICU4XIsoDate_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XIsoDate_ICU4XCalendarError.d.h" #include "ICU4XIsoDate.d.h" @@ -26,7 +26,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XIsoDate_ICU4XError ICU4XIsoDate_create(int32_t year, uint8_t month, uint8_t day); +diplomat_result_box_ICU4XIsoDate_ICU4XCalendarError ICU4XIsoDate_create(int32_t year, uint8_t month, uint8_t day); ICU4XIsoDate* ICU4XIsoDate_create_for_unix_epoch(); diff --git a/ffi/capi/bindings/c/ICU4XIsoDateTime.h b/ffi/capi/bindings/c/ICU4XIsoDateTime.h index db0d0896083..60ebc97f5d8 100644 --- a/ffi/capi/bindings/c/ICU4XIsoDateTime.h +++ b/ffi/capi/bindings/c/ICU4XIsoDateTime.h @@ -20,7 +20,7 @@ #include "ICU4XWeekCalculator.h" #include "ICU4XWeekOf.d.h" #include "ICU4XWeekOf.h" -#include "diplomat_result_box_ICU4XIsoDateTime_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XIsoDateTime_ICU4XCalendarError.d.h" #include "ICU4XIsoDateTime.d.h" @@ -30,7 +30,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XIsoDateTime_ICU4XError ICU4XIsoDateTime_create(int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond); +diplomat_result_box_ICU4XIsoDateTime_ICU4XCalendarError ICU4XIsoDateTime_create(int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond); ICU4XIsoDateTime* ICU4XIsoDateTime_crate_from_date_and_time(const ICU4XIsoDate* date, const ICU4XTime* time); diff --git a/ffi/capi/bindings/c/ICU4XLineSegmenter.h b/ffi/capi/bindings/c/ICU4XLineSegmenter.h index f9fbc6ec0c1..eb1bf074069 100644 --- a/ffi/capi/bindings/c/ICU4XLineSegmenter.h +++ b/ffi/capi/bindings/c/ICU4XLineSegmenter.h @@ -16,7 +16,7 @@ #include "ICU4XLineBreakIteratorUtf8.h" #include "ICU4XLineBreakOptionsV1.d.h" #include "ICU4XLineBreakOptionsV1.h" -#include "diplomat_result_box_ICU4XLineSegmenter_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError.d.h" #include "ICU4XLineSegmenter.d.h" @@ -26,17 +26,17 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XLineSegmenter_ICU4XError ICU4XLineSegmenter_create_auto(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError ICU4XLineSegmenter_create_auto(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XLineSegmenter_ICU4XError ICU4XLineSegmenter_create_lstm(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError ICU4XLineSegmenter_create_lstm(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XLineSegmenter_ICU4XError ICU4XLineSegmenter_create_dictionary(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError ICU4XLineSegmenter_create_dictionary(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XLineSegmenter_ICU4XError ICU4XLineSegmenter_create_auto_with_options_v1(const ICU4XDataProvider* provider, ICU4XLineBreakOptionsV1 options); +diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError ICU4XLineSegmenter_create_auto_with_options_v1(const ICU4XDataProvider* provider, ICU4XLineBreakOptionsV1 options); -diplomat_result_box_ICU4XLineSegmenter_ICU4XError ICU4XLineSegmenter_create_lstm_with_options_v1(const ICU4XDataProvider* provider, ICU4XLineBreakOptionsV1 options); +diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError ICU4XLineSegmenter_create_lstm_with_options_v1(const ICU4XDataProvider* provider, ICU4XLineBreakOptionsV1 options); -diplomat_result_box_ICU4XLineSegmenter_ICU4XError ICU4XLineSegmenter_create_dictionary_with_options_v1(const ICU4XDataProvider* provider, ICU4XLineBreakOptionsV1 options); +diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError ICU4XLineSegmenter_create_dictionary_with_options_v1(const ICU4XDataProvider* provider, ICU4XLineBreakOptionsV1 options); ICU4XLineBreakIteratorUtf8* ICU4XLineSegmenter_segment_utf8(const ICU4XLineSegmenter* self, const char* input_data, size_t input_len); diff --git a/ffi/capi/bindings/c/ICU4XListFormatter.h b/ffi/capi/bindings/c/ICU4XListFormatter.h index 33fe4116af1..4d35f3c8b7b 100644 --- a/ffi/capi/bindings/c/ICU4XListFormatter.h +++ b/ffi/capi/bindings/c/ICU4XListFormatter.h @@ -12,7 +12,7 @@ #include "ICU4XListLength.h" #include "ICU4XLocale.d.h" #include "ICU4XLocale.h" -#include "diplomat_result_box_ICU4XListFormatter_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XListFormatter_ICU4XDataError.d.h" #include "ICU4XListFormatter.d.h" @@ -22,11 +22,11 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XListFormatter_ICU4XError ICU4XListFormatter_create_and_with_length(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XListLength length); +diplomat_result_box_ICU4XListFormatter_ICU4XDataError ICU4XListFormatter_create_and_with_length(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XListLength length); -diplomat_result_box_ICU4XListFormatter_ICU4XError ICU4XListFormatter_create_or_with_length(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XListLength length); +diplomat_result_box_ICU4XListFormatter_ICU4XDataError ICU4XListFormatter_create_or_with_length(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XListLength length); -diplomat_result_box_ICU4XListFormatter_ICU4XError ICU4XListFormatter_create_unit_with_length(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XListLength length); +diplomat_result_box_ICU4XListFormatter_ICU4XDataError ICU4XListFormatter_create_unit_with_length(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XListLength length); void ICU4XListFormatter_format_valid_utf8(const ICU4XListFormatter* self, DiplomatStringsView* list_data, size_t list_len, DiplomatWrite* write); diff --git a/ffi/capi/bindings/c/ICU4XLocale.h b/ffi/capi/bindings/c/ICU4XLocale.h index b8a6dffccbc..ea99837cc6f 100644 --- a/ffi/capi/bindings/c/ICU4XLocale.h +++ b/ffi/capi/bindings/c/ICU4XLocale.h @@ -6,8 +6,8 @@ #include #include #include "diplomat_runtime.h" -#include "diplomat_result_box_ICU4XLocale_ICU4XError.d.h" -#include "diplomat_result_void_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XLocale_ICU4XLocaleParseError.d.h" +#include "diplomat_result_void_ICU4XLocaleParseError.d.h" #include "diplomat_result_void_void.d.h" #include "ICU4XLocale.d.h" @@ -18,7 +18,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XLocale_ICU4XError ICU4XLocale_create_from_string(const char* name_data, size_t name_len); +diplomat_result_box_ICU4XLocale_ICU4XLocaleParseError ICU4XLocale_create_from_string(const char* name_data, size_t name_len); ICU4XLocale* ICU4XLocale_create_und(); @@ -30,17 +30,17 @@ diplomat_result_void_void ICU4XLocale_get_unicode_extension(const ICU4XLocale* s void ICU4XLocale_language(const ICU4XLocale* self, DiplomatWrite* write); -diplomat_result_void_ICU4XError ICU4XLocale_set_language(ICU4XLocale* self, const char* bytes_data, size_t bytes_len); +diplomat_result_void_ICU4XLocaleParseError ICU4XLocale_set_language(ICU4XLocale* self, const char* bytes_data, size_t bytes_len); diplomat_result_void_void ICU4XLocale_region(const ICU4XLocale* self, DiplomatWrite* write); -diplomat_result_void_ICU4XError ICU4XLocale_set_region(ICU4XLocale* self, const char* bytes_data, size_t bytes_len); +diplomat_result_void_ICU4XLocaleParseError ICU4XLocale_set_region(ICU4XLocale* self, const char* bytes_data, size_t bytes_len); diplomat_result_void_void ICU4XLocale_script(const ICU4XLocale* self, DiplomatWrite* write); -diplomat_result_void_ICU4XError ICU4XLocale_set_script(ICU4XLocale* self, const char* bytes_data, size_t bytes_len); +diplomat_result_void_ICU4XLocaleParseError ICU4XLocale_set_script(ICU4XLocale* self, const char* bytes_data, size_t bytes_len); -diplomat_result_void_ICU4XError ICU4XLocale_canonicalize(const char* bytes_data, size_t bytes_len, DiplomatWrite* write); +diplomat_result_void_ICU4XLocaleParseError ICU4XLocale_canonicalize(const char* bytes_data, size_t bytes_len, DiplomatWrite* write); void ICU4XLocale_to_string(const ICU4XLocale* self, DiplomatWrite* write); diff --git a/ffi/capi/bindings/c/ICU4XLocaleDirectionality.h b/ffi/capi/bindings/c/ICU4XLocaleDirectionality.h index 3bcef417736..a3913ff944f 100644 --- a/ffi/capi/bindings/c/ICU4XLocaleDirectionality.h +++ b/ffi/capi/bindings/c/ICU4XLocaleDirectionality.h @@ -14,7 +14,7 @@ #include "ICU4XLocaleDirection.h" #include "ICU4XLocaleExpander.d.h" #include "ICU4XLocaleExpander.h" -#include "diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XLocaleDirectionality_ICU4XDataError.d.h" #include "ICU4XLocaleDirectionality.d.h" @@ -24,9 +24,9 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError ICU4XLocaleDirectionality_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XLocaleDirectionality_ICU4XDataError ICU4XLocaleDirectionality_create(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError ICU4XLocaleDirectionality_create_with_expander(const ICU4XDataProvider* provider, const ICU4XLocaleExpander* expander); +diplomat_result_box_ICU4XLocaleDirectionality_ICU4XDataError ICU4XLocaleDirectionality_create_with_expander(const ICU4XDataProvider* provider, const ICU4XLocaleExpander* expander); ICU4XLocaleDirection ICU4XLocaleDirectionality_get(const ICU4XLocaleDirectionality* self, const ICU4XLocale* locale); diff --git a/ffi/capi/bindings/c/ICU4XLocaleDisplayNamesFormatter.h b/ffi/capi/bindings/c/ICU4XLocaleDisplayNamesFormatter.h index 2fd980c1086..1b40dfb7573 100644 --- a/ffi/capi/bindings/c/ICU4XLocaleDisplayNamesFormatter.h +++ b/ffi/capi/bindings/c/ICU4XLocaleDisplayNamesFormatter.h @@ -12,7 +12,7 @@ #include "ICU4XDisplayNamesOptionsV1.h" #include "ICU4XLocale.d.h" #include "ICU4XLocale.h" -#include "diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XDataError.d.h" #include "ICU4XLocaleDisplayNamesFormatter.d.h" @@ -22,7 +22,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError ICU4XLocaleDisplayNamesFormatter_create(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDisplayNamesOptionsV1 options); +diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XDataError ICU4XLocaleDisplayNamesFormatter_create(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDisplayNamesOptionsV1 options); void ICU4XLocaleDisplayNamesFormatter_of(const ICU4XLocaleDisplayNamesFormatter* self, const ICU4XLocale* locale, DiplomatWrite* write); diff --git a/ffi/capi/bindings/c/ICU4XLocaleFallbacker.h b/ffi/capi/bindings/c/ICU4XLocaleFallbacker.h index 5c2c802efd7..13e0a895548 100644 --- a/ffi/capi/bindings/c/ICU4XLocaleFallbacker.h +++ b/ffi/capi/bindings/c/ICU4XLocaleFallbacker.h @@ -10,8 +10,8 @@ #include "ICU4XDataProvider.h" #include "ICU4XLocaleFallbackConfig.d.h" #include "ICU4XLocaleFallbackConfig.h" -#include "diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError.d.h" -#include "diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XLocaleParseError.d.h" +#include "diplomat_result_box_ICU4XLocaleFallbacker_ICU4XDataError.d.h" #include "ICU4XLocaleFallbacker.d.h" @@ -21,11 +21,11 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError ICU4XLocaleFallbacker_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XLocaleFallbacker_ICU4XDataError ICU4XLocaleFallbacker_create(const ICU4XDataProvider* provider); ICU4XLocaleFallbacker* ICU4XLocaleFallbacker_create_without_data(); -diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError ICU4XLocaleFallbacker_for_config(const ICU4XLocaleFallbacker* self, ICU4XLocaleFallbackConfig config); +diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XLocaleParseError ICU4XLocaleFallbacker_for_config(const ICU4XLocaleFallbacker* self, ICU4XLocaleFallbackConfig config); void ICU4XLocaleFallbacker_destroy(ICU4XLocaleFallbacker* self); diff --git a/ffi/capi/bindings/c/ICU4XLocaleParseError.d.h b/ffi/capi/bindings/c/ICU4XLocaleParseError.d.h new file mode 100644 index 00000000000..900c9b95e69 --- /dev/null +++ b/ffi/capi/bindings/c/ICU4XLocaleParseError.d.h @@ -0,0 +1,29 @@ +#ifndef ICU4XLocaleParseError_D_H +#define ICU4XLocaleParseError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef enum ICU4XLocaleParseError { + ICU4XLocaleParseError_Unknown = 0, + ICU4XLocaleParseError_Language = 1, + ICU4XLocaleParseError_Subtag = 2, + ICU4XLocaleParseError_Extension = 3, +} ICU4XLocaleParseError; + + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // ICU4XLocaleParseError_D_H diff --git a/ffi/capi/bindings/c/ICU4XLocaleParseError.h b/ffi/capi/bindings/c/ICU4XLocaleParseError.h new file mode 100644 index 00000000000..6793f90a748 --- /dev/null +++ b/ffi/capi/bindings/c/ICU4XLocaleParseError.h @@ -0,0 +1,26 @@ +#ifndef ICU4XLocaleParseError_H +#define ICU4XLocaleParseError_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + +#include "ICU4XLocaleParseError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +// No Content + + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // ICU4XLocaleParseError_H diff --git a/ffi/capi/bindings/c/ICU4XMetazoneCalculator.h b/ffi/capi/bindings/c/ICU4XMetazoneCalculator.h index 19833e844e8..fb0b1a241e0 100644 --- a/ffi/capi/bindings/c/ICU4XMetazoneCalculator.h +++ b/ffi/capi/bindings/c/ICU4XMetazoneCalculator.h @@ -8,7 +8,7 @@ #include "diplomat_runtime.h" #include "ICU4XDataProvider.d.h" #include "ICU4XDataProvider.h" -#include "diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XMetazoneCalculator_ICU4XDataError.d.h" #include "ICU4XMetazoneCalculator.d.h" @@ -18,7 +18,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError ICU4XMetazoneCalculator_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XMetazoneCalculator_ICU4XDataError ICU4XMetazoneCalculator_create(const ICU4XDataProvider* provider); void ICU4XMetazoneCalculator_destroy(ICU4XMetazoneCalculator* self); diff --git a/ffi/capi/bindings/c/ICU4XPluralOperands.h b/ffi/capi/bindings/c/ICU4XPluralOperands.h index 7e10bf0d4eb..5cb4ddd736a 100644 --- a/ffi/capi/bindings/c/ICU4XPluralOperands.h +++ b/ffi/capi/bindings/c/ICU4XPluralOperands.h @@ -8,7 +8,7 @@ #include "diplomat_runtime.h" #include "ICU4XFixedDecimal.d.h" #include "ICU4XFixedDecimal.h" -#include "diplomat_result_box_ICU4XPluralOperands_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XPluralOperands_ICU4XFixedDecimalParseError.d.h" #include "ICU4XPluralOperands.d.h" @@ -18,7 +18,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XPluralOperands_ICU4XError ICU4XPluralOperands_create_from_string(const char* s_data, size_t s_len); +diplomat_result_box_ICU4XPluralOperands_ICU4XFixedDecimalParseError ICU4XPluralOperands_create_from_string(const char* s_data, size_t s_len); ICU4XPluralOperands* ICU4XPluralOperands_create_from_fixed_decimal(const ICU4XFixedDecimal* x); diff --git a/ffi/capi/bindings/c/ICU4XPluralRules.h b/ffi/capi/bindings/c/ICU4XPluralRules.h index 6856a3c1226..87a12f60cd7 100644 --- a/ffi/capi/bindings/c/ICU4XPluralRules.h +++ b/ffi/capi/bindings/c/ICU4XPluralRules.h @@ -16,7 +16,7 @@ #include "ICU4XPluralCategory.h" #include "ICU4XPluralOperands.d.h" #include "ICU4XPluralOperands.h" -#include "diplomat_result_box_ICU4XPluralRules_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XPluralRules_ICU4XDataError.d.h" #include "ICU4XPluralRules.d.h" @@ -26,9 +26,9 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XPluralRules_ICU4XError ICU4XPluralRules_create_cardinal(const ICU4XDataProvider* provider, const ICU4XLocale* locale); +diplomat_result_box_ICU4XPluralRules_ICU4XDataError ICU4XPluralRules_create_cardinal(const ICU4XDataProvider* provider, const ICU4XLocale* locale); -diplomat_result_box_ICU4XPluralRules_ICU4XError ICU4XPluralRules_create_ordinal(const ICU4XDataProvider* provider, const ICU4XLocale* locale); +diplomat_result_box_ICU4XPluralRules_ICU4XDataError ICU4XPluralRules_create_ordinal(const ICU4XDataProvider* provider, const ICU4XLocale* locale); ICU4XPluralCategory ICU4XPluralRules_category_for(const ICU4XPluralRules* self, const ICU4XPluralOperands* op); diff --git a/ffi/capi/bindings/c/ICU4XPropertyValueNameToEnumMapper.h b/ffi/capi/bindings/c/ICU4XPropertyValueNameToEnumMapper.h index 954d4a5cd6e..3b166f2533d 100644 --- a/ffi/capi/bindings/c/ICU4XPropertyValueNameToEnumMapper.h +++ b/ffi/capi/bindings/c/ICU4XPropertyValueNameToEnumMapper.h @@ -8,7 +8,7 @@ #include "diplomat_runtime.h" #include "ICU4XDataProvider.d.h" #include "ICU4XDataProvider.h" -#include "diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError.d.h" #include "ICU4XPropertyValueNameToEnumMapper.d.h" @@ -22,25 +22,25 @@ int16_t ICU4XPropertyValueNameToEnumMapper_get_strict(const ICU4XPropertyValueNa int16_t ICU4XPropertyValueNameToEnumMapper_get_loose(const ICU4XPropertyValueNameToEnumMapper* self, const char* name_data, size_t name_len); -diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_general_category(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError ICU4XPropertyValueNameToEnumMapper_load_general_category(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_hangul_syllable_type(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError ICU4XPropertyValueNameToEnumMapper_load_hangul_syllable_type(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_east_asian_width(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError ICU4XPropertyValueNameToEnumMapper_load_east_asian_width(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_bidi_class(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError ICU4XPropertyValueNameToEnumMapper_load_bidi_class(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_indic_syllabic_category(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError ICU4XPropertyValueNameToEnumMapper_load_indic_syllabic_category(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_line_break(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError ICU4XPropertyValueNameToEnumMapper_load_line_break(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_grapheme_cluster_break(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError ICU4XPropertyValueNameToEnumMapper_load_grapheme_cluster_break(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_word_break(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError ICU4XPropertyValueNameToEnumMapper_load_word_break(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_sentence_break(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError ICU4XPropertyValueNameToEnumMapper_load_sentence_break(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_script(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError ICU4XPropertyValueNameToEnumMapper_load_script(const ICU4XDataProvider* provider); void ICU4XPropertyValueNameToEnumMapper_destroy(ICU4XPropertyValueNameToEnumMapper* self); diff --git a/ffi/capi/bindings/c/ICU4XRegionDisplayNames.h b/ffi/capi/bindings/c/ICU4XRegionDisplayNames.h index c38cc4e09c5..66841d80c12 100644 --- a/ffi/capi/bindings/c/ICU4XRegionDisplayNames.h +++ b/ffi/capi/bindings/c/ICU4XRegionDisplayNames.h @@ -10,8 +10,8 @@ #include "ICU4XDataProvider.h" #include "ICU4XLocale.d.h" #include "ICU4XLocale.h" -#include "diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError.d.h" -#include "diplomat_result_void_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XRegionDisplayNames_ICU4XDataError.d.h" +#include "diplomat_result_void_ICU4XLocaleParseError.d.h" #include "ICU4XRegionDisplayNames.d.h" @@ -21,9 +21,9 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError ICU4XRegionDisplayNames_create(const ICU4XDataProvider* provider, const ICU4XLocale* locale); +diplomat_result_box_ICU4XRegionDisplayNames_ICU4XDataError ICU4XRegionDisplayNames_create(const ICU4XDataProvider* provider, const ICU4XLocale* locale); -diplomat_result_void_ICU4XError ICU4XRegionDisplayNames_of(const ICU4XRegionDisplayNames* self, const char* region_data, size_t region_len, DiplomatWrite* write); +diplomat_result_void_ICU4XLocaleParseError ICU4XRegionDisplayNames_of(const ICU4XRegionDisplayNames* self, const char* region_data, size_t region_len, DiplomatWrite* write); void ICU4XRegionDisplayNames_destroy(ICU4XRegionDisplayNames* self); diff --git a/ffi/capi/bindings/c/ICU4XScriptWithExtensions.h b/ffi/capi/bindings/c/ICU4XScriptWithExtensions.h index 452a8a27546..cac3d912674 100644 --- a/ffi/capi/bindings/c/ICU4XScriptWithExtensions.h +++ b/ffi/capi/bindings/c/ICU4XScriptWithExtensions.h @@ -12,7 +12,7 @@ #include "ICU4XDataProvider.h" #include "ICU4XScriptWithExtensionsBorrowed.d.h" #include "ICU4XScriptWithExtensionsBorrowed.h" -#include "diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XScriptWithExtensions_ICU4XDataError.d.h" #include "ICU4XScriptWithExtensions.d.h" @@ -22,7 +22,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError ICU4XScriptWithExtensions_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XScriptWithExtensions_ICU4XDataError ICU4XScriptWithExtensions_create(const ICU4XDataProvider* provider); uint16_t ICU4XScriptWithExtensions_get_script_val(const ICU4XScriptWithExtensions* self, uint32_t code_point); diff --git a/ffi/capi/bindings/c/ICU4XSentenceSegmenter.h b/ffi/capi/bindings/c/ICU4XSentenceSegmenter.h index 3abf42b3cd4..35b6bd88e0c 100644 --- a/ffi/capi/bindings/c/ICU4XSentenceSegmenter.h +++ b/ffi/capi/bindings/c/ICU4XSentenceSegmenter.h @@ -14,7 +14,7 @@ #include "ICU4XSentenceBreakIteratorUtf16.h" #include "ICU4XSentenceBreakIteratorUtf8.d.h" #include "ICU4XSentenceBreakIteratorUtf8.h" -#include "diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XSentenceSegmenter_ICU4XDataError.d.h" #include "ICU4XSentenceSegmenter.d.h" @@ -24,7 +24,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError ICU4XSentenceSegmenter_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XSentenceSegmenter_ICU4XDataError ICU4XSentenceSegmenter_create(const ICU4XDataProvider* provider); ICU4XSentenceBreakIteratorUtf8* ICU4XSentenceSegmenter_segment_utf8(const ICU4XSentenceSegmenter* self, const char* input_data, size_t input_len); diff --git a/ffi/capi/bindings/c/ICU4XTime.h b/ffi/capi/bindings/c/ICU4XTime.h index 295f4f180b8..0d96669a9e2 100644 --- a/ffi/capi/bindings/c/ICU4XTime.h +++ b/ffi/capi/bindings/c/ICU4XTime.h @@ -6,7 +6,7 @@ #include #include #include "diplomat_runtime.h" -#include "diplomat_result_box_ICU4XTime_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XTime_ICU4XCalendarError.d.h" #include "ICU4XTime.d.h" @@ -16,9 +16,9 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XTime_ICU4XError ICU4XTime_create(uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond); +diplomat_result_box_ICU4XTime_ICU4XCalendarError ICU4XTime_create(uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond); -diplomat_result_box_ICU4XTime_ICU4XError ICU4XTime_create_midnight(); +diplomat_result_box_ICU4XTime_ICU4XCalendarError ICU4XTime_create_midnight(); uint8_t ICU4XTime_hour(const ICU4XTime* self); diff --git a/ffi/capi/bindings/c/ICU4XTimeZoneIdMapper.h b/ffi/capi/bindings/c/ICU4XTimeZoneIdMapper.h index e475f121eb7..42480e1c8c1 100644 --- a/ffi/capi/bindings/c/ICU4XTimeZoneIdMapper.h +++ b/ffi/capi/bindings/c/ICU4XTimeZoneIdMapper.h @@ -8,8 +8,8 @@ #include "diplomat_runtime.h" #include "ICU4XDataProvider.d.h" #include "ICU4XDataProvider.h" -#include "diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XError.d.h" -#include "diplomat_result_void_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XDataError.d.h" +#include "diplomat_result_void_ICU4XTimeZoneInvalidIdError.d.h" #include "ICU4XTimeZoneIdMapper.d.h" @@ -19,15 +19,15 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XError ICU4XTimeZoneIdMapper_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XDataError ICU4XTimeZoneIdMapper_create(const ICU4XDataProvider* provider); -diplomat_result_void_ICU4XError ICU4XTimeZoneIdMapper_iana_to_bcp47(const ICU4XTimeZoneIdMapper* self, const char* value_data, size_t value_len, DiplomatWrite* write); +diplomat_result_void_ICU4XTimeZoneInvalidIdError ICU4XTimeZoneIdMapper_iana_to_bcp47(const ICU4XTimeZoneIdMapper* self, const char* value_data, size_t value_len, DiplomatWrite* write); -diplomat_result_void_ICU4XError ICU4XTimeZoneIdMapper_normalize_iana(const ICU4XTimeZoneIdMapper* self, const char* value_data, size_t value_len, DiplomatWrite* write); +diplomat_result_void_ICU4XTimeZoneInvalidIdError ICU4XTimeZoneIdMapper_normalize_iana(const ICU4XTimeZoneIdMapper* self, const char* value_data, size_t value_len, DiplomatWrite* write); -diplomat_result_void_ICU4XError ICU4XTimeZoneIdMapper_canonicalize_iana(const ICU4XTimeZoneIdMapper* self, const char* value_data, size_t value_len, DiplomatWrite* write); +diplomat_result_void_ICU4XTimeZoneInvalidIdError ICU4XTimeZoneIdMapper_canonicalize_iana(const ICU4XTimeZoneIdMapper* self, const char* value_data, size_t value_len, DiplomatWrite* write); -diplomat_result_void_ICU4XError ICU4XTimeZoneIdMapper_find_canonical_iana_from_bcp47(const ICU4XTimeZoneIdMapper* self, const char* value_data, size_t value_len, DiplomatWrite* write); +diplomat_result_void_ICU4XTimeZoneInvalidIdError ICU4XTimeZoneIdMapper_find_canonical_iana_from_bcp47(const ICU4XTimeZoneIdMapper* self, const char* value_data, size_t value_len, DiplomatWrite* write); void ICU4XTimeZoneIdMapper_destroy(ICU4XTimeZoneIdMapper* self); diff --git a/ffi/capi/bindings/c/ICU4XTimeZoneIdMapperWithFastCanonicalization.h b/ffi/capi/bindings/c/ICU4XTimeZoneIdMapperWithFastCanonicalization.h index 31f89e0fcdf..64bbc080adb 100644 --- a/ffi/capi/bindings/c/ICU4XTimeZoneIdMapperWithFastCanonicalization.h +++ b/ffi/capi/bindings/c/ICU4XTimeZoneIdMapperWithFastCanonicalization.h @@ -8,8 +8,8 @@ #include "diplomat_runtime.h" #include "ICU4XDataProvider.d.h" #include "ICU4XDataProvider.h" -#include "diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XError.d.h" -#include "diplomat_result_void_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XDataError.d.h" +#include "diplomat_result_void_ICU4XTimeZoneInvalidIdError.d.h" #include "ICU4XTimeZoneIdMapperWithFastCanonicalization.d.h" @@ -19,11 +19,11 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XError ICU4XTimeZoneIdMapperWithFastCanonicalization_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XDataError ICU4XTimeZoneIdMapperWithFastCanonicalization_create(const ICU4XDataProvider* provider); -diplomat_result_void_ICU4XError ICU4XTimeZoneIdMapperWithFastCanonicalization_canonicalize_iana(const ICU4XTimeZoneIdMapperWithFastCanonicalization* self, const char* value_data, size_t value_len, DiplomatWrite* write); +diplomat_result_void_ICU4XTimeZoneInvalidIdError ICU4XTimeZoneIdMapperWithFastCanonicalization_canonicalize_iana(const ICU4XTimeZoneIdMapperWithFastCanonicalization* self, const char* value_data, size_t value_len, DiplomatWrite* write); -diplomat_result_void_ICU4XError ICU4XTimeZoneIdMapperWithFastCanonicalization_canonical_iana_from_bcp47(const ICU4XTimeZoneIdMapperWithFastCanonicalization* self, const char* value_data, size_t value_len, DiplomatWrite* write); +diplomat_result_void_ICU4XTimeZoneInvalidIdError ICU4XTimeZoneIdMapperWithFastCanonicalization_canonical_iana_from_bcp47(const ICU4XTimeZoneIdMapperWithFastCanonicalization* self, const char* value_data, size_t value_len, DiplomatWrite* write); void ICU4XTimeZoneIdMapperWithFastCanonicalization_destroy(ICU4XTimeZoneIdMapperWithFastCanonicalization* self); diff --git a/ffi/capi/bindings/c/ICU4XTimeZoneInvalidIdError.d.h b/ffi/capi/bindings/c/ICU4XTimeZoneInvalidIdError.d.h new file mode 100644 index 00000000000..8aa37d86fb5 --- /dev/null +++ b/ffi/capi/bindings/c/ICU4XTimeZoneInvalidIdError.d.h @@ -0,0 +1,26 @@ +#ifndef ICU4XTimeZoneInvalidIdError_D_H +#define ICU4XTimeZoneInvalidIdError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef enum ICU4XTimeZoneInvalidIdError { + ICU4XTimeZoneInvalidIdError_TodoZst = 0, +} ICU4XTimeZoneInvalidIdError; + + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // ICU4XTimeZoneInvalidIdError_D_H diff --git a/ffi/capi/bindings/c/ICU4XTimeZoneInvalidIdError.h b/ffi/capi/bindings/c/ICU4XTimeZoneInvalidIdError.h new file mode 100644 index 00000000000..a6b98fb5e8d --- /dev/null +++ b/ffi/capi/bindings/c/ICU4XTimeZoneInvalidIdError.h @@ -0,0 +1,26 @@ +#ifndef ICU4XTimeZoneInvalidIdError_H +#define ICU4XTimeZoneInvalidIdError_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + +#include "ICU4XTimeZoneInvalidIdError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +// No Content + + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // ICU4XTimeZoneInvalidIdError_H diff --git a/ffi/capi/bindings/c/ICU4XTimeZoneInvalidOffsetError.d.h b/ffi/capi/bindings/c/ICU4XTimeZoneInvalidOffsetError.d.h new file mode 100644 index 00000000000..20c5a72271a --- /dev/null +++ b/ffi/capi/bindings/c/ICU4XTimeZoneInvalidOffsetError.d.h @@ -0,0 +1,26 @@ +#ifndef ICU4XTimeZoneInvalidOffsetError_D_H +#define ICU4XTimeZoneInvalidOffsetError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef enum ICU4XTimeZoneInvalidOffsetError { + ICU4XTimeZoneInvalidOffsetError_TodoZst = 0, +} ICU4XTimeZoneInvalidOffsetError; + + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // ICU4XTimeZoneInvalidOffsetError_D_H diff --git a/ffi/capi/bindings/c/ICU4XTimeZoneInvalidOffsetError.h b/ffi/capi/bindings/c/ICU4XTimeZoneInvalidOffsetError.h new file mode 100644 index 00000000000..1438bc0e8d6 --- /dev/null +++ b/ffi/capi/bindings/c/ICU4XTimeZoneInvalidOffsetError.h @@ -0,0 +1,26 @@ +#ifndef ICU4XTimeZoneInvalidOffsetError_H +#define ICU4XTimeZoneInvalidOffsetError_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + +#include "ICU4XTimeZoneInvalidOffsetError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +// No Content + + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // ICU4XTimeZoneInvalidOffsetError_H diff --git a/ffi/capi/bindings/c/ICU4XTitlecaseMapper.h b/ffi/capi/bindings/c/ICU4XTitlecaseMapper.h index 2879b633515..95619468a0f 100644 --- a/ffi/capi/bindings/c/ICU4XTitlecaseMapper.h +++ b/ffi/capi/bindings/c/ICU4XTitlecaseMapper.h @@ -12,7 +12,7 @@ #include "ICU4XLocale.h" #include "ICU4XTitlecaseOptionsV1.d.h" #include "ICU4XTitlecaseOptionsV1.h" -#include "diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XTitlecaseMapper_ICU4XDataError.d.h" #include "ICU4XTitlecaseMapper.d.h" @@ -22,7 +22,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError ICU4XTitlecaseMapper_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XTitlecaseMapper_ICU4XDataError ICU4XTitlecaseMapper_create(const ICU4XDataProvider* provider); void ICU4XTitlecaseMapper_titlecase_segment_v1(const ICU4XTitlecaseMapper* self, const char* s_data, size_t s_len, const ICU4XLocale* locale, ICU4XTitlecaseOptionsV1 options, DiplomatWrite* write); diff --git a/ffi/capi/bindings/c/ICU4XUnicodeSetData.h b/ffi/capi/bindings/c/ICU4XUnicodeSetData.h index c4803de518f..d279e35600b 100644 --- a/ffi/capi/bindings/c/ICU4XUnicodeSetData.h +++ b/ffi/capi/bindings/c/ICU4XUnicodeSetData.h @@ -10,7 +10,7 @@ #include "ICU4XDataProvider.h" #include "ICU4XLocale.d.h" #include "ICU4XLocale.h" -#include "diplomat_result_box_ICU4XUnicodeSetData_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XUnicodeSetData_ICU4XDataError.d.h" #include "ICU4XUnicodeSetData.d.h" @@ -26,17 +26,17 @@ bool ICU4XUnicodeSetData_contains_char(const ICU4XUnicodeSetData* self, char32_t bool ICU4XUnicodeSetData_contains32(const ICU4XUnicodeSetData* self, uint32_t cp); -diplomat_result_box_ICU4XUnicodeSetData_ICU4XError ICU4XUnicodeSetData_load_basic_emoji(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XUnicodeSetData_ICU4XDataError ICU4XUnicodeSetData_load_basic_emoji(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XUnicodeSetData_ICU4XError ICU4XUnicodeSetData_load_exemplars_main(const ICU4XDataProvider* provider, const ICU4XLocale* locale); +diplomat_result_box_ICU4XUnicodeSetData_ICU4XDataError ICU4XUnicodeSetData_load_exemplars_main(const ICU4XDataProvider* provider, const ICU4XLocale* locale); -diplomat_result_box_ICU4XUnicodeSetData_ICU4XError ICU4XUnicodeSetData_load_exemplars_auxiliary(const ICU4XDataProvider* provider, const ICU4XLocale* locale); +diplomat_result_box_ICU4XUnicodeSetData_ICU4XDataError ICU4XUnicodeSetData_load_exemplars_auxiliary(const ICU4XDataProvider* provider, const ICU4XLocale* locale); -diplomat_result_box_ICU4XUnicodeSetData_ICU4XError ICU4XUnicodeSetData_load_exemplars_punctuation(const ICU4XDataProvider* provider, const ICU4XLocale* locale); +diplomat_result_box_ICU4XUnicodeSetData_ICU4XDataError ICU4XUnicodeSetData_load_exemplars_punctuation(const ICU4XDataProvider* provider, const ICU4XLocale* locale); -diplomat_result_box_ICU4XUnicodeSetData_ICU4XError ICU4XUnicodeSetData_load_exemplars_numbers(const ICU4XDataProvider* provider, const ICU4XLocale* locale); +diplomat_result_box_ICU4XUnicodeSetData_ICU4XDataError ICU4XUnicodeSetData_load_exemplars_numbers(const ICU4XDataProvider* provider, const ICU4XLocale* locale); -diplomat_result_box_ICU4XUnicodeSetData_ICU4XError ICU4XUnicodeSetData_load_exemplars_index(const ICU4XDataProvider* provider, const ICU4XLocale* locale); +diplomat_result_box_ICU4XUnicodeSetData_ICU4XDataError ICU4XUnicodeSetData_load_exemplars_index(const ICU4XDataProvider* provider, const ICU4XLocale* locale); void ICU4XUnicodeSetData_destroy(ICU4XUnicodeSetData* self); diff --git a/ffi/capi/bindings/c/ICU4XUnitsConverterFactory.h b/ffi/capi/bindings/c/ICU4XUnitsConverterFactory.h index e7470ebee17..59f5f871eed 100644 --- a/ffi/capi/bindings/c/ICU4XUnitsConverterFactory.h +++ b/ffi/capi/bindings/c/ICU4XUnitsConverterFactory.h @@ -14,7 +14,7 @@ #include "ICU4XMeasureUnitParser.h" #include "ICU4XUnitsConverter.d.h" #include "ICU4XUnitsConverter.h" -#include "diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XDataError.d.h" #include "ICU4XUnitsConverterFactory.d.h" @@ -24,7 +24,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XError ICU4XUnitsConverterFactory_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XDataError ICU4XUnitsConverterFactory_create(const ICU4XDataProvider* provider); ICU4XUnitsConverter* ICU4XUnitsConverterFactory_converter(const ICU4XUnitsConverterFactory* self, const ICU4XMeasureUnit* from, const ICU4XMeasureUnit* to); diff --git a/ffi/capi/bindings/c/ICU4XWeekCalculator.h b/ffi/capi/bindings/c/ICU4XWeekCalculator.h index 4387ad7675a..0de9552dd11 100644 --- a/ffi/capi/bindings/c/ICU4XWeekCalculator.h +++ b/ffi/capi/bindings/c/ICU4XWeekCalculator.h @@ -14,7 +14,7 @@ #include "ICU4XLocale.h" #include "ICU4XWeekendContainsDay.d.h" #include "ICU4XWeekendContainsDay.h" -#include "diplomat_result_box_ICU4XWeekCalculator_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XWeekCalculator_ICU4XDataError.d.h" #include "ICU4XWeekCalculator.d.h" @@ -24,7 +24,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XWeekCalculator_ICU4XError ICU4XWeekCalculator_create(const ICU4XDataProvider* provider, const ICU4XLocale* locale); +diplomat_result_box_ICU4XWeekCalculator_ICU4XDataError ICU4XWeekCalculator_create(const ICU4XDataProvider* provider, const ICU4XLocale* locale); ICU4XWeekCalculator* ICU4XWeekCalculator_create_from_first_day_of_week_and_min_week_days(ICU4XIsoWeekday first_weekday, uint8_t min_week_days); diff --git a/ffi/capi/bindings/c/ICU4XWordSegmenter.h b/ffi/capi/bindings/c/ICU4XWordSegmenter.h index bb18ae2496e..d7b50cf7e84 100644 --- a/ffi/capi/bindings/c/ICU4XWordSegmenter.h +++ b/ffi/capi/bindings/c/ICU4XWordSegmenter.h @@ -14,7 +14,7 @@ #include "ICU4XWordBreakIteratorUtf16.h" #include "ICU4XWordBreakIteratorUtf8.d.h" #include "ICU4XWordBreakIteratorUtf8.h" -#include "diplomat_result_box_ICU4XWordSegmenter_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XWordSegmenter_ICU4XDataError.d.h" #include "ICU4XWordSegmenter.d.h" @@ -24,11 +24,11 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XWordSegmenter_ICU4XError ICU4XWordSegmenter_create_auto(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XWordSegmenter_ICU4XDataError ICU4XWordSegmenter_create_auto(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XWordSegmenter_ICU4XError ICU4XWordSegmenter_create_lstm(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XWordSegmenter_ICU4XDataError ICU4XWordSegmenter_create_lstm(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XWordSegmenter_ICU4XError ICU4XWordSegmenter_create_dictionary(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XWordSegmenter_ICU4XDataError ICU4XWordSegmenter_create_dictionary(const ICU4XDataProvider* provider); ICU4XWordBreakIteratorUtf8* ICU4XWordSegmenter_segment_utf8(const ICU4XWordSegmenter* self, const char* input_data, size_t input_len); diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XBidi_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XBidi_ICU4XDataError.d.h similarity index 50% rename from ffi/capi/bindings/c/diplomat_result_box_ICU4XBidi_ICU4XError.d.h rename to ffi/capi/bindings/c/diplomat_result_box_ICU4XBidi_ICU4XDataError.d.h index e2b3857aa9b..bfb608fd845 100644 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XBidi_ICU4XError.d.h +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XBidi_ICU4XDataError.d.h @@ -1,5 +1,5 @@ -#ifndef diplomat_result_box_ICU4XBidi_ICU4XError_D_H -#define diplomat_result_box_ICU4XBidi_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XBidi_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XBidi_ICU4XDataError_D_H #include #include @@ -7,7 +7,7 @@ #include #include "diplomat_runtime.h" #include "ICU4XBidi.d.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #ifdef __cplusplus namespace capi { @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XBidi_ICU4XError { +typedef struct diplomat_result_box_ICU4XBidi_ICU4XDataError { union { ICU4XBidi* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XBidi_ICU4XError; +} diplomat_result_box_ICU4XBidi_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XBidi_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XBidi_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XCalendar_ICU4XDataError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XCalendar_ICU4XDataError.d.h new file mode 100644 index 00000000000..b5ace2af88f --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XCalendar_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XCalendar_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XCalendar_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XCalendar.d.h" +#include "ICU4XDataError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XCalendar_ICU4XDataError { + union { + ICU4XCalendar* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XCalendar_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XCalendar_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XCalendar_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XCalendar_ICU4XError.d.h deleted file mode 100644 index 1e0ce4d10f3..00000000000 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XCalendar_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XCalendar_ICU4XError_D_H -#define diplomat_result_box_ICU4XCalendar_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XCalendar.d.h" -#include "ICU4XError.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XCalendar_ICU4XError { - union { - ICU4XCalendar* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XCalendar_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XCalendar_ICU4XError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XDataError.d.h similarity index 76% rename from ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError.d.h rename to ffi/capi/bindings/c/diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XDataError.d.h index d4e919d6bdb..a35b612ed86 100644 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError.d.h +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XDataError.d.h @@ -1,5 +1,5 @@ -#ifndef diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError_D_H -#define diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XDataError_D_H #include #include @@ -7,7 +7,7 @@ #include #include "diplomat_runtime.h" #include "ICU4XCanonicalCombiningClassMap.d.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #ifdef __cplusplus namespace capi { @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError { +typedef struct diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XDataError { union { ICU4XCanonicalCombiningClassMap* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError; +} diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCanonicalComposition_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XCanonicalComposition_ICU4XDataError.d.h similarity index 55% rename from ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCanonicalComposition_ICU4XError.d.h rename to ffi/capi/bindings/c/diplomat_result_box_ICU4XCanonicalComposition_ICU4XDataError.d.h index 5ea5fcd60b8..b2f585048f8 100644 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCanonicalComposition_ICU4XError.d.h +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XCanonicalComposition_ICU4XDataError.d.h @@ -1,5 +1,5 @@ -#ifndef diplomat_result_box_ICU4XCanonicalComposition_ICU4XError_D_H -#define diplomat_result_box_ICU4XCanonicalComposition_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XCanonicalComposition_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XCanonicalComposition_ICU4XDataError_D_H #include #include @@ -7,7 +7,7 @@ #include #include "diplomat_runtime.h" #include "ICU4XCanonicalComposition.d.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #ifdef __cplusplus namespace capi { @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XCanonicalComposition_ICU4XError { +typedef struct diplomat_result_box_ICU4XCanonicalComposition_ICU4XDataError { union { ICU4XCanonicalComposition* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XCanonicalComposition_ICU4XError; +} diplomat_result_box_ICU4XCanonicalComposition_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XCanonicalComposition_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XCanonicalComposition_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XDataError.d.h similarity index 54% rename from ffi/capi/bindings/c/diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError.d.h rename to ffi/capi/bindings/c/diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XDataError.d.h index e4cad3c746d..79ea2df4073 100644 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError.d.h +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XDataError.d.h @@ -1,5 +1,5 @@ -#ifndef diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError_D_H -#define diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XDataError_D_H #include #include @@ -7,7 +7,7 @@ #include #include "diplomat_runtime.h" #include "ICU4XCanonicalDecomposition.d.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #ifdef __cplusplus namespace capi { @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError { +typedef struct diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XDataError { union { ICU4XCanonicalDecomposition* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError; +} diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XCaseMapCloser_ICU4XDataError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XCaseMapCloser_ICU4XDataError.d.h new file mode 100644 index 00000000000..f08f5166791 --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XCaseMapCloser_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XCaseMapCloser_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XCaseMapCloser_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XCaseMapCloser.d.h" +#include "ICU4XDataError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XCaseMapCloser_ICU4XDataError { + union { + ICU4XCaseMapCloser* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XCaseMapCloser_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XCaseMapCloser_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XCaseMapCloser_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XCaseMapCloser_ICU4XError.d.h deleted file mode 100644 index 575eb389422..00000000000 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XCaseMapCloser_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XCaseMapCloser_ICU4XError_D_H -#define diplomat_result_box_ICU4XCaseMapCloser_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XCaseMapCloser.d.h" -#include "ICU4XError.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XCaseMapCloser_ICU4XError { - union { - ICU4XCaseMapCloser* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XCaseMapCloser_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XCaseMapCloser_ICU4XError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XCaseMapper_ICU4XDataError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XCaseMapper_ICU4XDataError.d.h new file mode 100644 index 00000000000..97707306144 --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XCaseMapper_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XCaseMapper_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XCaseMapper_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XCaseMapper.d.h" +#include "ICU4XDataError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XCaseMapper_ICU4XDataError { + union { + ICU4XCaseMapper* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XCaseMapper_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XCaseMapper_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XCaseMapper_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XCaseMapper_ICU4XError.d.h deleted file mode 100644 index ea8c433f861..00000000000 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XCaseMapper_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XCaseMapper_ICU4XError_D_H -#define diplomat_result_box_ICU4XCaseMapper_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XCaseMapper.d.h" -#include "ICU4XError.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XCaseMapper_ICU4XError { - union { - ICU4XCaseMapper* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XCaseMapper_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XCaseMapper_ICU4XError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XCodePointMapData16_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XCodePointMapData16_ICU4XDataError.d.h similarity index 55% rename from ffi/capi/bindings/c/diplomat_result_box_ICU4XCodePointMapData16_ICU4XError.d.h rename to ffi/capi/bindings/c/diplomat_result_box_ICU4XCodePointMapData16_ICU4XDataError.d.h index 9a608f1232a..6ad0a1683b1 100644 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XCodePointMapData16_ICU4XError.d.h +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XCodePointMapData16_ICU4XDataError.d.h @@ -1,5 +1,5 @@ -#ifndef diplomat_result_box_ICU4XCodePointMapData16_ICU4XError_D_H -#define diplomat_result_box_ICU4XCodePointMapData16_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XCodePointMapData16_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XCodePointMapData16_ICU4XDataError_D_H #include #include @@ -7,7 +7,7 @@ #include #include "diplomat_runtime.h" #include "ICU4XCodePointMapData16.d.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #ifdef __cplusplus namespace capi { @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XCodePointMapData16_ICU4XError { +typedef struct diplomat_result_box_ICU4XCodePointMapData16_ICU4XDataError { union { ICU4XCodePointMapData16* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XCodePointMapData16_ICU4XError; +} diplomat_result_box_ICU4XCodePointMapData16_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XCodePointMapData16_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XCodePointMapData16_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError.d.h new file mode 100644 index 00000000000..d799e6194bf --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XCodePointMapData8.d.h" +#include "ICU4XDataError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError { + union { + ICU4XCodePointMapData8* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XCodePointMapData8_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XCodePointMapData8_ICU4XError.d.h deleted file mode 100644 index 72c12b812c2..00000000000 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XCodePointMapData8_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XCodePointMapData8_ICU4XError_D_H -#define diplomat_result_box_ICU4XCodePointMapData8_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XCodePointMapData8.d.h" -#include "ICU4XError.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XCodePointMapData8_ICU4XError { - union { - ICU4XCodePointMapData8* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XCodePointMapData8_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XCodePointMapData8_ICU4XError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError.d.h new file mode 100644 index 00000000000..a7052829652 --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XCodePointSetData.d.h" +#include "ICU4XDataError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError { + union { + ICU4XCodePointSetData* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XCollator_ICU4XDataError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XCollator_ICU4XDataError.d.h new file mode 100644 index 00000000000..4bd60e21f4b --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XCollator_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XCollator_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XCollator_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XCollator.d.h" +#include "ICU4XDataError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XCollator_ICU4XDataError { + union { + ICU4XCollator* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XCollator_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XCollator_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XCollator_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XCollator_ICU4XError.d.h deleted file mode 100644 index b62bafbc89c..00000000000 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XCollator_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XCollator_ICU4XError_D_H -#define diplomat_result_box_ICU4XCollator_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XCollator.d.h" -#include "ICU4XError.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XCollator_ICU4XError { - union { - ICU4XCollator* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XCollator_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XCollator_ICU4XError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XComposingNormalizer_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XComposingNormalizer_ICU4XDataError.d.h similarity index 55% rename from ffi/capi/bindings/c/diplomat_result_box_ICU4XComposingNormalizer_ICU4XError.d.h rename to ffi/capi/bindings/c/diplomat_result_box_ICU4XComposingNormalizer_ICU4XDataError.d.h index 0d8dc6a994b..46df4c3dc98 100644 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XComposingNormalizer_ICU4XError.d.h +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XComposingNormalizer_ICU4XDataError.d.h @@ -1,5 +1,5 @@ -#ifndef diplomat_result_box_ICU4XComposingNormalizer_ICU4XError_D_H -#define diplomat_result_box_ICU4XComposingNormalizer_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XComposingNormalizer_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XComposingNormalizer_ICU4XDataError_D_H #include #include @@ -7,7 +7,7 @@ #include #include "diplomat_runtime.h" #include "ICU4XComposingNormalizer.d.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #ifdef __cplusplus namespace capi { @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XComposingNormalizer_ICU4XError { +typedef struct diplomat_result_box_ICU4XComposingNormalizer_ICU4XDataError { union { ICU4XComposingNormalizer* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XComposingNormalizer_ICU4XError; +} diplomat_result_box_ICU4XComposingNormalizer_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XComposingNormalizer_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XComposingNormalizer_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XCustomTimeZone_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XCustomTimeZone_ICU4XError.d.h deleted file mode 100644 index fbc6510dfa1..00000000000 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XCustomTimeZone_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XCustomTimeZone_ICU4XError_D_H -#define diplomat_result_box_ICU4XCustomTimeZone_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XCustomTimeZone.d.h" -#include "ICU4XError.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XCustomTimeZone_ICU4XError { - union { - ICU4XCustomTimeZone* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XCustomTimeZone_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XCustomTimeZone_ICU4XError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XCustomTimeZone_ICU4XTimeZoneInvalidOffsetError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XCustomTimeZone_ICU4XTimeZoneInvalidOffsetError.d.h new file mode 100644 index 00000000000..ce0b96b3cf6 --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XCustomTimeZone_ICU4XTimeZoneInvalidOffsetError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XCustomTimeZone_ICU4XTimeZoneInvalidOffsetError_D_H +#define diplomat_result_box_ICU4XCustomTimeZone_ICU4XTimeZoneInvalidOffsetError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XCustomTimeZone.d.h" +#include "ICU4XTimeZoneInvalidOffsetError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XCustomTimeZone_ICU4XTimeZoneInvalidOffsetError { + union { + ICU4XCustomTimeZone* ok; + ICU4XTimeZoneInvalidOffsetError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XCustomTimeZone_ICU4XTimeZoneInvalidOffsetError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XCustomTimeZone_ICU4XTimeZoneInvalidOffsetError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XDataProvider_ICU4XDataError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XDataProvider_ICU4XDataError.d.h new file mode 100644 index 00000000000..da949b24967 --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XDataProvider_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XDataProvider_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XDataProvider_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XDataError.d.h" +#include "ICU4XDataProvider.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XDataProvider_ICU4XDataError { + union { + ICU4XDataProvider* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XDataProvider_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XDataProvider_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XDataProvider_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XDataProvider_ICU4XError.d.h deleted file mode 100644 index 7b888e0e2c6..00000000000 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XDataProvider_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XDataProvider_ICU4XError_D_H -#define diplomat_result_box_ICU4XDataProvider_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XDataProvider.d.h" -#include "ICU4XError.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XDataProvider_ICU4XError { - union { - ICU4XDataProvider* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XDataProvider_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XDataProvider_ICU4XError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XDataStruct_ICU4XDataError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XDataStruct_ICU4XDataError.d.h new file mode 100644 index 00000000000..3c26421293b --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XDataStruct_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XDataStruct_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XDataStruct_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XDataError.d.h" +#include "ICU4XDataStruct.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XDataStruct_ICU4XDataError { + union { + ICU4XDataStruct* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XDataStruct_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XDataStruct_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XDataStruct_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XDataStruct_ICU4XError.d.h deleted file mode 100644 index 00758ed9876..00000000000 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XDataStruct_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XDataStruct_ICU4XError_D_H -#define diplomat_result_box_ICU4XDataStruct_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XDataStruct.d.h" -#include "ICU4XError.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XDataStruct_ICU4XError { - union { - ICU4XDataStruct* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XDataStruct_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XDataStruct_ICU4XError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XDateTime_ICU4XCalendarError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XDateTime_ICU4XCalendarError.d.h new file mode 100644 index 00000000000..9b290ccaa3b --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XDateTime_ICU4XCalendarError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XDateTime_ICU4XCalendarError_D_H +#define diplomat_result_box_ICU4XDateTime_ICU4XCalendarError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XCalendarError.d.h" +#include "ICU4XDateTime.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XDateTime_ICU4XCalendarError { + union { + ICU4XDateTime* ok; + ICU4XCalendarError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XDateTime_ICU4XCalendarError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XDateTime_ICU4XCalendarError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XDateTime_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XDateTime_ICU4XError.d.h deleted file mode 100644 index 48effbd4d47..00000000000 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XDateTime_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XDateTime_ICU4XError_D_H -#define diplomat_result_box_ICU4XDateTime_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XDateTime.d.h" -#include "ICU4XError.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XDateTime_ICU4XError { - union { - ICU4XDateTime* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XDateTime_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XDateTime_ICU4XError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XDate_ICU4XCalendarError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XDate_ICU4XCalendarError.d.h new file mode 100644 index 00000000000..65e482ba5e0 --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XDate_ICU4XCalendarError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XDate_ICU4XCalendarError_D_H +#define diplomat_result_box_ICU4XDate_ICU4XCalendarError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XCalendarError.d.h" +#include "ICU4XDate.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XDate_ICU4XCalendarError { + union { + ICU4XDate* ok; + ICU4XCalendarError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XDate_ICU4XCalendarError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XDate_ICU4XCalendarError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XDate_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XDate_ICU4XError.d.h deleted file mode 100644 index 1ca15736004..00000000000 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XDate_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XDate_ICU4XError_D_H -#define diplomat_result_box_ICU4XDate_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XDate.d.h" -#include "ICU4XError.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XDate_ICU4XError { - union { - ICU4XDate* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XDate_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XDate_ICU4XError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XDataError.d.h similarity index 54% rename from ffi/capi/bindings/cpp/diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError.d.h rename to ffi/capi/bindings/c/diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XDataError.d.h index 8efe70a07d0..e0b6e4f13ad 100644 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError.d.h +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XDataError.d.h @@ -1,13 +1,13 @@ -#ifndef diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError_D_H -#define diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XDataError_D_H #include #include #include #include #include "diplomat_runtime.h" +#include "ICU4XDataError.d.h" #include "ICU4XDecomposingNormalizer.d.h" -#include "ICU4XError.d.h" #ifdef __cplusplus namespace capi { @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError { +typedef struct diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XDataError { union { ICU4XDecomposingNormalizer* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError; +} diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XDataError.d.h similarity index 54% rename from ffi/capi/bindings/cpp/diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError.d.h rename to ffi/capi/bindings/c/diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XDataError.d.h index 9e1028991fa..47452f2d530 100644 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError.d.h +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XDataError.d.h @@ -1,12 +1,12 @@ -#ifndef diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError_D_H -#define diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XDataError_D_H #include #include #include #include #include "diplomat_runtime.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #include "ICU4XFixedDecimalFormatter.d.h" #ifdef __cplusplus @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError { +typedef struct diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XDataError { union { ICU4XFixedDecimalFormatter* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError; +} diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XFixedDecimal_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XFixedDecimal_ICU4XError.d.h deleted file mode 100644 index 152ada239f7..00000000000 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XFixedDecimal_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XFixedDecimal_ICU4XError_D_H -#define diplomat_result_box_ICU4XFixedDecimal_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XFixedDecimal.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XFixedDecimal_ICU4XError { - union { - ICU4XFixedDecimal* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XFixedDecimal_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XFixedDecimal_ICU4XError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalLimitError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalLimitError.d.h new file mode 100644 index 00000000000..7a6b0555ae5 --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalLimitError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalLimitError_D_H +#define diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalLimitError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XFixedDecimal.d.h" +#include "ICU4XFixedDecimalLimitError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalLimitError { + union { + ICU4XFixedDecimal* ok; + ICU4XFixedDecimalLimitError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalLimitError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalLimitError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalParseError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalParseError.d.h new file mode 100644 index 00000000000..c9248b74094 --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalParseError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalParseError_D_H +#define diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalParseError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XFixedDecimal.d.h" +#include "ICU4XFixedDecimalParseError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalParseError { + union { + ICU4XFixedDecimal* ok; + ICU4XFixedDecimalParseError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalParseError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalParseError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XDataError.d.h similarity index 82% rename from ffi/capi/bindings/c/diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError.d.h rename to ffi/capi/bindings/c/diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XDataError.d.h index e68586fd279..9ccafa13ec2 100644 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError.d.h +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XDataError.d.h @@ -1,12 +1,12 @@ -#ifndef diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError_D_H -#define diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XDataError_D_H #include #include #include #include #include "diplomat_runtime.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #include "ICU4XGeneralCategoryNameToMaskMapper.d.h" #ifdef __cplusplus @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError { +typedef struct diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XDataError { union { ICU4XGeneralCategoryNameToMaskMapper* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError; +} diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XDataError.d.h similarity index 62% rename from ffi/capi/bindings/c/diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError.d.h rename to ffi/capi/bindings/c/diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XDataError.d.h index 7a86c70dfdc..3ff10243b2a 100644 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError.d.h +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XDataError.d.h @@ -1,12 +1,12 @@ -#ifndef diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError_D_H -#define diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XDataError_D_H #include #include #include #include #include "diplomat_runtime.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #include "ICU4XGraphemeClusterSegmenter.d.h" #ifdef __cplusplus @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError { +typedef struct diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XDataError { union { ICU4XGraphemeClusterSegmenter* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError; +} diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XIsoDateTime_ICU4XCalendarError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XIsoDateTime_ICU4XCalendarError.d.h new file mode 100644 index 00000000000..af130b0c527 --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XIsoDateTime_ICU4XCalendarError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XIsoDateTime_ICU4XCalendarError_D_H +#define diplomat_result_box_ICU4XIsoDateTime_ICU4XCalendarError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XCalendarError.d.h" +#include "ICU4XIsoDateTime.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XIsoDateTime_ICU4XCalendarError { + union { + ICU4XIsoDateTime* ok; + ICU4XCalendarError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XIsoDateTime_ICU4XCalendarError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XIsoDateTime_ICU4XCalendarError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XIsoDateTime_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XIsoDateTime_ICU4XError.d.h deleted file mode 100644 index 4a70f30d04f..00000000000 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XIsoDateTime_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XIsoDateTime_ICU4XError_D_H -#define diplomat_result_box_ICU4XIsoDateTime_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XIsoDateTime.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XIsoDateTime_ICU4XError { - union { - ICU4XIsoDateTime* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XIsoDateTime_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XIsoDateTime_ICU4XError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XIsoDate_ICU4XCalendarError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XIsoDate_ICU4XCalendarError.d.h new file mode 100644 index 00000000000..0fa2f313ea8 --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XIsoDate_ICU4XCalendarError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XIsoDate_ICU4XCalendarError_D_H +#define diplomat_result_box_ICU4XIsoDate_ICU4XCalendarError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XCalendarError.d.h" +#include "ICU4XIsoDate.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XIsoDate_ICU4XCalendarError { + union { + ICU4XIsoDate* ok; + ICU4XCalendarError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XIsoDate_ICU4XCalendarError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XIsoDate_ICU4XCalendarError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XIsoDate_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XIsoDate_ICU4XError.d.h deleted file mode 100644 index 9e0a8a377b4..00000000000 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XIsoDate_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XIsoDate_ICU4XError_D_H -#define diplomat_result_box_ICU4XIsoDate_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XIsoDate.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XIsoDate_ICU4XError { - union { - ICU4XIsoDate* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XIsoDate_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XIsoDate_ICU4XError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError.d.h new file mode 100644 index 00000000000..2607193662d --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XDataError.d.h" +#include "ICU4XLineSegmenter.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError { + union { + ICU4XLineSegmenter* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XLineSegmenter_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XLineSegmenter_ICU4XError.d.h deleted file mode 100644 index a8c831d5056..00000000000 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XLineSegmenter_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XLineSegmenter_ICU4XError_D_H -#define diplomat_result_box_ICU4XLineSegmenter_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XLineSegmenter.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XLineSegmenter_ICU4XError { - union { - ICU4XLineSegmenter* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XLineSegmenter_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XLineSegmenter_ICU4XError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XListFormatter_ICU4XDataError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XListFormatter_ICU4XDataError.d.h new file mode 100644 index 00000000000..b61d38290bc --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XListFormatter_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XListFormatter_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XListFormatter_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XDataError.d.h" +#include "ICU4XListFormatter.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XListFormatter_ICU4XDataError { + union { + ICU4XListFormatter* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XListFormatter_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XListFormatter_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XListFormatter_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XListFormatter_ICU4XError.d.h deleted file mode 100644 index 5bd497bf3ac..00000000000 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XListFormatter_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XListFormatter_ICU4XError_D_H -#define diplomat_result_box_ICU4XListFormatter_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XListFormatter.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XListFormatter_ICU4XError { - union { - ICU4XListFormatter* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XListFormatter_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XListFormatter_ICU4XError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XLocaleDirectionality_ICU4XDataError.d.h similarity index 55% rename from ffi/capi/bindings/c/diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError.d.h rename to ffi/capi/bindings/c/diplomat_result_box_ICU4XLocaleDirectionality_ICU4XDataError.d.h index 86862fe7cab..3afa0a3212c 100644 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError.d.h +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XLocaleDirectionality_ICU4XDataError.d.h @@ -1,12 +1,12 @@ -#ifndef diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError_D_H -#define diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XLocaleDirectionality_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XLocaleDirectionality_ICU4XDataError_D_H #include #include #include #include #include "diplomat_runtime.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #include "ICU4XLocaleDirectionality.d.h" #ifdef __cplusplus @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError { +typedef struct diplomat_result_box_ICU4XLocaleDirectionality_ICU4XDataError { union { ICU4XLocaleDirectionality* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError; +} diplomat_result_box_ICU4XLocaleDirectionality_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XLocaleDirectionality_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XDataError.d.h similarity index 76% rename from ffi/capi/bindings/c/diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError.d.h rename to ffi/capi/bindings/c/diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XDataError.d.h index e5c87195eba..9bab82bb167 100644 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError.d.h +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XDataError.d.h @@ -1,12 +1,12 @@ -#ifndef diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError_D_H -#define diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XDataError_D_H #include #include #include #include #include "diplomat_runtime.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #include "ICU4XLocaleDisplayNamesFormatter.d.h" #ifdef __cplusplus @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError { +typedef struct diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XDataError { union { ICU4XLocaleDisplayNamesFormatter* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError; +} diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XLocaleParseError.d.h similarity index 72% rename from ffi/capi/bindings/c/diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError.d.h rename to ffi/capi/bindings/c/diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XLocaleParseError.d.h index 705a71684d9..6cfe75d0034 100644 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError.d.h +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XLocaleParseError.d.h @@ -1,13 +1,13 @@ -#ifndef diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError_D_H -#define diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XLocaleParseError_D_H +#define diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XLocaleParseError_D_H #include #include #include #include #include "diplomat_runtime.h" -#include "ICU4XError.d.h" #include "ICU4XLocaleFallbackerWithConfig.d.h" +#include "ICU4XLocaleParseError.d.h" #ifdef __cplusplus namespace capi { @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError { +typedef struct diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XLocaleParseError { union { ICU4XLocaleFallbackerWithConfig* ok; - ICU4XError err; + ICU4XLocaleParseError err; }; bool is_ok; -} diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError; +} diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XLocaleParseError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XLocaleParseError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XLocaleFallbacker_ICU4XDataError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XLocaleFallbacker_ICU4XDataError.d.h new file mode 100644 index 00000000000..a5bd96a278d --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XLocaleFallbacker_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XLocaleFallbacker_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XLocaleFallbacker_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XDataError.d.h" +#include "ICU4XLocaleFallbacker.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XLocaleFallbacker_ICU4XDataError { + union { + ICU4XLocaleFallbacker* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XLocaleFallbacker_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XLocaleFallbacker_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError.d.h deleted file mode 100644 index 491a8548bff..00000000000 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError_D_H -#define diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XLocaleFallbacker.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError { - union { - ICU4XLocaleFallbacker* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XLocale_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XLocale_ICU4XError.d.h deleted file mode 100644 index 78451d1cedc..00000000000 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XLocale_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XLocale_ICU4XError_D_H -#define diplomat_result_box_ICU4XLocale_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XLocale.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XLocale_ICU4XError { - union { - ICU4XLocale* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XLocale_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XLocale_ICU4XError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XLocale_ICU4XLocaleParseError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XLocale_ICU4XLocaleParseError.d.h new file mode 100644 index 00000000000..aff507a8438 --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XLocale_ICU4XLocaleParseError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XLocale_ICU4XLocaleParseError_D_H +#define diplomat_result_box_ICU4XLocale_ICU4XLocaleParseError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XLocale.d.h" +#include "ICU4XLocaleParseError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XLocale_ICU4XLocaleParseError { + union { + ICU4XLocale* ok; + ICU4XLocaleParseError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XLocale_ICU4XLocaleParseError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XLocale_ICU4XLocaleParseError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XMetazoneCalculator_ICU4XDataError.d.h similarity index 55% rename from ffi/capi/bindings/c/diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError.d.h rename to ffi/capi/bindings/c/diplomat_result_box_ICU4XMetazoneCalculator_ICU4XDataError.d.h index 570acbeee33..f74e6aefca3 100644 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError.d.h +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XMetazoneCalculator_ICU4XDataError.d.h @@ -1,12 +1,12 @@ -#ifndef diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError_D_H -#define diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XMetazoneCalculator_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XMetazoneCalculator_ICU4XDataError_D_H #include #include #include #include #include "diplomat_runtime.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #include "ICU4XMetazoneCalculator.d.h" #ifdef __cplusplus @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError { +typedef struct diplomat_result_box_ICU4XMetazoneCalculator_ICU4XDataError { union { ICU4XMetazoneCalculator* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError; +} diplomat_result_box_ICU4XMetazoneCalculator_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XMetazoneCalculator_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XPluralOperands_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XPluralOperands_ICU4XError.d.h deleted file mode 100644 index 13a20ec415e..00000000000 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XPluralOperands_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XPluralOperands_ICU4XError_D_H -#define diplomat_result_box_ICU4XPluralOperands_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XPluralOperands.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XPluralOperands_ICU4XError { - union { - ICU4XPluralOperands* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XPluralOperands_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XPluralOperands_ICU4XError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XPluralOperands_ICU4XFixedDecimalParseError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XPluralOperands_ICU4XFixedDecimalParseError.d.h new file mode 100644 index 00000000000..67a7b9c6829 --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XPluralOperands_ICU4XFixedDecimalParseError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XPluralOperands_ICU4XFixedDecimalParseError_D_H +#define diplomat_result_box_ICU4XPluralOperands_ICU4XFixedDecimalParseError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XFixedDecimalParseError.d.h" +#include "ICU4XPluralOperands.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XPluralOperands_ICU4XFixedDecimalParseError { + union { + ICU4XPluralOperands* ok; + ICU4XFixedDecimalParseError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XPluralOperands_ICU4XFixedDecimalParseError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XPluralOperands_ICU4XFixedDecimalParseError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XPluralRules_ICU4XDataError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XPluralRules_ICU4XDataError.d.h new file mode 100644 index 00000000000..17f2716930f --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XPluralRules_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XPluralRules_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XPluralRules_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XDataError.d.h" +#include "ICU4XPluralRules.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XPluralRules_ICU4XDataError { + union { + ICU4XPluralRules* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XPluralRules_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XPluralRules_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XPluralRules_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XPluralRules_ICU4XError.d.h deleted file mode 100644 index 8e03fe234e4..00000000000 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XPluralRules_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XPluralRules_ICU4XError_D_H -#define diplomat_result_box_ICU4XPluralRules_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XPluralRules.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XPluralRules_ICU4XError { - union { - ICU4XPluralRules* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XPluralRules_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XPluralRules_ICU4XError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError.d.h similarity index 75% rename from ffi/capi/bindings/c/diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError.d.h rename to ffi/capi/bindings/c/diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError.d.h index 792acae4280..960146f740c 100644 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError.d.h +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError.d.h @@ -1,12 +1,12 @@ -#ifndef diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError_D_H -#define diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError_D_H #include #include #include #include #include "diplomat_runtime.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #include "ICU4XPropertyValueNameToEnumMapper.d.h" #ifdef __cplusplus @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError { +typedef struct diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError { union { ICU4XPropertyValueNameToEnumMapper* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError; +} diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XRegionDisplayNames_ICU4XDataError.d.h similarity index 55% rename from ffi/capi/bindings/c/diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError.d.h rename to ffi/capi/bindings/c/diplomat_result_box_ICU4XRegionDisplayNames_ICU4XDataError.d.h index 29ef6dd65ec..4dcc633c519 100644 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError.d.h +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XRegionDisplayNames_ICU4XDataError.d.h @@ -1,12 +1,12 @@ -#ifndef diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError_D_H -#define diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XRegionDisplayNames_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XRegionDisplayNames_ICU4XDataError_D_H #include #include #include #include #include "diplomat_runtime.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #include "ICU4XRegionDisplayNames.d.h" #ifdef __cplusplus @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError { +typedef struct diplomat_result_box_ICU4XRegionDisplayNames_ICU4XDataError { union { ICU4XRegionDisplayNames* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError; +} diplomat_result_box_ICU4XRegionDisplayNames_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XRegionDisplayNames_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XScriptWithExtensions_ICU4XDataError.d.h similarity index 55% rename from ffi/capi/bindings/c/diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError.d.h rename to ffi/capi/bindings/c/diplomat_result_box_ICU4XScriptWithExtensions_ICU4XDataError.d.h index e24c410fdb7..14d214d4a2f 100644 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError.d.h +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XScriptWithExtensions_ICU4XDataError.d.h @@ -1,12 +1,12 @@ -#ifndef diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError_D_H -#define diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XScriptWithExtensions_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XScriptWithExtensions_ICU4XDataError_D_H #include #include #include #include #include "diplomat_runtime.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #include "ICU4XScriptWithExtensions.d.h" #ifdef __cplusplus @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError { +typedef struct diplomat_result_box_ICU4XScriptWithExtensions_ICU4XDataError { union { ICU4XScriptWithExtensions* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError; +} diplomat_result_box_ICU4XScriptWithExtensions_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XScriptWithExtensions_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XSentenceSegmenter_ICU4XDataError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XSentenceSegmenter_ICU4XDataError.d.h new file mode 100644 index 00000000000..f7ead2f2887 --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XSentenceSegmenter_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XSentenceSegmenter_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XSentenceSegmenter_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XDataError.d.h" +#include "ICU4XSentenceSegmenter.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XSentenceSegmenter_ICU4XDataError { + union { + ICU4XSentenceSegmenter* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XSentenceSegmenter_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XSentenceSegmenter_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError.d.h deleted file mode 100644 index 5bce2f5a2c6..00000000000 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError_D_H -#define diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XSentenceSegmenter.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError { - union { - ICU4XSentenceSegmenter* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XDataError.d.h similarity index 78% rename from ffi/capi/bindings/c/diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XError.d.h rename to ffi/capi/bindings/c/diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XDataError.d.h index 1e3e0ef74fe..db31968fdc3 100644 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XError.d.h +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XDataError.d.h @@ -1,12 +1,12 @@ -#ifndef diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XError_D_H -#define diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XDataError_D_H #include #include #include #include #include "diplomat_runtime.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #include "ICU4XTimeZoneIdMapperWithFastCanonicalization.d.h" #ifdef __cplusplus @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XError { +typedef struct diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XDataError { union { ICU4XTimeZoneIdMapperWithFastCanonicalization* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XError; +} diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XDataError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XDataError.d.h new file mode 100644 index 00000000000..96aa5216d5c --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XDataError.d.h" +#include "ICU4XTimeZoneIdMapper.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XDataError { + union { + ICU4XTimeZoneIdMapper* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XError.d.h deleted file mode 100644 index ecbdf46222d..00000000000 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XError_D_H -#define diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XTimeZoneIdMapper.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XError { - union { - ICU4XTimeZoneIdMapper* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XTime_ICU4XCalendarError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XTime_ICU4XCalendarError.d.h new file mode 100644 index 00000000000..9e32ce8b3e1 --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XTime_ICU4XCalendarError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XTime_ICU4XCalendarError_D_H +#define diplomat_result_box_ICU4XTime_ICU4XCalendarError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XCalendarError.d.h" +#include "ICU4XTime.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XTime_ICU4XCalendarError { + union { + ICU4XTime* ok; + ICU4XCalendarError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XTime_ICU4XCalendarError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XTime_ICU4XCalendarError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XTime_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XTime_ICU4XError.d.h deleted file mode 100644 index 5eaf9d55cd1..00000000000 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XTime_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XTime_ICU4XError_D_H -#define diplomat_result_box_ICU4XTime_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XTime.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XTime_ICU4XError { - union { - ICU4XTime* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XTime_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XTime_ICU4XError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XTitlecaseMapper_ICU4XDataError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XTitlecaseMapper_ICU4XDataError.d.h new file mode 100644 index 00000000000..12d193c7cb4 --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XTitlecaseMapper_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XTitlecaseMapper_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XTitlecaseMapper_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XDataError.d.h" +#include "ICU4XTitlecaseMapper.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XTitlecaseMapper_ICU4XDataError { + union { + ICU4XTitlecaseMapper* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XTitlecaseMapper_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XTitlecaseMapper_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError.d.h deleted file mode 100644 index ca0d34815d7..00000000000 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError_D_H -#define diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XTitlecaseMapper.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError { - union { - ICU4XTitlecaseMapper* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XUnicodeSetData_ICU4XDataError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XUnicodeSetData_ICU4XDataError.d.h new file mode 100644 index 00000000000..0adae4ef002 --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XUnicodeSetData_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XUnicodeSetData_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XUnicodeSetData_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XDataError.d.h" +#include "ICU4XUnicodeSetData.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XUnicodeSetData_ICU4XDataError { + union { + ICU4XUnicodeSetData* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XUnicodeSetData_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XUnicodeSetData_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XUnicodeSetData_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XUnicodeSetData_ICU4XError.d.h deleted file mode 100644 index 3b0925f5b26..00000000000 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XUnicodeSetData_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XUnicodeSetData_ICU4XError_D_H -#define diplomat_result_box_ICU4XUnicodeSetData_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XUnicodeSetData.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XUnicodeSetData_ICU4XError { - union { - ICU4XUnicodeSetData* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XUnicodeSetData_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XUnicodeSetData_ICU4XError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XDataError.d.h similarity index 54% rename from ffi/capi/bindings/c/diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XError.d.h rename to ffi/capi/bindings/c/diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XDataError.d.h index 24f24300f51..dbdc60c262e 100644 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XError.d.h +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XDataError.d.h @@ -1,12 +1,12 @@ -#ifndef diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XError_D_H -#define diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XDataError_D_H #include #include #include #include #include "diplomat_runtime.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #include "ICU4XUnitsConverterFactory.d.h" #ifdef __cplusplus @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XError { +typedef struct diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XDataError { union { ICU4XUnitsConverterFactory* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XError; +} diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XWeekCalculator_ICU4XDataError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XWeekCalculator_ICU4XDataError.d.h new file mode 100644 index 00000000000..2604e3b5aff --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XWeekCalculator_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XWeekCalculator_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XWeekCalculator_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XDataError.d.h" +#include "ICU4XWeekCalculator.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XWeekCalculator_ICU4XDataError { + union { + ICU4XWeekCalculator* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XWeekCalculator_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XWeekCalculator_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XWeekCalculator_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XWeekCalculator_ICU4XError.d.h deleted file mode 100644 index 3bdb0caf4be..00000000000 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XWeekCalculator_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XWeekCalculator_ICU4XError_D_H -#define diplomat_result_box_ICU4XWeekCalculator_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XWeekCalculator.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XWeekCalculator_ICU4XError { - union { - ICU4XWeekCalculator* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XWeekCalculator_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XWeekCalculator_ICU4XError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XWordSegmenter_ICU4XDataError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XWordSegmenter_ICU4XDataError.d.h new file mode 100644 index 00000000000..756a4c14f9b --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_box_ICU4XWordSegmenter_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XWordSegmenter_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XWordSegmenter_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XDataError.d.h" +#include "ICU4XWordSegmenter.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XWordSegmenter_ICU4XDataError { + union { + ICU4XWordSegmenter* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XWordSegmenter_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XWordSegmenter_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XWordSegmenter_ICU4XError.d.h b/ffi/capi/bindings/c/diplomat_result_box_ICU4XWordSegmenter_ICU4XError.d.h deleted file mode 100644 index 4be99625e02..00000000000 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XWordSegmenter_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XWordSegmenter_ICU4XError_D_H -#define diplomat_result_box_ICU4XWordSegmenter_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XWordSegmenter.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XWordSegmenter_ICU4XError { - union { - ICU4XWordSegmenter* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XWordSegmenter_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XWordSegmenter_ICU4XError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_void_ICU4XDataError.d.h b/ffi/capi/bindings/c/diplomat_result_void_ICU4XDataError.d.h new file mode 100644 index 00000000000..e169234a377 --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_void_ICU4XDataError.d.h @@ -0,0 +1,29 @@ +#ifndef diplomat_result_void_ICU4XDataError_D_H +#define diplomat_result_void_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XDataError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_void_ICU4XDataError { + union { + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_void_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_void_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_void_ICU4XLocaleParseError.d.h b/ffi/capi/bindings/c/diplomat_result_void_ICU4XLocaleParseError.d.h new file mode 100644 index 00000000000..5f3c2523bd3 --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_void_ICU4XLocaleParseError.d.h @@ -0,0 +1,29 @@ +#ifndef diplomat_result_void_ICU4XLocaleParseError_D_H +#define diplomat_result_void_ICU4XLocaleParseError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XLocaleParseError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_void_ICU4XLocaleParseError { + union { + ICU4XLocaleParseError err; + }; + bool is_ok; +} diplomat_result_void_ICU4XLocaleParseError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_void_ICU4XLocaleParseError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_void_ICU4XTimeZoneInvalidIdError.d.h b/ffi/capi/bindings/c/diplomat_result_void_ICU4XTimeZoneInvalidIdError.d.h new file mode 100644 index 00000000000..0c147e908c6 --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_void_ICU4XTimeZoneInvalidIdError.d.h @@ -0,0 +1,29 @@ +#ifndef diplomat_result_void_ICU4XTimeZoneInvalidIdError_D_H +#define diplomat_result_void_ICU4XTimeZoneInvalidIdError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XTimeZoneInvalidIdError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_void_ICU4XTimeZoneInvalidIdError { + union { + ICU4XTimeZoneInvalidIdError err; + }; + bool is_ok; +} diplomat_result_void_ICU4XTimeZoneInvalidIdError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_void_ICU4XTimeZoneInvalidIdError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_void_ICU4XTimeZoneInvalidOffsetError.d.h b/ffi/capi/bindings/c/diplomat_result_void_ICU4XTimeZoneInvalidOffsetError.d.h new file mode 100644 index 00000000000..f1fddd13595 --- /dev/null +++ b/ffi/capi/bindings/c/diplomat_result_void_ICU4XTimeZoneInvalidOffsetError.d.h @@ -0,0 +1,29 @@ +#ifndef diplomat_result_void_ICU4XTimeZoneInvalidOffsetError_D_H +#define diplomat_result_void_ICU4XTimeZoneInvalidOffsetError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XTimeZoneInvalidOffsetError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_void_ICU4XTimeZoneInvalidOffsetError { + union { + ICU4XTimeZoneInvalidOffsetError err; + }; + bool is_ok; +} diplomat_result_void_ICU4XTimeZoneInvalidOffsetError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_void_ICU4XTimeZoneInvalidOffsetError_D_H diff --git a/ffi/capi/bindings/cpp/ICU4XBidi.d.hpp b/ffi/capi/bindings/cpp/ICU4XBidi.d.hpp index 1ea7d9c9bc0..62ca3d5c5d9 100644 --- a/ffi/capi/bindings/cpp/ICU4XBidi.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XBidi.d.hpp @@ -9,18 +9,18 @@ #include #include "diplomat_runtime.hpp" #include "ICU4XBidi.d.h" -#include "ICU4XError.d.hpp" +#include "ICU4XDataError.d.hpp" class ICU4XBidiInfo; class ICU4XDataProvider; class ICU4XReorderedIndexMap; -class ICU4XError; +class ICU4XDataError; class ICU4XBidi { public: - inline static diplomat::result, ICU4XError> create(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> create(const ICU4XDataProvider& provider); inline std::unique_ptr for_text(std::string_view text, uint8_t default_level) const; diff --git a/ffi/capi/bindings/cpp/ICU4XBidi.h b/ffi/capi/bindings/cpp/ICU4XBidi.h index 26187beb820..64e9577ed60 100644 --- a/ffi/capi/bindings/cpp/ICU4XBidi.h +++ b/ffi/capi/bindings/cpp/ICU4XBidi.h @@ -12,7 +12,7 @@ #include "ICU4XDataProvider.h" #include "ICU4XReorderedIndexMap.d.h" #include "ICU4XReorderedIndexMap.h" -#include "diplomat_result_box_ICU4XBidi_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XBidi_ICU4XDataError.d.h" #include "ICU4XBidi.d.h" @@ -22,7 +22,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XBidi_ICU4XError ICU4XBidi_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XBidi_ICU4XDataError ICU4XBidi_create(const ICU4XDataProvider* provider); ICU4XBidiInfo* ICU4XBidi_for_text(const ICU4XBidi* self, const char* text_data, size_t text_len, uint8_t default_level); diff --git a/ffi/capi/bindings/cpp/ICU4XBidi.hpp b/ffi/capi/bindings/cpp/ICU4XBidi.hpp index 87aea0a01c8..77655c55c91 100644 --- a/ffi/capi/bindings/cpp/ICU4XBidi.hpp +++ b/ffi/capi/bindings/cpp/ICU4XBidi.hpp @@ -12,14 +12,14 @@ #include "diplomat_runtime.hpp" #include "ICU4XBidi.h" #include "ICU4XBidiInfo.hpp" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" -#include "ICU4XError.hpp" #include "ICU4XReorderedIndexMap.hpp" -inline diplomat::result, ICU4XError> ICU4XBidi::create(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XBidi::create(const ICU4XDataProvider& provider) { auto result = capi::ICU4XBidi_create(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XBidi::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XBidi::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline std::unique_ptr ICU4XBidi::for_text(std::string_view text, uint8_t default_level) const { diff --git a/ffi/capi/bindings/cpp/ICU4XCalendar.d.hpp b/ffi/capi/bindings/cpp/ICU4XCalendar.d.hpp index bfb1de4a108..d1c52607021 100644 --- a/ffi/capi/bindings/cpp/ICU4XCalendar.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XCalendar.d.hpp @@ -10,20 +10,20 @@ #include "diplomat_runtime.hpp" #include "ICU4XAnyCalendarKind.d.hpp" #include "ICU4XCalendar.d.h" -#include "ICU4XError.d.hpp" +#include "ICU4XDataError.d.hpp" class ICU4XDataProvider; class ICU4XLocale; class ICU4XAnyCalendarKind; -class ICU4XError; +class ICU4XDataError; class ICU4XCalendar { public: - inline static diplomat::result, ICU4XError> create_for_locale(const ICU4XDataProvider& provider, const ICU4XLocale& locale); + inline static diplomat::result, ICU4XDataError> create_for_locale(const ICU4XDataProvider& provider, const ICU4XLocale& locale); - inline static diplomat::result, ICU4XError> create_for_kind(const ICU4XDataProvider& provider, ICU4XAnyCalendarKind kind); + inline static diplomat::result, ICU4XDataError> create_for_kind(const ICU4XDataProvider& provider, ICU4XAnyCalendarKind kind); inline ICU4XAnyCalendarKind kind() const; diff --git a/ffi/capi/bindings/cpp/ICU4XCalendar.h b/ffi/capi/bindings/cpp/ICU4XCalendar.h index b3e735a2900..397126a3841 100644 --- a/ffi/capi/bindings/cpp/ICU4XCalendar.h +++ b/ffi/capi/bindings/cpp/ICU4XCalendar.h @@ -12,7 +12,7 @@ #include "ICU4XDataProvider.h" #include "ICU4XLocale.d.h" #include "ICU4XLocale.h" -#include "diplomat_result_box_ICU4XCalendar_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XCalendar_ICU4XDataError.d.h" #include "ICU4XCalendar.d.h" @@ -22,9 +22,9 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XCalendar_ICU4XError ICU4XCalendar_create_for_locale(const ICU4XDataProvider* provider, const ICU4XLocale* locale); +diplomat_result_box_ICU4XCalendar_ICU4XDataError ICU4XCalendar_create_for_locale(const ICU4XDataProvider* provider, const ICU4XLocale* locale); -diplomat_result_box_ICU4XCalendar_ICU4XError ICU4XCalendar_create_for_kind(const ICU4XDataProvider* provider, ICU4XAnyCalendarKind kind); +diplomat_result_box_ICU4XCalendar_ICU4XDataError ICU4XCalendar_create_for_kind(const ICU4XDataProvider* provider, ICU4XAnyCalendarKind kind); ICU4XAnyCalendarKind ICU4XCalendar_kind(const ICU4XCalendar* self); diff --git a/ffi/capi/bindings/cpp/ICU4XCalendar.hpp b/ffi/capi/bindings/cpp/ICU4XCalendar.hpp index c329fb4437a..04977fd20d9 100644 --- a/ffi/capi/bindings/cpp/ICU4XCalendar.hpp +++ b/ffi/capi/bindings/cpp/ICU4XCalendar.hpp @@ -12,21 +12,21 @@ #include "diplomat_runtime.hpp" #include "ICU4XAnyCalendarKind.hpp" #include "ICU4XCalendar.h" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" -#include "ICU4XError.hpp" #include "ICU4XLocale.hpp" -inline diplomat::result, ICU4XError> ICU4XCalendar::create_for_locale(const ICU4XDataProvider& provider, const ICU4XLocale& locale) { +inline diplomat::result, ICU4XDataError> ICU4XCalendar::create_for_locale(const ICU4XDataProvider& provider, const ICU4XLocale& locale) { auto result = capi::ICU4XCalendar_create_for_locale(provider.AsFFI(), locale.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCalendar::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCalendar::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCalendar::create_for_kind(const ICU4XDataProvider& provider, ICU4XAnyCalendarKind kind) { +inline diplomat::result, ICU4XDataError> ICU4XCalendar::create_for_kind(const ICU4XDataProvider& provider, ICU4XAnyCalendarKind kind) { auto result = capi::ICU4XCalendar_create_for_kind(provider.AsFFI(), kind.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCalendar::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCalendar::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline ICU4XAnyCalendarKind ICU4XCalendar::kind() const { diff --git a/ffi/capi/bindings/cpp/ICU4XCalendarError.d.h b/ffi/capi/bindings/cpp/ICU4XCalendarError.d.h new file mode 100644 index 00000000000..3d896ab5f6a --- /dev/null +++ b/ffi/capi/bindings/cpp/ICU4XCalendarError.d.h @@ -0,0 +1,29 @@ +#ifndef ICU4XCalendarError_D_H +#define ICU4XCalendarError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef enum ICU4XCalendarError { + ICU4XCalendarError_Unknown = 0, + ICU4XCalendarError_OutOfRange = 1, + ICU4XCalendarError_UnknownEra = 2, + ICU4XCalendarError_UnknownMonthCode = 3, +} ICU4XCalendarError; + + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // ICU4XCalendarError_D_H diff --git a/ffi/capi/bindings/cpp/ICU4XCalendarError.d.hpp b/ffi/capi/bindings/cpp/ICU4XCalendarError.d.hpp new file mode 100644 index 00000000000..901f6fbad9c --- /dev/null +++ b/ffi/capi/bindings/cpp/ICU4XCalendarError.d.hpp @@ -0,0 +1,37 @@ +#ifndef ICU4XCalendarError_D_HPP +#define ICU4XCalendarError_D_HPP + +#include +#include +#include +#include +#include +#include +#include "diplomat_runtime.hpp" +#include "ICU4XCalendarError.d.h" + + +class ICU4XCalendarError { +public: + enum Value { + Unknown = 0, + OutOfRange = 1, + UnknownEra = 2, + UnknownMonthCode = 3, + }; + + ICU4XCalendarError() = default; + // Implicit conversions between enum and ::Value + constexpr ICU4XCalendarError(Value v) : value(v) {} + constexpr operator Value() const { return value; } + // Prevent usage as boolean value + explicit operator bool() const = delete; + + inline capi::ICU4XCalendarError AsFFI() const; + inline static ICU4XCalendarError FromFFI(capi::ICU4XCalendarError c_enum); +private: + Value value; +}; + + +#endif // ICU4XCalendarError_D_HPP diff --git a/ffi/capi/bindings/cpp/ICU4XCalendarError.h b/ffi/capi/bindings/cpp/ICU4XCalendarError.h new file mode 100644 index 00000000000..1781db635b6 --- /dev/null +++ b/ffi/capi/bindings/cpp/ICU4XCalendarError.h @@ -0,0 +1,26 @@ +#ifndef ICU4XCalendarError_H +#define ICU4XCalendarError_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + +#include "ICU4XCalendarError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +// No Content + + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // ICU4XCalendarError_H diff --git a/ffi/capi/bindings/cpp/ICU4XCalendarError.hpp b/ffi/capi/bindings/cpp/ICU4XCalendarError.hpp new file mode 100644 index 00000000000..3446f6533bb --- /dev/null +++ b/ffi/capi/bindings/cpp/ICU4XCalendarError.hpp @@ -0,0 +1,31 @@ +#ifndef ICU4XCalendarError_HPP +#define ICU4XCalendarError_HPP + +#include "ICU4XCalendarError.d.hpp" + +#include +#include +#include +#include +#include +#include +#include "diplomat_runtime.hpp" +#include "ICU4XCalendarError.h" + + +inline capi::ICU4XCalendarError ICU4XCalendarError::AsFFI() const { + return static_cast(value); +} + +inline ICU4XCalendarError ICU4XCalendarError::FromFFI(capi::ICU4XCalendarError c_enum) { + switch (c_enum) { + case capi::ICU4XCalendarError_Unknown: + case capi::ICU4XCalendarError_OutOfRange: + case capi::ICU4XCalendarError_UnknownEra: + case capi::ICU4XCalendarError_UnknownMonthCode: + return static_cast(c_enum); + default: + abort(); + } +} +#endif // ICU4XCalendarError_HPP diff --git a/ffi/capi/bindings/cpp/ICU4XCanonicalCombiningClassMap.d.hpp b/ffi/capi/bindings/cpp/ICU4XCanonicalCombiningClassMap.d.hpp index e384401a8d2..5158d6f55a7 100644 --- a/ffi/capi/bindings/cpp/ICU4XCanonicalCombiningClassMap.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XCanonicalCombiningClassMap.d.hpp @@ -9,16 +9,16 @@ #include #include "diplomat_runtime.hpp" #include "ICU4XCanonicalCombiningClassMap.d.h" -#include "ICU4XError.d.hpp" +#include "ICU4XDataError.d.hpp" class ICU4XDataProvider; -class ICU4XError; +class ICU4XDataError; class ICU4XCanonicalCombiningClassMap { public: - inline static diplomat::result, ICU4XError> create(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> create(const ICU4XDataProvider& provider); inline uint8_t get(char32_t ch) const; diff --git a/ffi/capi/bindings/cpp/ICU4XCanonicalCombiningClassMap.h b/ffi/capi/bindings/cpp/ICU4XCanonicalCombiningClassMap.h index bea5928bbc4..bd392840a98 100644 --- a/ffi/capi/bindings/cpp/ICU4XCanonicalCombiningClassMap.h +++ b/ffi/capi/bindings/cpp/ICU4XCanonicalCombiningClassMap.h @@ -8,7 +8,7 @@ #include "diplomat_runtime.h" #include "ICU4XDataProvider.d.h" #include "ICU4XDataProvider.h" -#include "diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XDataError.d.h" #include "ICU4XCanonicalCombiningClassMap.d.h" @@ -18,7 +18,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError ICU4XCanonicalCombiningClassMap_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XDataError ICU4XCanonicalCombiningClassMap_create(const ICU4XDataProvider* provider); uint8_t ICU4XCanonicalCombiningClassMap_get(const ICU4XCanonicalCombiningClassMap* self, char32_t ch); diff --git a/ffi/capi/bindings/cpp/ICU4XCanonicalCombiningClassMap.hpp b/ffi/capi/bindings/cpp/ICU4XCanonicalCombiningClassMap.hpp index cc22b4f8bb1..299572857e0 100644 --- a/ffi/capi/bindings/cpp/ICU4XCanonicalCombiningClassMap.hpp +++ b/ffi/capi/bindings/cpp/ICU4XCanonicalCombiningClassMap.hpp @@ -11,13 +11,13 @@ #include #include "diplomat_runtime.hpp" #include "ICU4XCanonicalCombiningClassMap.h" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" -#include "ICU4XError.hpp" -inline diplomat::result, ICU4XError> ICU4XCanonicalCombiningClassMap::create(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCanonicalCombiningClassMap::create(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCanonicalCombiningClassMap_create(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCanonicalCombiningClassMap::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCanonicalCombiningClassMap::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline uint8_t ICU4XCanonicalCombiningClassMap::get(char32_t ch) const { diff --git a/ffi/capi/bindings/cpp/ICU4XCanonicalComposition.d.hpp b/ffi/capi/bindings/cpp/ICU4XCanonicalComposition.d.hpp index 20e8a19a618..f214b3e2451 100644 --- a/ffi/capi/bindings/cpp/ICU4XCanonicalComposition.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XCanonicalComposition.d.hpp @@ -9,16 +9,16 @@ #include #include "diplomat_runtime.hpp" #include "ICU4XCanonicalComposition.d.h" -#include "ICU4XError.d.hpp" +#include "ICU4XDataError.d.hpp" class ICU4XDataProvider; -class ICU4XError; +class ICU4XDataError; class ICU4XCanonicalComposition { public: - inline static diplomat::result, ICU4XError> create(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> create(const ICU4XDataProvider& provider); inline char32_t compose(char32_t starter, char32_t second) const; diff --git a/ffi/capi/bindings/cpp/ICU4XCanonicalComposition.h b/ffi/capi/bindings/cpp/ICU4XCanonicalComposition.h index ffa176fc257..28a4e2322ef 100644 --- a/ffi/capi/bindings/cpp/ICU4XCanonicalComposition.h +++ b/ffi/capi/bindings/cpp/ICU4XCanonicalComposition.h @@ -8,7 +8,7 @@ #include "diplomat_runtime.h" #include "ICU4XDataProvider.d.h" #include "ICU4XDataProvider.h" -#include "diplomat_result_box_ICU4XCanonicalComposition_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XCanonicalComposition_ICU4XDataError.d.h" #include "ICU4XCanonicalComposition.d.h" @@ -18,7 +18,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XCanonicalComposition_ICU4XError ICU4XCanonicalComposition_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCanonicalComposition_ICU4XDataError ICU4XCanonicalComposition_create(const ICU4XDataProvider* provider); char32_t ICU4XCanonicalComposition_compose(const ICU4XCanonicalComposition* self, char32_t starter, char32_t second); diff --git a/ffi/capi/bindings/cpp/ICU4XCanonicalComposition.hpp b/ffi/capi/bindings/cpp/ICU4XCanonicalComposition.hpp index b0476f9445b..420306b9e1c 100644 --- a/ffi/capi/bindings/cpp/ICU4XCanonicalComposition.hpp +++ b/ffi/capi/bindings/cpp/ICU4XCanonicalComposition.hpp @@ -11,13 +11,13 @@ #include #include "diplomat_runtime.hpp" #include "ICU4XCanonicalComposition.h" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" -#include "ICU4XError.hpp" -inline diplomat::result, ICU4XError> ICU4XCanonicalComposition::create(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCanonicalComposition::create(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCanonicalComposition_create(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCanonicalComposition::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCanonicalComposition::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline char32_t ICU4XCanonicalComposition::compose(char32_t starter, char32_t second) const { diff --git a/ffi/capi/bindings/cpp/ICU4XCanonicalDecomposition.d.hpp b/ffi/capi/bindings/cpp/ICU4XCanonicalDecomposition.d.hpp index 97d0716947e..f21571673dd 100644 --- a/ffi/capi/bindings/cpp/ICU4XCanonicalDecomposition.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XCanonicalDecomposition.d.hpp @@ -9,18 +9,18 @@ #include #include "diplomat_runtime.hpp" #include "ICU4XCanonicalDecomposition.d.h" +#include "ICU4XDataError.d.hpp" #include "ICU4XDecomposed.d.hpp" -#include "ICU4XError.d.hpp" class ICU4XDataProvider; struct ICU4XDecomposed; -class ICU4XError; +class ICU4XDataError; class ICU4XCanonicalDecomposition { public: - inline static diplomat::result, ICU4XError> create(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> create(const ICU4XDataProvider& provider); inline ICU4XDecomposed decompose(char32_t c) const; diff --git a/ffi/capi/bindings/cpp/ICU4XCanonicalDecomposition.h b/ffi/capi/bindings/cpp/ICU4XCanonicalDecomposition.h index b6c804557e8..1a8f3f622eb 100644 --- a/ffi/capi/bindings/cpp/ICU4XCanonicalDecomposition.h +++ b/ffi/capi/bindings/cpp/ICU4XCanonicalDecomposition.h @@ -10,7 +10,7 @@ #include "ICU4XDataProvider.h" #include "ICU4XDecomposed.d.h" #include "ICU4XDecomposed.h" -#include "diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XDataError.d.h" #include "ICU4XCanonicalDecomposition.d.h" @@ -20,7 +20,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError ICU4XCanonicalDecomposition_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XDataError ICU4XCanonicalDecomposition_create(const ICU4XDataProvider* provider); ICU4XDecomposed ICU4XCanonicalDecomposition_decompose(const ICU4XCanonicalDecomposition* self, char32_t c); diff --git a/ffi/capi/bindings/cpp/ICU4XCanonicalDecomposition.hpp b/ffi/capi/bindings/cpp/ICU4XCanonicalDecomposition.hpp index 1e298999279..3c56b9278c9 100644 --- a/ffi/capi/bindings/cpp/ICU4XCanonicalDecomposition.hpp +++ b/ffi/capi/bindings/cpp/ICU4XCanonicalDecomposition.hpp @@ -11,14 +11,14 @@ #include #include "diplomat_runtime.hpp" #include "ICU4XCanonicalDecomposition.h" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" #include "ICU4XDecomposed.hpp" -#include "ICU4XError.hpp" -inline diplomat::result, ICU4XError> ICU4XCanonicalDecomposition::create(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCanonicalDecomposition::create(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCanonicalDecomposition_create(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCanonicalDecomposition::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCanonicalDecomposition::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline ICU4XDecomposed ICU4XCanonicalDecomposition::decompose(char32_t c) const { diff --git a/ffi/capi/bindings/cpp/ICU4XCaseMapCloser.d.hpp b/ffi/capi/bindings/cpp/ICU4XCaseMapCloser.d.hpp index eee9fe87522..d7beaf0ae8f 100644 --- a/ffi/capi/bindings/cpp/ICU4XCaseMapCloser.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XCaseMapCloser.d.hpp @@ -9,17 +9,17 @@ #include #include "diplomat_runtime.hpp" #include "ICU4XCaseMapCloser.d.h" -#include "ICU4XError.d.hpp" +#include "ICU4XDataError.d.hpp" class ICU4XCodePointSetBuilder; class ICU4XDataProvider; -class ICU4XError; +class ICU4XDataError; class ICU4XCaseMapCloser { public: - inline static diplomat::result, ICU4XError> create(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> create(const ICU4XDataProvider& provider); inline void add_case_closure_to(char32_t c, ICU4XCodePointSetBuilder& builder) const; diff --git a/ffi/capi/bindings/cpp/ICU4XCaseMapCloser.h b/ffi/capi/bindings/cpp/ICU4XCaseMapCloser.h index 85173039ff8..56a0223da6d 100644 --- a/ffi/capi/bindings/cpp/ICU4XCaseMapCloser.h +++ b/ffi/capi/bindings/cpp/ICU4XCaseMapCloser.h @@ -10,7 +10,7 @@ #include "ICU4XCodePointSetBuilder.h" #include "ICU4XDataProvider.d.h" #include "ICU4XDataProvider.h" -#include "diplomat_result_box_ICU4XCaseMapCloser_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XCaseMapCloser_ICU4XDataError.d.h" #include "ICU4XCaseMapCloser.d.h" @@ -20,7 +20,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XCaseMapCloser_ICU4XError ICU4XCaseMapCloser_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCaseMapCloser_ICU4XDataError ICU4XCaseMapCloser_create(const ICU4XDataProvider* provider); void ICU4XCaseMapCloser_add_case_closure_to(const ICU4XCaseMapCloser* self, char32_t c, ICU4XCodePointSetBuilder* builder); diff --git a/ffi/capi/bindings/cpp/ICU4XCaseMapCloser.hpp b/ffi/capi/bindings/cpp/ICU4XCaseMapCloser.hpp index 2694699283a..20d8ebedf50 100644 --- a/ffi/capi/bindings/cpp/ICU4XCaseMapCloser.hpp +++ b/ffi/capi/bindings/cpp/ICU4XCaseMapCloser.hpp @@ -12,13 +12,13 @@ #include "diplomat_runtime.hpp" #include "ICU4XCaseMapCloser.h" #include "ICU4XCodePointSetBuilder.hpp" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" -#include "ICU4XError.hpp" -inline diplomat::result, ICU4XError> ICU4XCaseMapCloser::create(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCaseMapCloser::create(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCaseMapCloser_create(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCaseMapCloser::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCaseMapCloser::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline void ICU4XCaseMapCloser::add_case_closure_to(char32_t c, ICU4XCodePointSetBuilder& builder) const { diff --git a/ffi/capi/bindings/cpp/ICU4XCaseMapper.d.hpp b/ffi/capi/bindings/cpp/ICU4XCaseMapper.d.hpp index bdb77d6ce09..e994654a0c8 100644 --- a/ffi/capi/bindings/cpp/ICU4XCaseMapper.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XCaseMapper.d.hpp @@ -9,20 +9,20 @@ #include #include "diplomat_runtime.hpp" #include "ICU4XCaseMapper.d.h" -#include "ICU4XError.d.hpp" +#include "ICU4XDataError.d.hpp" #include "ICU4XTitlecaseOptionsV1.d.hpp" class ICU4XCodePointSetBuilder; class ICU4XDataProvider; class ICU4XLocale; struct ICU4XTitlecaseOptionsV1; -class ICU4XError; +class ICU4XDataError; class ICU4XCaseMapper { public: - inline static diplomat::result, ICU4XError> create(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> create(const ICU4XDataProvider& provider); inline diplomat::result lowercase(std::string_view s, const ICU4XLocale& locale) const; diff --git a/ffi/capi/bindings/cpp/ICU4XCaseMapper.h b/ffi/capi/bindings/cpp/ICU4XCaseMapper.h index d278dd38e56..93f101239b0 100644 --- a/ffi/capi/bindings/cpp/ICU4XCaseMapper.h +++ b/ffi/capi/bindings/cpp/ICU4XCaseMapper.h @@ -14,7 +14,7 @@ #include "ICU4XLocale.h" #include "ICU4XTitlecaseOptionsV1.d.h" #include "ICU4XTitlecaseOptionsV1.h" -#include "diplomat_result_box_ICU4XCaseMapper_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XCaseMapper_ICU4XDataError.d.h" #include "ICU4XCaseMapper.d.h" @@ -24,7 +24,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XCaseMapper_ICU4XError ICU4XCaseMapper_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCaseMapper_ICU4XDataError ICU4XCaseMapper_create(const ICU4XDataProvider* provider); void ICU4XCaseMapper_lowercase(const ICU4XCaseMapper* self, const char* s_data, size_t s_len, const ICU4XLocale* locale, DiplomatWrite* write); diff --git a/ffi/capi/bindings/cpp/ICU4XCaseMapper.hpp b/ffi/capi/bindings/cpp/ICU4XCaseMapper.hpp index c244be3ea93..93fa3bbc4f9 100644 --- a/ffi/capi/bindings/cpp/ICU4XCaseMapper.hpp +++ b/ffi/capi/bindings/cpp/ICU4XCaseMapper.hpp @@ -12,15 +12,15 @@ #include "diplomat_runtime.hpp" #include "ICU4XCaseMapper.h" #include "ICU4XCodePointSetBuilder.hpp" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" -#include "ICU4XError.hpp" #include "ICU4XLocale.hpp" #include "ICU4XTitlecaseOptionsV1.hpp" -inline diplomat::result, ICU4XError> ICU4XCaseMapper::create(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCaseMapper::create(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCaseMapper_create(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCaseMapper::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCaseMapper::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline diplomat::result ICU4XCaseMapper::lowercase(std::string_view s, const ICU4XLocale& locale) const { diff --git a/ffi/capi/bindings/cpp/ICU4XCodePointMapData16.d.hpp b/ffi/capi/bindings/cpp/ICU4XCodePointMapData16.d.hpp index 518be88199d..158fa5654e4 100644 --- a/ffi/capi/bindings/cpp/ICU4XCodePointMapData16.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XCodePointMapData16.d.hpp @@ -9,12 +9,12 @@ #include #include "diplomat_runtime.hpp" #include "ICU4XCodePointMapData16.d.h" -#include "ICU4XError.d.hpp" +#include "ICU4XDataError.d.hpp" class ICU4XCodePointRangeIterator; class ICU4XCodePointSetData; class ICU4XDataProvider; -class ICU4XError; +class ICU4XDataError; class ICU4XCodePointMapData16 { @@ -30,7 +30,7 @@ class ICU4XCodePointMapData16 { inline std::unique_ptr get_set_for_value(uint16_t value) const; - inline static diplomat::result, ICU4XError> load_script(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_script(const ICU4XDataProvider& provider); inline const capi::ICU4XCodePointMapData16* AsFFI() const; inline capi::ICU4XCodePointMapData16* AsFFI(); diff --git a/ffi/capi/bindings/cpp/ICU4XCodePointMapData16.h b/ffi/capi/bindings/cpp/ICU4XCodePointMapData16.h index 88d5a021c0d..b59d3ca94a2 100644 --- a/ffi/capi/bindings/cpp/ICU4XCodePointMapData16.h +++ b/ffi/capi/bindings/cpp/ICU4XCodePointMapData16.h @@ -12,7 +12,7 @@ #include "ICU4XCodePointSetData.h" #include "ICU4XDataProvider.d.h" #include "ICU4XDataProvider.h" -#include "diplomat_result_box_ICU4XCodePointMapData16_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XCodePointMapData16_ICU4XDataError.d.h" #include "ICU4XCodePointMapData16.d.h" @@ -32,7 +32,7 @@ ICU4XCodePointRangeIterator* ICU4XCodePointMapData16_iter_ranges_for_value_compl ICU4XCodePointSetData* ICU4XCodePointMapData16_get_set_for_value(const ICU4XCodePointMapData16* self, uint16_t value); -diplomat_result_box_ICU4XCodePointMapData16_ICU4XError ICU4XCodePointMapData16_load_script(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointMapData16_ICU4XDataError ICU4XCodePointMapData16_load_script(const ICU4XDataProvider* provider); void ICU4XCodePointMapData16_destroy(ICU4XCodePointMapData16* self); diff --git a/ffi/capi/bindings/cpp/ICU4XCodePointMapData16.hpp b/ffi/capi/bindings/cpp/ICU4XCodePointMapData16.hpp index b2fc4404e60..63ee047bcc7 100644 --- a/ffi/capi/bindings/cpp/ICU4XCodePointMapData16.hpp +++ b/ffi/capi/bindings/cpp/ICU4XCodePointMapData16.hpp @@ -13,8 +13,8 @@ #include "ICU4XCodePointMapData16.h" #include "ICU4XCodePointRangeIterator.hpp" #include "ICU4XCodePointSetData.hpp" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" -#include "ICU4XError.hpp" inline uint16_t ICU4XCodePointMapData16::get(char32_t cp) const { @@ -47,9 +47,9 @@ inline std::unique_ptr ICU4XCodePointMapData16::get_set_f return std::unique_ptr(ICU4XCodePointSetData::FromFFI(result)); } -inline diplomat::result, ICU4XError> ICU4XCodePointMapData16::load_script(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointMapData16::load_script(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointMapData16_load_script(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointMapData16::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointMapData16::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline const capi::ICU4XCodePointMapData16* ICU4XCodePointMapData16::AsFFI() const { diff --git a/ffi/capi/bindings/cpp/ICU4XCodePointMapData8.d.hpp b/ffi/capi/bindings/cpp/ICU4XCodePointMapData8.d.hpp index 0abca5869aa..50243bb6947 100644 --- a/ffi/capi/bindings/cpp/ICU4XCodePointMapData8.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XCodePointMapData8.d.hpp @@ -9,12 +9,12 @@ #include #include "diplomat_runtime.hpp" #include "ICU4XCodePointMapData8.d.h" -#include "ICU4XError.d.hpp" +#include "ICU4XDataError.d.hpp" class ICU4XCodePointRangeIterator; class ICU4XCodePointSetData; class ICU4XDataProvider; -class ICU4XError; +class ICU4XDataError; class ICU4XCodePointMapData8 { @@ -34,25 +34,25 @@ class ICU4XCodePointMapData8 { inline std::unique_ptr get_set_for_value(uint8_t value) const; - inline static diplomat::result, ICU4XError> load_general_category(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_general_category(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_bidi_class(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_bidi_class(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_east_asian_width(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_east_asian_width(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_hangul_syllable_type(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_hangul_syllable_type(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_indic_syllabic_category(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_indic_syllabic_category(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_line_break(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_line_break(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> try_grapheme_cluster_break(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> try_grapheme_cluster_break(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_word_break(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_word_break(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_sentence_break(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_sentence_break(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_joining_type(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_joining_type(const ICU4XDataProvider& provider); inline const capi::ICU4XCodePointMapData8* AsFFI() const; inline capi::ICU4XCodePointMapData8* AsFFI(); diff --git a/ffi/capi/bindings/cpp/ICU4XCodePointMapData8.h b/ffi/capi/bindings/cpp/ICU4XCodePointMapData8.h index 47576609dd4..cbe43ea8c33 100644 --- a/ffi/capi/bindings/cpp/ICU4XCodePointMapData8.h +++ b/ffi/capi/bindings/cpp/ICU4XCodePointMapData8.h @@ -12,7 +12,7 @@ #include "ICU4XCodePointSetData.h" #include "ICU4XDataProvider.d.h" #include "ICU4XDataProvider.h" -#include "diplomat_result_box_ICU4XCodePointMapData8_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError.d.h" #include "ICU4XCodePointMapData8.d.h" @@ -36,25 +36,25 @@ ICU4XCodePointRangeIterator* ICU4XCodePointMapData8_iter_ranges_for_mask(const I ICU4XCodePointSetData* ICU4XCodePointMapData8_get_set_for_value(const ICU4XCodePointMapData8* self, uint8_t value); -diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_general_category(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError ICU4XCodePointMapData8_load_general_category(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_bidi_class(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError ICU4XCodePointMapData8_load_bidi_class(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_east_asian_width(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError ICU4XCodePointMapData8_load_east_asian_width(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_hangul_syllable_type(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError ICU4XCodePointMapData8_load_hangul_syllable_type(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_indic_syllabic_category(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError ICU4XCodePointMapData8_load_indic_syllabic_category(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_line_break(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError ICU4XCodePointMapData8_load_line_break(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_try_grapheme_cluster_break(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError ICU4XCodePointMapData8_try_grapheme_cluster_break(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_word_break(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError ICU4XCodePointMapData8_load_word_break(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_sentence_break(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError ICU4XCodePointMapData8_load_sentence_break(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_joining_type(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError ICU4XCodePointMapData8_load_joining_type(const ICU4XDataProvider* provider); void ICU4XCodePointMapData8_destroy(ICU4XCodePointMapData8* self); diff --git a/ffi/capi/bindings/cpp/ICU4XCodePointMapData8.hpp b/ffi/capi/bindings/cpp/ICU4XCodePointMapData8.hpp index 7909b494b23..4701d1d75bc 100644 --- a/ffi/capi/bindings/cpp/ICU4XCodePointMapData8.hpp +++ b/ffi/capi/bindings/cpp/ICU4XCodePointMapData8.hpp @@ -13,8 +13,8 @@ #include "ICU4XCodePointMapData8.h" #include "ICU4XCodePointRangeIterator.hpp" #include "ICU4XCodePointSetData.hpp" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" -#include "ICU4XError.hpp" inline uint8_t ICU4XCodePointMapData8::get(char32_t cp) const { @@ -58,54 +58,54 @@ inline std::unique_ptr ICU4XCodePointMapData8::get_set_fo return std::unique_ptr(ICU4XCodePointSetData::FromFFI(result)); } -inline diplomat::result, ICU4XError> ICU4XCodePointMapData8::load_general_category(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointMapData8::load_general_category(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointMapData8_load_general_category(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointMapData8::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointMapData8::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointMapData8::load_bidi_class(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointMapData8::load_bidi_class(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointMapData8_load_bidi_class(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointMapData8::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointMapData8::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointMapData8::load_east_asian_width(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointMapData8::load_east_asian_width(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointMapData8_load_east_asian_width(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointMapData8::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointMapData8::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointMapData8::load_hangul_syllable_type(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointMapData8::load_hangul_syllable_type(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointMapData8_load_hangul_syllable_type(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointMapData8::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointMapData8::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointMapData8::load_indic_syllabic_category(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointMapData8::load_indic_syllabic_category(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointMapData8_load_indic_syllabic_category(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointMapData8::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointMapData8::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointMapData8::load_line_break(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointMapData8::load_line_break(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointMapData8_load_line_break(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointMapData8::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointMapData8::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointMapData8::try_grapheme_cluster_break(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointMapData8::try_grapheme_cluster_break(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointMapData8_try_grapheme_cluster_break(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointMapData8::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointMapData8::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointMapData8::load_word_break(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointMapData8::load_word_break(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointMapData8_load_word_break(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointMapData8::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointMapData8::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointMapData8::load_sentence_break(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointMapData8::load_sentence_break(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointMapData8_load_sentence_break(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointMapData8::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointMapData8::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointMapData8::load_joining_type(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointMapData8::load_joining_type(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointMapData8_load_joining_type(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointMapData8::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointMapData8::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline const capi::ICU4XCodePointMapData8* ICU4XCodePointMapData8::AsFFI() const { diff --git a/ffi/capi/bindings/cpp/ICU4XCodePointSetData.d.hpp b/ffi/capi/bindings/cpp/ICU4XCodePointSetData.d.hpp index 21f2cc5a6e7..c518711e297 100644 --- a/ffi/capi/bindings/cpp/ICU4XCodePointSetData.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XCodePointSetData.d.hpp @@ -9,10 +9,12 @@ #include #include "diplomat_runtime.hpp" #include "ICU4XCodePointSetData.d.h" +#include "ICU4XDataError.d.hpp" #include "ICU4XError.d.hpp" class ICU4XCodePointRangeIterator; class ICU4XDataProvider; +class ICU4XDataError; class ICU4XError; @@ -27,137 +29,137 @@ class ICU4XCodePointSetData { inline std::unique_ptr iter_ranges_complemented() const; - inline static diplomat::result, ICU4XError> load_for_general_category_group(const ICU4XDataProvider& provider, uint32_t group); + inline static diplomat::result, ICU4XDataError> load_for_general_category_group(const ICU4XDataProvider& provider, uint32_t group); - inline static diplomat::result, ICU4XError> load_ascii_hex_digit(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_ascii_hex_digit(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_alnum(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_alnum(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_alphabetic(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_alphabetic(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_bidi_control(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_bidi_control(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_bidi_mirrored(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_bidi_mirrored(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_blank(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_blank(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_cased(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_cased(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_case_ignorable(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_case_ignorable(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_full_composition_exclusion(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_full_composition_exclusion(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_changes_when_casefolded(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_changes_when_casefolded(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_changes_when_casemapped(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_changes_when_casemapped(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_changes_when_nfkc_casefolded(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_changes_when_nfkc_casefolded(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_changes_when_lowercased(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_changes_when_lowercased(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_changes_when_titlecased(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_changes_when_titlecased(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_changes_when_uppercased(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_changes_when_uppercased(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_dash(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_dash(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_deprecated(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_deprecated(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_default_ignorable_code_point(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_default_ignorable_code_point(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_diacritic(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_diacritic(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_emoji_modifier_base(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_emoji_modifier_base(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_emoji_component(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_emoji_component(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_emoji_modifier(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_emoji_modifier(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_emoji(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_emoji(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_emoji_presentation(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_emoji_presentation(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_extender(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_extender(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_extended_pictographic(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_extended_pictographic(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_graph(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_graph(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_grapheme_base(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_grapheme_base(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_grapheme_extend(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_grapheme_extend(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_grapheme_link(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_grapheme_link(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_hex_digit(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_hex_digit(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_hyphen(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_hyphen(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_id_continue(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_id_continue(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_ideographic(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_ideographic(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_id_start(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_id_start(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_ids_binary_operator(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_ids_binary_operator(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_ids_trinary_operator(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_ids_trinary_operator(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_join_control(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_join_control(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_logical_order_exception(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_logical_order_exception(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_lowercase(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_lowercase(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_math(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_math(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_noncharacter_code_point(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_noncharacter_code_point(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_nfc_inert(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_nfc_inert(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_nfd_inert(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_nfd_inert(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_nfkc_inert(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_nfkc_inert(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_nfkd_inert(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_nfkd_inert(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_pattern_syntax(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_pattern_syntax(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_pattern_white_space(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_pattern_white_space(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_prepended_concatenation_mark(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_prepended_concatenation_mark(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_print(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_print(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_quotation_mark(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_quotation_mark(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_radical(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_radical(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_regional_indicator(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_regional_indicator(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_soft_dotted(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_soft_dotted(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_segment_starter(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_segment_starter(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_case_sensitive(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_case_sensitive(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_sentence_terminal(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_sentence_terminal(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_terminal_punctuation(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_terminal_punctuation(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_unified_ideograph(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_unified_ideograph(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_uppercase(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_uppercase(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_variation_selector(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_variation_selector(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_white_space(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_white_space(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_xdigit(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_xdigit(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_xid_continue(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_xid_continue(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_xid_start(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_xid_start(const ICU4XDataProvider& provider); inline static diplomat::result, ICU4XError>, diplomat::Utf8Error> load_for_ecma262(const ICU4XDataProvider& provider, std::string_view property_name); diff --git a/ffi/capi/bindings/cpp/ICU4XCodePointSetData.h b/ffi/capi/bindings/cpp/ICU4XCodePointSetData.h index aff5a9fbaa4..73f62252d1a 100644 --- a/ffi/capi/bindings/cpp/ICU4XCodePointSetData.h +++ b/ffi/capi/bindings/cpp/ICU4XCodePointSetData.h @@ -10,6 +10,7 @@ #include "ICU4XCodePointRangeIterator.h" #include "ICU4XDataProvider.d.h" #include "ICU4XDataProvider.h" +#include "diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError.d.h" #include "diplomat_result_box_ICU4XCodePointSetData_ICU4XError.d.h" #include "ICU4XCodePointSetData.d.h" @@ -28,137 +29,137 @@ ICU4XCodePointRangeIterator* ICU4XCodePointSetData_iter_ranges(const ICU4XCodePo ICU4XCodePointRangeIterator* ICU4XCodePointSetData_iter_ranges_complemented(const ICU4XCodePointSetData* self); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_for_general_category_group(const ICU4XDataProvider* provider, uint32_t group); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_for_general_category_group(const ICU4XDataProvider* provider, uint32_t group); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_ascii_hex_digit(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_ascii_hex_digit(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_alnum(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_alnum(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_alphabetic(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_alphabetic(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_bidi_control(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_bidi_control(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_bidi_mirrored(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_bidi_mirrored(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_blank(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_blank(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_cased(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_cased(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_case_ignorable(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_case_ignorable(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_full_composition_exclusion(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_full_composition_exclusion(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_changes_when_casefolded(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_changes_when_casefolded(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_changes_when_casemapped(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_changes_when_casemapped(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_changes_when_nfkc_casefolded(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_changes_when_nfkc_casefolded(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_changes_when_lowercased(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_changes_when_lowercased(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_changes_when_titlecased(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_changes_when_titlecased(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_changes_when_uppercased(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_changes_when_uppercased(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_dash(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_dash(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_deprecated(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_deprecated(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_default_ignorable_code_point(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_default_ignorable_code_point(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_diacritic(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_diacritic(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_emoji_modifier_base(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_emoji_modifier_base(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_emoji_component(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_emoji_component(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_emoji_modifier(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_emoji_modifier(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_emoji(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_emoji(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_emoji_presentation(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_emoji_presentation(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_extender(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_extender(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_extended_pictographic(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_extended_pictographic(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_graph(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_graph(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_grapheme_base(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_grapheme_base(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_grapheme_extend(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_grapheme_extend(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_grapheme_link(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_grapheme_link(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_hex_digit(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_hex_digit(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_hyphen(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_hyphen(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_id_continue(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_id_continue(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_ideographic(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_ideographic(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_id_start(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_id_start(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_ids_binary_operator(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_ids_binary_operator(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_ids_trinary_operator(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_ids_trinary_operator(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_join_control(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_join_control(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_logical_order_exception(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_logical_order_exception(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_lowercase(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_lowercase(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_math(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_math(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_noncharacter_code_point(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_noncharacter_code_point(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_nfc_inert(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_nfc_inert(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_nfd_inert(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_nfd_inert(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_nfkc_inert(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_nfkc_inert(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_nfkd_inert(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_nfkd_inert(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_pattern_syntax(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_pattern_syntax(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_pattern_white_space(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_pattern_white_space(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_prepended_concatenation_mark(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_prepended_concatenation_mark(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_print(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_print(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_quotation_mark(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_quotation_mark(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_radical(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_radical(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_regional_indicator(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_regional_indicator(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_soft_dotted(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_soft_dotted(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_segment_starter(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_segment_starter(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_case_sensitive(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_case_sensitive(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_sentence_terminal(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_sentence_terminal(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_terminal_punctuation(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_terminal_punctuation(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_unified_ideograph(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_unified_ideograph(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_uppercase(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_uppercase(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_variation_selector(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_variation_selector(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_white_space(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_white_space(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_xdigit(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_xdigit(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_xid_continue(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_xid_continue(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_xid_start(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError ICU4XCodePointSetData_load_xid_start(const ICU4XDataProvider* provider); diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_for_ecma262(const ICU4XDataProvider* provider, const char* property_name_data, size_t property_name_len); diff --git a/ffi/capi/bindings/cpp/ICU4XCodePointSetData.hpp b/ffi/capi/bindings/cpp/ICU4XCodePointSetData.hpp index 23fe986b25b..8814f341abc 100644 --- a/ffi/capi/bindings/cpp/ICU4XCodePointSetData.hpp +++ b/ffi/capi/bindings/cpp/ICU4XCodePointSetData.hpp @@ -12,6 +12,7 @@ #include "diplomat_runtime.hpp" #include "ICU4XCodePointRangeIterator.hpp" #include "ICU4XCodePointSetData.h" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" #include "ICU4XError.hpp" @@ -38,335 +39,335 @@ inline std::unique_ptr ICU4XCodePointSetData::iter_ return std::unique_ptr(ICU4XCodePointRangeIterator::FromFFI(result)); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_for_general_category_group(const ICU4XDataProvider& provider, uint32_t group) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_for_general_category_group(const ICU4XDataProvider& provider, uint32_t group) { auto result = capi::ICU4XCodePointSetData_load_for_general_category_group(provider.AsFFI(), group); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_ascii_hex_digit(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_ascii_hex_digit(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_ascii_hex_digit(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_alnum(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_alnum(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_alnum(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_alphabetic(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_alphabetic(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_alphabetic(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_bidi_control(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_bidi_control(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_bidi_control(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_bidi_mirrored(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_bidi_mirrored(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_bidi_mirrored(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_blank(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_blank(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_blank(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_cased(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_cased(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_cased(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_case_ignorable(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_case_ignorable(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_case_ignorable(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_full_composition_exclusion(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_full_composition_exclusion(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_full_composition_exclusion(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_changes_when_casefolded(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_changes_when_casefolded(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_changes_when_casefolded(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_changes_when_casemapped(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_changes_when_casemapped(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_changes_when_casemapped(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_changes_when_nfkc_casefolded(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_changes_when_nfkc_casefolded(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_changes_when_nfkc_casefolded(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_changes_when_lowercased(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_changes_when_lowercased(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_changes_when_lowercased(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_changes_when_titlecased(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_changes_when_titlecased(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_changes_when_titlecased(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_changes_when_uppercased(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_changes_when_uppercased(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_changes_when_uppercased(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_dash(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_dash(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_dash(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_deprecated(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_deprecated(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_deprecated(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_default_ignorable_code_point(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_default_ignorable_code_point(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_default_ignorable_code_point(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_diacritic(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_diacritic(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_diacritic(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_emoji_modifier_base(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_emoji_modifier_base(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_emoji_modifier_base(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_emoji_component(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_emoji_component(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_emoji_component(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_emoji_modifier(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_emoji_modifier(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_emoji_modifier(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_emoji(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_emoji(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_emoji(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_emoji_presentation(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_emoji_presentation(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_emoji_presentation(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_extender(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_extender(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_extender(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_extended_pictographic(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_extended_pictographic(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_extended_pictographic(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_graph(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_graph(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_graph(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_grapheme_base(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_grapheme_base(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_grapheme_base(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_grapheme_extend(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_grapheme_extend(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_grapheme_extend(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_grapheme_link(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_grapheme_link(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_grapheme_link(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_hex_digit(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_hex_digit(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_hex_digit(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_hyphen(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_hyphen(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_hyphen(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_id_continue(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_id_continue(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_id_continue(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_ideographic(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_ideographic(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_ideographic(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_id_start(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_id_start(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_id_start(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_ids_binary_operator(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_ids_binary_operator(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_ids_binary_operator(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_ids_trinary_operator(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_ids_trinary_operator(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_ids_trinary_operator(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_join_control(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_join_control(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_join_control(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_logical_order_exception(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_logical_order_exception(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_logical_order_exception(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_lowercase(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_lowercase(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_lowercase(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_math(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_math(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_math(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_noncharacter_code_point(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_noncharacter_code_point(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_noncharacter_code_point(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_nfc_inert(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_nfc_inert(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_nfc_inert(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_nfd_inert(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_nfd_inert(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_nfd_inert(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_nfkc_inert(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_nfkc_inert(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_nfkc_inert(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_nfkd_inert(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_nfkd_inert(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_nfkd_inert(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_pattern_syntax(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_pattern_syntax(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_pattern_syntax(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_pattern_white_space(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_pattern_white_space(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_pattern_white_space(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_prepended_concatenation_mark(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_prepended_concatenation_mark(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_prepended_concatenation_mark(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_print(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_print(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_print(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_quotation_mark(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_quotation_mark(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_quotation_mark(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_radical(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_radical(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_radical(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_regional_indicator(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_regional_indicator(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_regional_indicator(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_soft_dotted(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_soft_dotted(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_soft_dotted(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_segment_starter(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_segment_starter(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_segment_starter(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_case_sensitive(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_case_sensitive(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_case_sensitive(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_sentence_terminal(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_sentence_terminal(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_sentence_terminal(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_terminal_punctuation(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_terminal_punctuation(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_terminal_punctuation(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_unified_ideograph(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_unified_ideograph(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_unified_ideograph(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_uppercase(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_uppercase(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_uppercase(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_variation_selector(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_variation_selector(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_variation_selector(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_white_space(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_white_space(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_white_space(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_xdigit(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_xdigit(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_xdigit(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_xid_continue(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_xid_continue(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_xid_continue(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XCodePointSetData::load_xid_start(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XCodePointSetData::load_xid_start(const ICU4XDataProvider& provider) { auto result = capi::ICU4XCodePointSetData_load_xid_start(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCodePointSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline diplomat::result, ICU4XError>, diplomat::Utf8Error> ICU4XCodePointSetData::load_for_ecma262(const ICU4XDataProvider& provider, std::string_view property_name) { diff --git a/ffi/capi/bindings/cpp/ICU4XCollator.d.hpp b/ffi/capi/bindings/cpp/ICU4XCollator.d.hpp index 93384457803..02b88a9b223 100644 --- a/ffi/capi/bindings/cpp/ICU4XCollator.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XCollator.d.hpp @@ -11,19 +11,19 @@ #include "ICU4XCollator.d.h" #include "ICU4XCollatorOptionsV1.d.hpp" #include "ICU4XCollatorResolvedOptionsV1.d.hpp" -#include "ICU4XError.d.hpp" +#include "ICU4XDataError.d.hpp" class ICU4XDataProvider; class ICU4XLocale; struct ICU4XCollatorOptionsV1; struct ICU4XCollatorResolvedOptionsV1; -class ICU4XError; +class ICU4XDataError; class ICU4XCollator { public: - inline static diplomat::result, ICU4XError> create_v1(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XCollatorOptionsV1 options); + inline static diplomat::result, ICU4XDataError> create_v1(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XCollatorOptionsV1 options); inline int8_t compare16(std::u16string_view left, std::u16string_view right) const; diff --git a/ffi/capi/bindings/cpp/ICU4XCollator.h b/ffi/capi/bindings/cpp/ICU4XCollator.h index 4eb3e1586be..0119e575c89 100644 --- a/ffi/capi/bindings/cpp/ICU4XCollator.h +++ b/ffi/capi/bindings/cpp/ICU4XCollator.h @@ -14,7 +14,7 @@ #include "ICU4XDataProvider.h" #include "ICU4XLocale.d.h" #include "ICU4XLocale.h" -#include "diplomat_result_box_ICU4XCollator_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XCollator_ICU4XDataError.d.h" #include "ICU4XCollator.d.h" @@ -24,7 +24,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XCollator_ICU4XError ICU4XCollator_create_v1(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XCollatorOptionsV1 options); +diplomat_result_box_ICU4XCollator_ICU4XDataError ICU4XCollator_create_v1(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XCollatorOptionsV1 options); int8_t ICU4XCollator_compare_utf16_(const ICU4XCollator* self, const char16_t* left_data, size_t left_len, const char16_t* right_data, size_t right_len); diff --git a/ffi/capi/bindings/cpp/ICU4XCollator.hpp b/ffi/capi/bindings/cpp/ICU4XCollator.hpp index 3eecd6fd01e..899dbda58d1 100644 --- a/ffi/capi/bindings/cpp/ICU4XCollator.hpp +++ b/ffi/capi/bindings/cpp/ICU4XCollator.hpp @@ -13,16 +13,16 @@ #include "ICU4XCollator.h" #include "ICU4XCollatorOptionsV1.hpp" #include "ICU4XCollatorResolvedOptionsV1.hpp" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" -#include "ICU4XError.hpp" #include "ICU4XLocale.hpp" -inline diplomat::result, ICU4XError> ICU4XCollator::create_v1(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XCollatorOptionsV1 options) { +inline diplomat::result, ICU4XDataError> ICU4XCollator::create_v1(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XCollatorOptionsV1 options) { auto result = capi::ICU4XCollator_create_v1(provider.AsFFI(), locale.AsFFI(), options.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCollator::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XCollator::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline int8_t ICU4XCollator::compare16(std::u16string_view left, std::u16string_view right) const { diff --git a/ffi/capi/bindings/cpp/ICU4XComposingNormalizer.d.hpp b/ffi/capi/bindings/cpp/ICU4XComposingNormalizer.d.hpp index df16891cab7..d4f1424ec1d 100644 --- a/ffi/capi/bindings/cpp/ICU4XComposingNormalizer.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XComposingNormalizer.d.hpp @@ -9,18 +9,18 @@ #include #include "diplomat_runtime.hpp" #include "ICU4XComposingNormalizer.d.h" -#include "ICU4XError.d.hpp" +#include "ICU4XDataError.d.hpp" class ICU4XDataProvider; -class ICU4XError; +class ICU4XDataError; class ICU4XComposingNormalizer { public: - inline static diplomat::result, ICU4XError> create_nfc(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> create_nfc(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> create_nfkc(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> create_nfkc(const ICU4XDataProvider& provider); inline std::string normalize(std::string_view s) const; diff --git a/ffi/capi/bindings/cpp/ICU4XComposingNormalizer.h b/ffi/capi/bindings/cpp/ICU4XComposingNormalizer.h index b9831c2a65e..3aeae4aa3c3 100644 --- a/ffi/capi/bindings/cpp/ICU4XComposingNormalizer.h +++ b/ffi/capi/bindings/cpp/ICU4XComposingNormalizer.h @@ -8,7 +8,7 @@ #include "diplomat_runtime.h" #include "ICU4XDataProvider.d.h" #include "ICU4XDataProvider.h" -#include "diplomat_result_box_ICU4XComposingNormalizer_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XComposingNormalizer_ICU4XDataError.d.h" #include "ICU4XComposingNormalizer.d.h" @@ -18,9 +18,9 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XComposingNormalizer_ICU4XError ICU4XComposingNormalizer_create_nfc(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XComposingNormalizer_ICU4XDataError ICU4XComposingNormalizer_create_nfc(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XComposingNormalizer_ICU4XError ICU4XComposingNormalizer_create_nfkc(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XComposingNormalizer_ICU4XDataError ICU4XComposingNormalizer_create_nfkc(const ICU4XDataProvider* provider); void ICU4XComposingNormalizer_normalize(const ICU4XComposingNormalizer* self, const char* s_data, size_t s_len, DiplomatWrite* write); diff --git a/ffi/capi/bindings/cpp/ICU4XComposingNormalizer.hpp b/ffi/capi/bindings/cpp/ICU4XComposingNormalizer.hpp index 4e2212f422b..ba8b6742a3a 100644 --- a/ffi/capi/bindings/cpp/ICU4XComposingNormalizer.hpp +++ b/ffi/capi/bindings/cpp/ICU4XComposingNormalizer.hpp @@ -11,18 +11,18 @@ #include #include "diplomat_runtime.hpp" #include "ICU4XComposingNormalizer.h" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" -#include "ICU4XError.hpp" -inline diplomat::result, ICU4XError> ICU4XComposingNormalizer::create_nfc(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XComposingNormalizer::create_nfc(const ICU4XDataProvider& provider) { auto result = capi::ICU4XComposingNormalizer_create_nfc(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XComposingNormalizer::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XComposingNormalizer::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XComposingNormalizer::create_nfkc(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XComposingNormalizer::create_nfkc(const ICU4XDataProvider& provider) { auto result = capi::ICU4XComposingNormalizer_create_nfkc(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XComposingNormalizer::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XComposingNormalizer::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline std::string ICU4XComposingNormalizer::normalize(std::string_view s) const { diff --git a/ffi/capi/bindings/cpp/ICU4XCustomTimeZone.d.hpp b/ffi/capi/bindings/cpp/ICU4XCustomTimeZone.d.hpp index 3c5835ad60c..4752822634d 100644 --- a/ffi/capi/bindings/cpp/ICU4XCustomTimeZone.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XCustomTimeZone.d.hpp @@ -9,18 +9,20 @@ #include #include "diplomat_runtime.hpp" #include "ICU4XCustomTimeZone.d.h" -#include "ICU4XError.d.hpp" +#include "ICU4XTimeZoneInvalidIdError.d.hpp" +#include "ICU4XTimeZoneInvalidOffsetError.d.hpp" class ICU4XIsoDateTime; class ICU4XMetazoneCalculator; class ICU4XTimeZoneIdMapper; -class ICU4XError; +class ICU4XTimeZoneInvalidIdError; +class ICU4XTimeZoneInvalidOffsetError; class ICU4XCustomTimeZone { public: - inline static diplomat::result, ICU4XError> create_from_string(std::string_view s); + inline static diplomat::result, ICU4XTimeZoneInvalidOffsetError> create_from_string(std::string_view s); inline static std::unique_ptr create_empty(); @@ -30,7 +32,7 @@ class ICU4XCustomTimeZone { inline static std::unique_ptr create_bst(); - inline diplomat::result try_set_gmt_offset_seconds(int32_t offset_seconds); + inline diplomat::result try_set_gmt_offset_seconds(int32_t offset_seconds); inline void clear_gmt_offset(); @@ -44,15 +46,15 @@ class ICU4XCustomTimeZone { inline std::optional gmt_offset_has_seconds() const; - inline diplomat::result try_set_time_zone_id(std::string_view id); + inline diplomat::result try_set_time_zone_id(std::string_view id); - inline diplomat::result try_set_iana_time_zone_id(const ICU4XTimeZoneIdMapper& mapper, std::string_view id); + inline diplomat::result try_set_iana_time_zone_id(const ICU4XTimeZoneIdMapper& mapper, std::string_view id); inline void clear_time_zone_id(); inline std::optional time_zone_id() const; - inline diplomat::result try_set_metazone_id(std::string_view id); + inline diplomat::result try_set_metazone_id(std::string_view id); inline void clear_metazone_id(); diff --git a/ffi/capi/bindings/cpp/ICU4XCustomTimeZone.h b/ffi/capi/bindings/cpp/ICU4XCustomTimeZone.h index 91c077986ad..1a7fdb1b765 100644 --- a/ffi/capi/bindings/cpp/ICU4XCustomTimeZone.h +++ b/ffi/capi/bindings/cpp/ICU4XCustomTimeZone.h @@ -13,9 +13,10 @@ #include "ICU4XTimeZoneIdMapper.d.h" #include "ICU4XTimeZoneIdMapper.h" #include "diplomat_result_bool_void.d.h" -#include "diplomat_result_box_ICU4XCustomTimeZone_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XCustomTimeZone_ICU4XTimeZoneInvalidOffsetError.d.h" #include "diplomat_result_int32_t_void.d.h" -#include "diplomat_result_void_ICU4XError.d.h" +#include "diplomat_result_void_ICU4XTimeZoneInvalidIdError.d.h" +#include "diplomat_result_void_ICU4XTimeZoneInvalidOffsetError.d.h" #include "diplomat_result_void_void.d.h" #include "ICU4XCustomTimeZone.d.h" @@ -26,7 +27,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XCustomTimeZone_ICU4XError ICU4XCustomTimeZone_create_from_string(const char* s_data, size_t s_len); +diplomat_result_box_ICU4XCustomTimeZone_ICU4XTimeZoneInvalidOffsetError ICU4XCustomTimeZone_create_from_string(const char* s_data, size_t s_len); ICU4XCustomTimeZone* ICU4XCustomTimeZone_create_empty(); @@ -36,7 +37,7 @@ ICU4XCustomTimeZone* ICU4XCustomTimeZone_create_gmt(); ICU4XCustomTimeZone* ICU4XCustomTimeZone_create_bst(); -diplomat_result_void_ICU4XError ICU4XCustomTimeZone_try_set_gmt_offset_seconds(ICU4XCustomTimeZone* self, int32_t offset_seconds); +diplomat_result_void_ICU4XTimeZoneInvalidOffsetError ICU4XCustomTimeZone_try_set_gmt_offset_seconds(ICU4XCustomTimeZone* self, int32_t offset_seconds); void ICU4XCustomTimeZone_clear_gmt_offset(ICU4XCustomTimeZone* self); @@ -50,15 +51,15 @@ diplomat_result_bool_void ICU4XCustomTimeZone_gmt_offset_has_minutes(const ICU4X diplomat_result_bool_void ICU4XCustomTimeZone_gmt_offset_has_seconds(const ICU4XCustomTimeZone* self); -diplomat_result_void_ICU4XError ICU4XCustomTimeZone_try_set_time_zone_id(ICU4XCustomTimeZone* self, const char* id_data, size_t id_len); +diplomat_result_void_ICU4XTimeZoneInvalidIdError ICU4XCustomTimeZone_try_set_time_zone_id(ICU4XCustomTimeZone* self, const char* id_data, size_t id_len); -diplomat_result_void_ICU4XError ICU4XCustomTimeZone_try_set_iana_time_zone_id(ICU4XCustomTimeZone* self, const ICU4XTimeZoneIdMapper* mapper, const char* id_data, size_t id_len); +diplomat_result_void_ICU4XTimeZoneInvalidIdError ICU4XCustomTimeZone_try_set_iana_time_zone_id(ICU4XCustomTimeZone* self, const ICU4XTimeZoneIdMapper* mapper, const char* id_data, size_t id_len); void ICU4XCustomTimeZone_clear_time_zone_id(ICU4XCustomTimeZone* self); diplomat_result_void_void ICU4XCustomTimeZone_time_zone_id(const ICU4XCustomTimeZone* self, DiplomatWrite* write); -diplomat_result_void_ICU4XError ICU4XCustomTimeZone_try_set_metazone_id(ICU4XCustomTimeZone* self, const char* id_data, size_t id_len); +diplomat_result_void_ICU4XTimeZoneInvalidIdError ICU4XCustomTimeZone_try_set_metazone_id(ICU4XCustomTimeZone* self, const char* id_data, size_t id_len); void ICU4XCustomTimeZone_clear_metazone_id(ICU4XCustomTimeZone* self); diff --git a/ffi/capi/bindings/cpp/ICU4XCustomTimeZone.hpp b/ffi/capi/bindings/cpp/ICU4XCustomTimeZone.hpp index ae73ea3f7af..18f64eddce3 100644 --- a/ffi/capi/bindings/cpp/ICU4XCustomTimeZone.hpp +++ b/ffi/capi/bindings/cpp/ICU4XCustomTimeZone.hpp @@ -11,16 +11,17 @@ #include #include "diplomat_runtime.hpp" #include "ICU4XCustomTimeZone.h" -#include "ICU4XError.hpp" #include "ICU4XIsoDateTime.hpp" #include "ICU4XMetazoneCalculator.hpp" #include "ICU4XTimeZoneIdMapper.hpp" +#include "ICU4XTimeZoneInvalidIdError.hpp" +#include "ICU4XTimeZoneInvalidOffsetError.hpp" -inline diplomat::result, ICU4XError> ICU4XCustomTimeZone::create_from_string(std::string_view s) { +inline diplomat::result, ICU4XTimeZoneInvalidOffsetError> ICU4XCustomTimeZone::create_from_string(std::string_view s) { auto result = capi::ICU4XCustomTimeZone_create_from_string(s.data(), s.size()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XCustomTimeZone::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XTimeZoneInvalidOffsetError>(diplomat::Ok>(std::unique_ptr(ICU4XCustomTimeZone::FromFFI(result.ok)))) : diplomat::result, ICU4XTimeZoneInvalidOffsetError>(diplomat::Err(ICU4XTimeZoneInvalidOffsetError::FromFFI(result.err))); } inline std::unique_ptr ICU4XCustomTimeZone::create_empty() { @@ -43,10 +44,10 @@ inline std::unique_ptr ICU4XCustomTimeZone::create_bst() { return std::unique_ptr(ICU4XCustomTimeZone::FromFFI(result)); } -inline diplomat::result ICU4XCustomTimeZone::try_set_gmt_offset_seconds(int32_t offset_seconds) { +inline diplomat::result ICU4XCustomTimeZone::try_set_gmt_offset_seconds(int32_t offset_seconds) { auto result = capi::ICU4XCustomTimeZone_try_set_gmt_offset_seconds(this->AsFFI(), offset_seconds); - return result.is_ok ? diplomat::result(diplomat::Ok()) : diplomat::result(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result(diplomat::Ok()) : diplomat::result(diplomat::Err(ICU4XTimeZoneInvalidOffsetError::FromFFI(result.err))); } inline void ICU4XCustomTimeZone::clear_gmt_offset() { @@ -78,19 +79,19 @@ inline std::optional ICU4XCustomTimeZone::gmt_offset_has_seconds() const { return result.is_ok ? std::optional(result.ok) : std::nullopt; } -inline diplomat::result ICU4XCustomTimeZone::try_set_time_zone_id(std::string_view id) { +inline diplomat::result ICU4XCustomTimeZone::try_set_time_zone_id(std::string_view id) { auto result = capi::ICU4XCustomTimeZone_try_set_time_zone_id(this->AsFFI(), id.data(), id.size()); - return result.is_ok ? diplomat::result(diplomat::Ok()) : diplomat::result(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result(diplomat::Ok()) : diplomat::result(diplomat::Err(ICU4XTimeZoneInvalidIdError::FromFFI(result.err))); } -inline diplomat::result ICU4XCustomTimeZone::try_set_iana_time_zone_id(const ICU4XTimeZoneIdMapper& mapper, std::string_view id) { +inline diplomat::result ICU4XCustomTimeZone::try_set_iana_time_zone_id(const ICU4XTimeZoneIdMapper& mapper, std::string_view id) { auto result = capi::ICU4XCustomTimeZone_try_set_iana_time_zone_id(this->AsFFI(), mapper.AsFFI(), id.data(), id.size()); - return result.is_ok ? diplomat::result(diplomat::Ok()) : diplomat::result(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result(diplomat::Ok()) : diplomat::result(diplomat::Err(ICU4XTimeZoneInvalidIdError::FromFFI(result.err))); } inline void ICU4XCustomTimeZone::clear_time_zone_id() { @@ -105,11 +106,11 @@ inline std::optional ICU4XCustomTimeZone::time_zone_id() const { return result.is_ok ? std::optional(std::move(output)) : std::nullopt; } -inline diplomat::result ICU4XCustomTimeZone::try_set_metazone_id(std::string_view id) { +inline diplomat::result ICU4XCustomTimeZone::try_set_metazone_id(std::string_view id) { auto result = capi::ICU4XCustomTimeZone_try_set_metazone_id(this->AsFFI(), id.data(), id.size()); - return result.is_ok ? diplomat::result(diplomat::Ok()) : diplomat::result(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result(diplomat::Ok()) : diplomat::result(diplomat::Err(ICU4XTimeZoneInvalidIdError::FromFFI(result.err))); } inline void ICU4XCustomTimeZone::clear_metazone_id() { diff --git a/ffi/capi/bindings/cpp/ICU4XDataError.d.h b/ffi/capi/bindings/cpp/ICU4XDataError.d.h new file mode 100644 index 00000000000..24d578e3559 --- /dev/null +++ b/ffi/capi/bindings/cpp/ICU4XDataError.d.h @@ -0,0 +1,41 @@ +#ifndef ICU4XDataError_D_H +#define ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef enum ICU4XDataError { + ICU4XDataError_Unknown = 0, + ICU4XDataError_MissingDataMarker = 1, + ICU4XDataError_MissingVariant = 2, + ICU4XDataError_MissingLocale = 3, + ICU4XDataError_NeedsVariant = 4, + ICU4XDataError_NeedsLocale = 5, + ICU4XDataError_ExtraneousLocale = 6, + ICU4XDataError_FilteredResource = 7, + ICU4XDataError_MismatchedType = 8, + ICU4XDataError_MissingPayload = 9, + ICU4XDataError_InvalidState = 10, + ICU4XDataError_Custom = 11, + ICU4XDataError_Io = 12, + ICU4XDataError_UnavailableBufferFormat = 13, + ICU4XDataError_MismatchedAnyBuffer = 14, + ICU4XDataError_DataStructValidityError = 15, +} ICU4XDataError; + + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/ICU4XDataError.d.hpp b/ffi/capi/bindings/cpp/ICU4XDataError.d.hpp new file mode 100644 index 00000000000..4e2e2cd8cca --- /dev/null +++ b/ffi/capi/bindings/cpp/ICU4XDataError.d.hpp @@ -0,0 +1,49 @@ +#ifndef ICU4XDataError_D_HPP +#define ICU4XDataError_D_HPP + +#include +#include +#include +#include +#include +#include +#include "diplomat_runtime.hpp" +#include "ICU4XDataError.d.h" + + +class ICU4XDataError { +public: + enum Value { + Unknown = 0, + MissingDataMarker = 1, + MissingVariant = 2, + MissingLocale = 3, + NeedsVariant = 4, + NeedsLocale = 5, + ExtraneousLocale = 6, + FilteredResource = 7, + MismatchedType = 8, + MissingPayload = 9, + InvalidState = 10, + Custom = 11, + Io = 12, + UnavailableBufferFormat = 13, + MismatchedAnyBuffer = 14, + DataStructValidityError = 15, + }; + + ICU4XDataError() = default; + // Implicit conversions between enum and ::Value + constexpr ICU4XDataError(Value v) : value(v) {} + constexpr operator Value() const { return value; } + // Prevent usage as boolean value + explicit operator bool() const = delete; + + inline capi::ICU4XDataError AsFFI() const; + inline static ICU4XDataError FromFFI(capi::ICU4XDataError c_enum); +private: + Value value; +}; + + +#endif // ICU4XDataError_D_HPP diff --git a/ffi/capi/bindings/cpp/ICU4XDataError.h b/ffi/capi/bindings/cpp/ICU4XDataError.h new file mode 100644 index 00000000000..3270569f73f --- /dev/null +++ b/ffi/capi/bindings/cpp/ICU4XDataError.h @@ -0,0 +1,26 @@ +#ifndef ICU4XDataError_H +#define ICU4XDataError_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + +#include "ICU4XDataError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +// No Content + + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // ICU4XDataError_H diff --git a/ffi/capi/bindings/cpp/ICU4XDataError.hpp b/ffi/capi/bindings/cpp/ICU4XDataError.hpp new file mode 100644 index 00000000000..09284d71d9a --- /dev/null +++ b/ffi/capi/bindings/cpp/ICU4XDataError.hpp @@ -0,0 +1,43 @@ +#ifndef ICU4XDataError_HPP +#define ICU4XDataError_HPP + +#include "ICU4XDataError.d.hpp" + +#include +#include +#include +#include +#include +#include +#include "diplomat_runtime.hpp" +#include "ICU4XDataError.h" + + +inline capi::ICU4XDataError ICU4XDataError::AsFFI() const { + return static_cast(value); +} + +inline ICU4XDataError ICU4XDataError::FromFFI(capi::ICU4XDataError c_enum) { + switch (c_enum) { + case capi::ICU4XDataError_Unknown: + case capi::ICU4XDataError_MissingDataMarker: + case capi::ICU4XDataError_MissingVariant: + case capi::ICU4XDataError_MissingLocale: + case capi::ICU4XDataError_NeedsVariant: + case capi::ICU4XDataError_NeedsLocale: + case capi::ICU4XDataError_ExtraneousLocale: + case capi::ICU4XDataError_FilteredResource: + case capi::ICU4XDataError_MismatchedType: + case capi::ICU4XDataError_MissingPayload: + case capi::ICU4XDataError_InvalidState: + case capi::ICU4XDataError_Custom: + case capi::ICU4XDataError_Io: + case capi::ICU4XDataError_UnavailableBufferFormat: + case capi::ICU4XDataError_MismatchedAnyBuffer: + case capi::ICU4XDataError_DataStructValidityError: + return static_cast(c_enum); + default: + abort(); + } +} +#endif // ICU4XDataError_HPP diff --git a/ffi/capi/bindings/cpp/ICU4XDataProvider.d.hpp b/ffi/capi/bindings/cpp/ICU4XDataProvider.d.hpp index 323d4b78133..65a96f916c0 100644 --- a/ffi/capi/bindings/cpp/ICU4XDataProvider.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XDataProvider.d.hpp @@ -8,11 +8,11 @@ #include #include #include "diplomat_runtime.hpp" +#include "ICU4XDataError.d.hpp" #include "ICU4XDataProvider.d.h" -#include "ICU4XError.d.hpp" class ICU4XLocaleFallbacker; -class ICU4XError; +class ICU4XDataError; class ICU4XDataProvider { @@ -20,19 +20,19 @@ class ICU4XDataProvider { inline static std::unique_ptr create_compiled(); - inline static diplomat::result, ICU4XError> create_fs(std::string_view path); + inline static diplomat::result, ICU4XDataError> create_fs(std::string_view path); - inline static diplomat::result, ICU4XError> create_from_byte_slice(diplomat::span blob); + inline static diplomat::result, ICU4XDataError> create_from_byte_slice(diplomat::span blob); inline static std::unique_ptr create_empty(); - inline diplomat::result fork_by_key(ICU4XDataProvider& other); + inline diplomat::result fork_by_key(ICU4XDataProvider& other); - inline diplomat::result fork_by_locale(ICU4XDataProvider& other); + inline diplomat::result fork_by_locale(ICU4XDataProvider& other); - inline diplomat::result enable_locale_fallback(); + inline diplomat::result enable_locale_fallback(); - inline diplomat::result enable_locale_fallback_with(const ICU4XLocaleFallbacker& fallbacker); + inline diplomat::result enable_locale_fallback_with(const ICU4XLocaleFallbacker& fallbacker); inline const capi::ICU4XDataProvider* AsFFI() const; inline capi::ICU4XDataProvider* AsFFI(); diff --git a/ffi/capi/bindings/cpp/ICU4XDataProvider.h b/ffi/capi/bindings/cpp/ICU4XDataProvider.h index d1f4d2a7344..c80fd3f5824 100644 --- a/ffi/capi/bindings/cpp/ICU4XDataProvider.h +++ b/ffi/capi/bindings/cpp/ICU4XDataProvider.h @@ -8,8 +8,8 @@ #include "diplomat_runtime.h" #include "ICU4XLocaleFallbacker.d.h" #include "ICU4XLocaleFallbacker.h" -#include "diplomat_result_box_ICU4XDataProvider_ICU4XError.d.h" -#include "diplomat_result_void_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XDataProvider_ICU4XDataError.d.h" +#include "diplomat_result_void_ICU4XDataError.d.h" #include "ICU4XDataProvider.d.h" @@ -21,19 +21,19 @@ extern "C" { ICU4XDataProvider* ICU4XDataProvider_create_compiled(); -diplomat_result_box_ICU4XDataProvider_ICU4XError ICU4XDataProvider_create_fs(const char* path_data, size_t path_len); +diplomat_result_box_ICU4XDataProvider_ICU4XDataError ICU4XDataProvider_create_fs(const char* path_data, size_t path_len); -diplomat_result_box_ICU4XDataProvider_ICU4XError ICU4XDataProvider_create_from_byte_slice(const uint8_t* blob_data, size_t blob_len); +diplomat_result_box_ICU4XDataProvider_ICU4XDataError ICU4XDataProvider_create_from_byte_slice(const uint8_t* blob_data, size_t blob_len); ICU4XDataProvider* ICU4XDataProvider_create_empty(); -diplomat_result_void_ICU4XError ICU4XDataProvider_fork_by_key(ICU4XDataProvider* self, ICU4XDataProvider* other); +diplomat_result_void_ICU4XDataError ICU4XDataProvider_fork_by_key(ICU4XDataProvider* self, ICU4XDataProvider* other); -diplomat_result_void_ICU4XError ICU4XDataProvider_fork_by_locale(ICU4XDataProvider* self, ICU4XDataProvider* other); +diplomat_result_void_ICU4XDataError ICU4XDataProvider_fork_by_locale(ICU4XDataProvider* self, ICU4XDataProvider* other); -diplomat_result_void_ICU4XError ICU4XDataProvider_enable_locale_fallback(ICU4XDataProvider* self); +diplomat_result_void_ICU4XDataError ICU4XDataProvider_enable_locale_fallback(ICU4XDataProvider* self); -diplomat_result_void_ICU4XError ICU4XDataProvider_enable_locale_fallback_with(ICU4XDataProvider* self, const ICU4XLocaleFallbacker* fallbacker); +diplomat_result_void_ICU4XDataError ICU4XDataProvider_enable_locale_fallback_with(ICU4XDataProvider* self, const ICU4XLocaleFallbacker* fallbacker); void ICU4XDataProvider_destroy(ICU4XDataProvider* self); diff --git a/ffi/capi/bindings/cpp/ICU4XDataProvider.hpp b/ffi/capi/bindings/cpp/ICU4XDataProvider.hpp index ede2b103595..acb8b6794c5 100644 --- a/ffi/capi/bindings/cpp/ICU4XDataProvider.hpp +++ b/ffi/capi/bindings/cpp/ICU4XDataProvider.hpp @@ -10,8 +10,8 @@ #include #include #include "diplomat_runtime.hpp" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.h" -#include "ICU4XError.hpp" #include "ICU4XLocaleFallbacker.hpp" @@ -20,16 +20,16 @@ inline std::unique_ptr ICU4XDataProvider::create_compiled() { return std::unique_ptr(ICU4XDataProvider::FromFFI(result)); } -inline diplomat::result, ICU4XError> ICU4XDataProvider::create_fs(std::string_view path) { +inline diplomat::result, ICU4XDataError> ICU4XDataProvider::create_fs(std::string_view path) { auto result = capi::ICU4XDataProvider_create_fs(path.data(), path.size()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XDataProvider::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XDataProvider::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XDataProvider::create_from_byte_slice(diplomat::span blob) { +inline diplomat::result, ICU4XDataError> ICU4XDataProvider::create_from_byte_slice(diplomat::span blob) { auto result = capi::ICU4XDataProvider_create_from_byte_slice(blob.data(), blob.size()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XDataProvider::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XDataProvider::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline std::unique_ptr ICU4XDataProvider::create_empty() { @@ -37,27 +37,27 @@ inline std::unique_ptr ICU4XDataProvider::create_empty() { return std::unique_ptr(ICU4XDataProvider::FromFFI(result)); } -inline diplomat::result ICU4XDataProvider::fork_by_key(ICU4XDataProvider& other) { +inline diplomat::result ICU4XDataProvider::fork_by_key(ICU4XDataProvider& other) { auto result = capi::ICU4XDataProvider_fork_by_key(this->AsFFI(), other.AsFFI()); - return result.is_ok ? diplomat::result(diplomat::Ok()) : diplomat::result(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result(diplomat::Ok()) : diplomat::result(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result ICU4XDataProvider::fork_by_locale(ICU4XDataProvider& other) { +inline diplomat::result ICU4XDataProvider::fork_by_locale(ICU4XDataProvider& other) { auto result = capi::ICU4XDataProvider_fork_by_locale(this->AsFFI(), other.AsFFI()); - return result.is_ok ? diplomat::result(diplomat::Ok()) : diplomat::result(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result(diplomat::Ok()) : diplomat::result(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result ICU4XDataProvider::enable_locale_fallback() { +inline diplomat::result ICU4XDataProvider::enable_locale_fallback() { auto result = capi::ICU4XDataProvider_enable_locale_fallback(this->AsFFI()); - return result.is_ok ? diplomat::result(diplomat::Ok()) : diplomat::result(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result(diplomat::Ok()) : diplomat::result(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result ICU4XDataProvider::enable_locale_fallback_with(const ICU4XLocaleFallbacker& fallbacker) { +inline diplomat::result ICU4XDataProvider::enable_locale_fallback_with(const ICU4XLocaleFallbacker& fallbacker) { auto result = capi::ICU4XDataProvider_enable_locale_fallback_with(this->AsFFI(), fallbacker.AsFFI()); - return result.is_ok ? diplomat::result(diplomat::Ok()) : diplomat::result(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result(diplomat::Ok()) : diplomat::result(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline const capi::ICU4XDataProvider* ICU4XDataProvider::AsFFI() const { diff --git a/ffi/capi/bindings/cpp/ICU4XDataStruct.d.hpp b/ffi/capi/bindings/cpp/ICU4XDataStruct.d.hpp index 4796569f343..0c9e2f05fb1 100644 --- a/ffi/capi/bindings/cpp/ICU4XDataStruct.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XDataStruct.d.hpp @@ -8,16 +8,16 @@ #include #include #include "diplomat_runtime.hpp" +#include "ICU4XDataError.d.hpp" #include "ICU4XDataStruct.d.h" -#include "ICU4XError.d.hpp" -class ICU4XError; +class ICU4XDataError; class ICU4XDataStruct { public: - inline static diplomat::result, ICU4XError> create_decimal_symbols_v1(std::string_view plus_sign_prefix, std::string_view plus_sign_suffix, std::string_view minus_sign_prefix, std::string_view minus_sign_suffix, std::string_view decimal_separator, std::string_view grouping_separator, uint8_t primary_group_size, uint8_t secondary_group_size, uint8_t min_group_size, diplomat::span digits); + inline static diplomat::result, ICU4XDataError> create_decimal_symbols_v1(std::string_view plus_sign_prefix, std::string_view plus_sign_suffix, std::string_view minus_sign_prefix, std::string_view minus_sign_suffix, std::string_view decimal_separator, std::string_view grouping_separator, uint8_t primary_group_size, uint8_t secondary_group_size, uint8_t min_group_size, diplomat::span digits); inline const capi::ICU4XDataStruct* AsFFI() const; inline capi::ICU4XDataStruct* AsFFI(); diff --git a/ffi/capi/bindings/cpp/ICU4XDataStruct.h b/ffi/capi/bindings/cpp/ICU4XDataStruct.h index fcb6051e1b5..3b98f7dee32 100644 --- a/ffi/capi/bindings/cpp/ICU4XDataStruct.h +++ b/ffi/capi/bindings/cpp/ICU4XDataStruct.h @@ -6,7 +6,7 @@ #include #include #include "diplomat_runtime.h" -#include "diplomat_result_box_ICU4XDataStruct_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XDataStruct_ICU4XDataError.d.h" #include "ICU4XDataStruct.d.h" @@ -16,7 +16,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XDataStruct_ICU4XError ICU4XDataStruct_create_decimal_symbols_v1(const char* plus_sign_prefix_data, size_t plus_sign_prefix_len, const char* plus_sign_suffix_data, size_t plus_sign_suffix_len, const char* minus_sign_prefix_data, size_t minus_sign_prefix_len, const char* minus_sign_suffix_data, size_t minus_sign_suffix_len, const char* decimal_separator_data, size_t decimal_separator_len, const char* grouping_separator_data, size_t grouping_separator_len, uint8_t primary_group_size, uint8_t secondary_group_size, uint8_t min_group_size, const char32_t* digits_data, size_t digits_len); +diplomat_result_box_ICU4XDataStruct_ICU4XDataError ICU4XDataStruct_create_decimal_symbols_v1(const char* plus_sign_prefix_data, size_t plus_sign_prefix_len, const char* plus_sign_suffix_data, size_t plus_sign_suffix_len, const char* minus_sign_prefix_data, size_t minus_sign_prefix_len, const char* minus_sign_suffix_data, size_t minus_sign_suffix_len, const char* decimal_separator_data, size_t decimal_separator_len, const char* grouping_separator_data, size_t grouping_separator_len, uint8_t primary_group_size, uint8_t secondary_group_size, uint8_t min_group_size, const char32_t* digits_data, size_t digits_len); void ICU4XDataStruct_destroy(ICU4XDataStruct* self); diff --git a/ffi/capi/bindings/cpp/ICU4XDataStruct.hpp b/ffi/capi/bindings/cpp/ICU4XDataStruct.hpp index 5034d65a00c..08c9b8c7448 100644 --- a/ffi/capi/bindings/cpp/ICU4XDataStruct.hpp +++ b/ffi/capi/bindings/cpp/ICU4XDataStruct.hpp @@ -10,11 +10,11 @@ #include #include #include "diplomat_runtime.hpp" +#include "ICU4XDataError.hpp" #include "ICU4XDataStruct.h" -#include "ICU4XError.hpp" -inline diplomat::result, ICU4XError> ICU4XDataStruct::create_decimal_symbols_v1(std::string_view plus_sign_prefix, std::string_view plus_sign_suffix, std::string_view minus_sign_prefix, std::string_view minus_sign_suffix, std::string_view decimal_separator, std::string_view grouping_separator, uint8_t primary_group_size, uint8_t secondary_group_size, uint8_t min_group_size, diplomat::span digits) { +inline diplomat::result, ICU4XDataError> ICU4XDataStruct::create_decimal_symbols_v1(std::string_view plus_sign_prefix, std::string_view plus_sign_suffix, std::string_view minus_sign_prefix, std::string_view minus_sign_suffix, std::string_view decimal_separator, std::string_view grouping_separator, uint8_t primary_group_size, uint8_t secondary_group_size, uint8_t min_group_size, diplomat::span digits) { auto result = capi::ICU4XDataStruct_create_decimal_symbols_v1(plus_sign_prefix.data(), plus_sign_prefix.size(), plus_sign_suffix.data(), @@ -32,7 +32,7 @@ inline diplomat::result, ICU4XError> ICU4XDataS min_group_size, digits.data(), digits.size()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XDataStruct::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XDataStruct::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline const capi::ICU4XDataStruct* ICU4XDataStruct::AsFFI() const { diff --git a/ffi/capi/bindings/cpp/ICU4XDate.d.hpp b/ffi/capi/bindings/cpp/ICU4XDate.d.hpp index 1d0fed0f5ff..09f9521859e 100644 --- a/ffi/capi/bindings/cpp/ICU4XDate.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XDate.d.hpp @@ -8,8 +8,8 @@ #include #include #include "diplomat_runtime.hpp" +#include "ICU4XCalendarError.d.hpp" #include "ICU4XDate.d.h" -#include "ICU4XError.d.hpp" #include "ICU4XIsoWeekday.d.hpp" #include "ICU4XWeekOf.d.hpp" @@ -17,16 +17,16 @@ class ICU4XCalendar; class ICU4XIsoDate; class ICU4XWeekCalculator; struct ICU4XWeekOf; -class ICU4XError; +class ICU4XCalendarError; class ICU4XIsoWeekday; class ICU4XDate { public: - inline static diplomat::result, ICU4XError> create_from_iso_in_calendar(int32_t year, uint8_t month, uint8_t day, const ICU4XCalendar& calendar); + inline static diplomat::result, ICU4XCalendarError> create_from_iso_in_calendar(int32_t year, uint8_t month, uint8_t day, const ICU4XCalendar& calendar); - inline static diplomat::result, ICU4XError> create_from_codes_in_calendar(std::string_view era_code, int32_t year, std::string_view month_code, uint8_t day, const ICU4XCalendar& calendar); + inline static diplomat::result, ICU4XCalendarError> create_from_codes_in_calendar(std::string_view era_code, int32_t year, std::string_view month_code, uint8_t day, const ICU4XCalendar& calendar); inline std::unique_ptr to_calendar(const ICU4XCalendar& calendar) const; diff --git a/ffi/capi/bindings/cpp/ICU4XDate.h b/ffi/capi/bindings/cpp/ICU4XDate.h index 4013a8f9a89..edf7d0276c6 100644 --- a/ffi/capi/bindings/cpp/ICU4XDate.h +++ b/ffi/capi/bindings/cpp/ICU4XDate.h @@ -16,7 +16,7 @@ #include "ICU4XWeekCalculator.h" #include "ICU4XWeekOf.d.h" #include "ICU4XWeekOf.h" -#include "diplomat_result_box_ICU4XDate_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XDate_ICU4XCalendarError.d.h" #include "ICU4XDate.d.h" @@ -26,9 +26,9 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XDate_ICU4XError ICU4XDate_create_from_iso_in_calendar(int32_t year, uint8_t month, uint8_t day, const ICU4XCalendar* calendar); +diplomat_result_box_ICU4XDate_ICU4XCalendarError ICU4XDate_create_from_iso_in_calendar(int32_t year, uint8_t month, uint8_t day, const ICU4XCalendar* calendar); -diplomat_result_box_ICU4XDate_ICU4XError ICU4XDate_create_from_codes_in_calendar(const char* era_code_data, size_t era_code_len, int32_t year, const char* month_code_data, size_t month_code_len, uint8_t day, const ICU4XCalendar* calendar); +diplomat_result_box_ICU4XDate_ICU4XCalendarError ICU4XDate_create_from_codes_in_calendar(const char* era_code_data, size_t era_code_len, int32_t year, const char* month_code_data, size_t month_code_len, uint8_t day, const ICU4XCalendar* calendar); ICU4XDate* ICU4XDate_to_calendar(const ICU4XDate* self, const ICU4XCalendar* calendar); diff --git a/ffi/capi/bindings/cpp/ICU4XDate.hpp b/ffi/capi/bindings/cpp/ICU4XDate.hpp index 1188e83e5d4..485d914bff8 100644 --- a/ffi/capi/bindings/cpp/ICU4XDate.hpp +++ b/ffi/capi/bindings/cpp/ICU4XDate.hpp @@ -11,23 +11,23 @@ #include #include "diplomat_runtime.hpp" #include "ICU4XCalendar.hpp" +#include "ICU4XCalendarError.hpp" #include "ICU4XDate.h" -#include "ICU4XError.hpp" #include "ICU4XIsoDate.hpp" #include "ICU4XIsoWeekday.hpp" #include "ICU4XWeekCalculator.hpp" #include "ICU4XWeekOf.hpp" -inline diplomat::result, ICU4XError> ICU4XDate::create_from_iso_in_calendar(int32_t year, uint8_t month, uint8_t day, const ICU4XCalendar& calendar) { +inline diplomat::result, ICU4XCalendarError> ICU4XDate::create_from_iso_in_calendar(int32_t year, uint8_t month, uint8_t day, const ICU4XCalendar& calendar) { auto result = capi::ICU4XDate_create_from_iso_in_calendar(year, month, day, calendar.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XDate::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XCalendarError>(diplomat::Ok>(std::unique_ptr(ICU4XDate::FromFFI(result.ok)))) : diplomat::result, ICU4XCalendarError>(diplomat::Err(ICU4XCalendarError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XDate::create_from_codes_in_calendar(std::string_view era_code, int32_t year, std::string_view month_code, uint8_t day, const ICU4XCalendar& calendar) { +inline diplomat::result, ICU4XCalendarError> ICU4XDate::create_from_codes_in_calendar(std::string_view era_code, int32_t year, std::string_view month_code, uint8_t day, const ICU4XCalendar& calendar) { auto result = capi::ICU4XDate_create_from_codes_in_calendar(era_code.data(), era_code.size(), year, @@ -35,7 +35,7 @@ inline diplomat::result, ICU4XError> ICU4XDate::creat month_code.size(), day, calendar.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XDate::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XCalendarError>(diplomat::Ok>(std::unique_ptr(ICU4XDate::FromFFI(result.ok)))) : diplomat::result, ICU4XCalendarError>(diplomat::Err(ICU4XCalendarError::FromFFI(result.err))); } inline std::unique_ptr ICU4XDate::to_calendar(const ICU4XCalendar& calendar) const { diff --git a/ffi/capi/bindings/cpp/ICU4XDateTime.d.hpp b/ffi/capi/bindings/cpp/ICU4XDateTime.d.hpp index 90cb3bcc54f..9408650a742 100644 --- a/ffi/capi/bindings/cpp/ICU4XDateTime.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XDateTime.d.hpp @@ -8,8 +8,8 @@ #include #include #include "diplomat_runtime.hpp" +#include "ICU4XCalendarError.d.hpp" #include "ICU4XDateTime.d.h" -#include "ICU4XError.d.hpp" #include "ICU4XIsoWeekday.d.hpp" #include "ICU4XWeekOf.d.hpp" @@ -19,16 +19,16 @@ class ICU4XIsoDateTime; class ICU4XTime; class ICU4XWeekCalculator; struct ICU4XWeekOf; -class ICU4XError; +class ICU4XCalendarError; class ICU4XIsoWeekday; class ICU4XDateTime { public: - inline static diplomat::result, ICU4XError> create_from_iso_in_calendar(int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond, const ICU4XCalendar& calendar); + inline static diplomat::result, ICU4XCalendarError> create_from_iso_in_calendar(int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond, const ICU4XCalendar& calendar); - inline static diplomat::result, ICU4XError> create_from_codes_in_calendar(std::string_view era_code, int32_t year, std::string_view month_code, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond, const ICU4XCalendar& calendar); + inline static diplomat::result, ICU4XCalendarError> create_from_codes_in_calendar(std::string_view era_code, int32_t year, std::string_view month_code, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond, const ICU4XCalendar& calendar); inline static std::unique_ptr create_from_date_and_time(const ICU4XDate& date, const ICU4XTime& time); diff --git a/ffi/capi/bindings/cpp/ICU4XDateTime.h b/ffi/capi/bindings/cpp/ICU4XDateTime.h index 544e1a50a8d..0ecc65850b7 100644 --- a/ffi/capi/bindings/cpp/ICU4XDateTime.h +++ b/ffi/capi/bindings/cpp/ICU4XDateTime.h @@ -20,7 +20,7 @@ #include "ICU4XWeekCalculator.h" #include "ICU4XWeekOf.d.h" #include "ICU4XWeekOf.h" -#include "diplomat_result_box_ICU4XDateTime_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XDateTime_ICU4XCalendarError.d.h" #include "ICU4XDateTime.d.h" @@ -30,9 +30,9 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XDateTime_ICU4XError ICU4XDateTime_create_from_iso_in_calendar(int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond, const ICU4XCalendar* calendar); +diplomat_result_box_ICU4XDateTime_ICU4XCalendarError ICU4XDateTime_create_from_iso_in_calendar(int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond, const ICU4XCalendar* calendar); -diplomat_result_box_ICU4XDateTime_ICU4XError ICU4XDateTime_create_from_codes_in_calendar(const char* era_code_data, size_t era_code_len, int32_t year, const char* month_code_data, size_t month_code_len, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond, const ICU4XCalendar* calendar); +diplomat_result_box_ICU4XDateTime_ICU4XCalendarError ICU4XDateTime_create_from_codes_in_calendar(const char* era_code_data, size_t era_code_len, int32_t year, const char* month_code_data, size_t month_code_len, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond, const ICU4XCalendar* calendar); ICU4XDateTime* ICU4XDateTime_create_from_date_and_time(const ICU4XDate* date, const ICU4XTime* time); diff --git a/ffi/capi/bindings/cpp/ICU4XDateTime.hpp b/ffi/capi/bindings/cpp/ICU4XDateTime.hpp index 6505c89c3af..12729c6c9b8 100644 --- a/ffi/capi/bindings/cpp/ICU4XDateTime.hpp +++ b/ffi/capi/bindings/cpp/ICU4XDateTime.hpp @@ -11,9 +11,9 @@ #include #include "diplomat_runtime.hpp" #include "ICU4XCalendar.hpp" +#include "ICU4XCalendarError.hpp" #include "ICU4XDate.hpp" #include "ICU4XDateTime.h" -#include "ICU4XError.hpp" #include "ICU4XIsoDateTime.hpp" #include "ICU4XIsoWeekday.hpp" #include "ICU4XTime.hpp" @@ -21,7 +21,7 @@ #include "ICU4XWeekOf.hpp" -inline diplomat::result, ICU4XError> ICU4XDateTime::create_from_iso_in_calendar(int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond, const ICU4XCalendar& calendar) { +inline diplomat::result, ICU4XCalendarError> ICU4XDateTime::create_from_iso_in_calendar(int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond, const ICU4XCalendar& calendar) { auto result = capi::ICU4XDateTime_create_from_iso_in_calendar(year, month, day, @@ -30,10 +30,10 @@ inline diplomat::result, ICU4XError> ICU4XDateTim second, nanosecond, calendar.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XDateTime::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XCalendarError>(diplomat::Ok>(std::unique_ptr(ICU4XDateTime::FromFFI(result.ok)))) : diplomat::result, ICU4XCalendarError>(diplomat::Err(ICU4XCalendarError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XDateTime::create_from_codes_in_calendar(std::string_view era_code, int32_t year, std::string_view month_code, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond, const ICU4XCalendar& calendar) { +inline diplomat::result, ICU4XCalendarError> ICU4XDateTime::create_from_codes_in_calendar(std::string_view era_code, int32_t year, std::string_view month_code, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond, const ICU4XCalendar& calendar) { auto result = capi::ICU4XDateTime_create_from_codes_in_calendar(era_code.data(), era_code.size(), year, @@ -45,7 +45,7 @@ inline diplomat::result, ICU4XError> ICU4XDateTim second, nanosecond, calendar.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XDateTime::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XCalendarError>(diplomat::Ok>(std::unique_ptr(ICU4XDateTime::FromFFI(result.ok)))) : diplomat::result, ICU4XCalendarError>(diplomat::Err(ICU4XCalendarError::FromFFI(result.err))); } inline std::unique_ptr ICU4XDateTime::create_from_date_and_time(const ICU4XDate& date, const ICU4XTime& time) { diff --git a/ffi/capi/bindings/cpp/ICU4XDecomposingNormalizer.d.hpp b/ffi/capi/bindings/cpp/ICU4XDecomposingNormalizer.d.hpp index 3713190fe94..23eb0708ba9 100644 --- a/ffi/capi/bindings/cpp/ICU4XDecomposingNormalizer.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XDecomposingNormalizer.d.hpp @@ -8,19 +8,19 @@ #include #include #include "diplomat_runtime.hpp" +#include "ICU4XDataError.d.hpp" #include "ICU4XDecomposingNormalizer.d.h" -#include "ICU4XError.d.hpp" class ICU4XDataProvider; -class ICU4XError; +class ICU4XDataError; class ICU4XDecomposingNormalizer { public: - inline static diplomat::result, ICU4XError> create_nfd(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> create_nfd(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> create_nfkd(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> create_nfkd(const ICU4XDataProvider& provider); inline std::string normalize(std::string_view s) const; diff --git a/ffi/capi/bindings/cpp/ICU4XDecomposingNormalizer.h b/ffi/capi/bindings/cpp/ICU4XDecomposingNormalizer.h index 2a7317017af..3f1ab1f2323 100644 --- a/ffi/capi/bindings/cpp/ICU4XDecomposingNormalizer.h +++ b/ffi/capi/bindings/cpp/ICU4XDecomposingNormalizer.h @@ -8,7 +8,7 @@ #include "diplomat_runtime.h" #include "ICU4XDataProvider.d.h" #include "ICU4XDataProvider.h" -#include "diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XDataError.d.h" #include "ICU4XDecomposingNormalizer.d.h" @@ -18,9 +18,9 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError ICU4XDecomposingNormalizer_create_nfd(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XDataError ICU4XDecomposingNormalizer_create_nfd(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError ICU4XDecomposingNormalizer_create_nfkd(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XDataError ICU4XDecomposingNormalizer_create_nfkd(const ICU4XDataProvider* provider); void ICU4XDecomposingNormalizer_normalize(const ICU4XDecomposingNormalizer* self, const char* s_data, size_t s_len, DiplomatWrite* write); diff --git a/ffi/capi/bindings/cpp/ICU4XDecomposingNormalizer.hpp b/ffi/capi/bindings/cpp/ICU4XDecomposingNormalizer.hpp index 6f77f5e62a9..2b2911d4bad 100644 --- a/ffi/capi/bindings/cpp/ICU4XDecomposingNormalizer.hpp +++ b/ffi/capi/bindings/cpp/ICU4XDecomposingNormalizer.hpp @@ -10,19 +10,19 @@ #include #include #include "diplomat_runtime.hpp" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" #include "ICU4XDecomposingNormalizer.h" -#include "ICU4XError.hpp" -inline diplomat::result, ICU4XError> ICU4XDecomposingNormalizer::create_nfd(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XDecomposingNormalizer::create_nfd(const ICU4XDataProvider& provider) { auto result = capi::ICU4XDecomposingNormalizer_create_nfd(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XDecomposingNormalizer::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XDecomposingNormalizer::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XDecomposingNormalizer::create_nfkd(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XDecomposingNormalizer::create_nfkd(const ICU4XDataProvider& provider) { auto result = capi::ICU4XDecomposingNormalizer_create_nfkd(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XDecomposingNormalizer::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XDecomposingNormalizer::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline std::string ICU4XDecomposingNormalizer::normalize(std::string_view s) const { diff --git a/ffi/capi/bindings/cpp/ICU4XError.d.h b/ffi/capi/bindings/cpp/ICU4XError.d.h index ac61514aeed..2395114f6a0 100644 --- a/ffi/capi/bindings/cpp/ICU4XError.d.h +++ b/ffi/capi/bindings/cpp/ICU4XError.d.h @@ -29,17 +29,7 @@ typedef enum ICU4XError { ICU4XError_DataIoError = 267, ICU4XError_DataUnavailableBufferFormatError = 268, ICU4XError_DataMismatchedAnyBufferError = 269, - ICU4XError_LocaleParserLanguageError = 513, - ICU4XError_LocaleParserSubtagError = 514, - ICU4XError_LocaleParserExtensionError = 515, - ICU4XError_DataStructValidityError = 768, ICU4XError_PropertyUnexpectedPropertyNameError = 1026, - ICU4XError_FixedDecimalLimitError = 1280, - ICU4XError_FixedDecimalSyntaxError = 1281, - ICU4XError_PluralsParseError = 1536, - ICU4XError_CalendarOutOfRangeError = 1795, - ICU4XError_CalendarUnknownEraError = 1796, - ICU4XError_CalendarUnknownMonthCodeError = 1797, ICU4XError_DateTimePatternError = 2048, ICU4XError_DateTimeMissingInputFieldError = 2049, ICU4XError_DateTimeSkeletonError = 2050, @@ -49,8 +39,6 @@ typedef enum ICU4XError { ICU4XError_DateTimeMissingMonthSymbolError = 2054, ICU4XError_DateTimeFixedDecimalError = 2055, ICU4XError_DateTimeMismatchedCalendarError = 2056, - ICU4XError_TimeZoneInvalidOffsetError = 2561, - ICU4XError_TimeZoneInvalidIdError = 2563, } ICU4XError; diff --git a/ffi/capi/bindings/cpp/ICU4XError.d.hpp b/ffi/capi/bindings/cpp/ICU4XError.d.hpp index 49c84c8188e..4bae12ed694 100644 --- a/ffi/capi/bindings/cpp/ICU4XError.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XError.d.hpp @@ -29,17 +29,7 @@ class ICU4XError { DataIoError = 267, DataUnavailableBufferFormatError = 268, DataMismatchedAnyBufferError = 269, - LocaleParserLanguageError = 513, - LocaleParserSubtagError = 514, - LocaleParserExtensionError = 515, - DataStructValidityError = 768, PropertyUnexpectedPropertyNameError = 1026, - FixedDecimalLimitError = 1280, - FixedDecimalSyntaxError = 1281, - PluralsParseError = 1536, - CalendarOutOfRangeError = 1795, - CalendarUnknownEraError = 1796, - CalendarUnknownMonthCodeError = 1797, DateTimePatternError = 2048, DateTimeMissingInputFieldError = 2049, DateTimeSkeletonError = 2050, @@ -49,8 +39,6 @@ class ICU4XError { DateTimeMissingMonthSymbolError = 2054, DateTimeFixedDecimalError = 2055, DateTimeMismatchedCalendarError = 2056, - TimeZoneInvalidOffsetError = 2561, - TimeZoneInvalidIdError = 2563, }; ICU4XError() = default; diff --git a/ffi/capi/bindings/cpp/ICU4XError.hpp b/ffi/capi/bindings/cpp/ICU4XError.hpp index 5548cd79d6f..3df8e99521e 100644 --- a/ffi/capi/bindings/cpp/ICU4XError.hpp +++ b/ffi/capi/bindings/cpp/ICU4XError.hpp @@ -34,17 +34,7 @@ inline ICU4XError ICU4XError::FromFFI(capi::ICU4XError c_enum) { case capi::ICU4XError_DataIoError: case capi::ICU4XError_DataUnavailableBufferFormatError: case capi::ICU4XError_DataMismatchedAnyBufferError: - case capi::ICU4XError_LocaleParserLanguageError: - case capi::ICU4XError_LocaleParserSubtagError: - case capi::ICU4XError_LocaleParserExtensionError: - case capi::ICU4XError_DataStructValidityError: case capi::ICU4XError_PropertyUnexpectedPropertyNameError: - case capi::ICU4XError_FixedDecimalLimitError: - case capi::ICU4XError_FixedDecimalSyntaxError: - case capi::ICU4XError_PluralsParseError: - case capi::ICU4XError_CalendarOutOfRangeError: - case capi::ICU4XError_CalendarUnknownEraError: - case capi::ICU4XError_CalendarUnknownMonthCodeError: case capi::ICU4XError_DateTimePatternError: case capi::ICU4XError_DateTimeMissingInputFieldError: case capi::ICU4XError_DateTimeSkeletonError: @@ -54,8 +44,6 @@ inline ICU4XError ICU4XError::FromFFI(capi::ICU4XError c_enum) { case capi::ICU4XError_DateTimeMissingMonthSymbolError: case capi::ICU4XError_DateTimeFixedDecimalError: case capi::ICU4XError_DateTimeMismatchedCalendarError: - case capi::ICU4XError_TimeZoneInvalidOffsetError: - case capi::ICU4XError_TimeZoneInvalidIdError: return static_cast(c_enum); default: abort(); diff --git a/ffi/capi/bindings/cpp/ICU4XFixedDecimal.d.hpp b/ffi/capi/bindings/cpp/ICU4XFixedDecimal.d.hpp index c9adea69fd7..4a9cdf1d2ca 100644 --- a/ffi/capi/bindings/cpp/ICU4XFixedDecimal.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XFixedDecimal.d.hpp @@ -8,13 +8,15 @@ #include #include #include "diplomat_runtime.hpp" -#include "ICU4XError.d.hpp" #include "ICU4XFixedDecimal.d.h" +#include "ICU4XFixedDecimalLimitError.d.hpp" +#include "ICU4XFixedDecimalParseError.d.hpp" #include "ICU4XFixedDecimalRoundingIncrement.d.hpp" #include "ICU4XFixedDecimalSign.d.hpp" #include "ICU4XFixedDecimalSignDisplay.d.hpp" -class ICU4XError; +class ICU4XFixedDecimalLimitError; +class ICU4XFixedDecimalParseError; class ICU4XFixedDecimalRoundingIncrement; class ICU4XFixedDecimalSign; class ICU4XFixedDecimalSignDisplay; @@ -31,15 +33,15 @@ class ICU4XFixedDecimal { inline static std::unique_ptr create_from_u64(uint64_t v); - inline static diplomat::result, ICU4XError> create_from_f64_with_integer_precision(double f); + inline static diplomat::result, ICU4XFixedDecimalLimitError> create_from_f64_with_integer_precision(double f); - inline static diplomat::result, ICU4XError> create_from_f64_with_lower_magnitude(double f, int16_t magnitude); + inline static diplomat::result, ICU4XFixedDecimalLimitError> create_from_f64_with_lower_magnitude(double f, int16_t magnitude); - inline static diplomat::result, ICU4XError> create_from_f64_with_significant_digits(double f, uint8_t digits); + inline static diplomat::result, ICU4XFixedDecimalLimitError> create_from_f64_with_significant_digits(double f, uint8_t digits); - inline static diplomat::result, ICU4XError> create_from_f64_with_floating_precision(double f); + inline static diplomat::result, ICU4XFixedDecimalLimitError> create_from_f64_with_floating_precision(double f); - inline static diplomat::result, ICU4XError> create_from_string(std::string_view v); + inline static diplomat::result, ICU4XFixedDecimalParseError> create_from_string(std::string_view v); inline uint8_t digit_at(int16_t magnitude) const; diff --git a/ffi/capi/bindings/cpp/ICU4XFixedDecimal.h b/ffi/capi/bindings/cpp/ICU4XFixedDecimal.h index 307b1698f73..d4fc7a66153 100644 --- a/ffi/capi/bindings/cpp/ICU4XFixedDecimal.h +++ b/ffi/capi/bindings/cpp/ICU4XFixedDecimal.h @@ -12,7 +12,8 @@ #include "ICU4XFixedDecimalSign.h" #include "ICU4XFixedDecimalSignDisplay.d.h" #include "ICU4XFixedDecimalSignDisplay.h" -#include "diplomat_result_box_ICU4XFixedDecimal_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalLimitError.d.h" +#include "diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalParseError.d.h" #include "diplomat_result_void_void.d.h" #include "ICU4XFixedDecimal.d.h" @@ -31,15 +32,15 @@ ICU4XFixedDecimal* ICU4XFixedDecimal_create_from_i64(int64_t v); ICU4XFixedDecimal* ICU4XFixedDecimal_create_from_u64(uint64_t v); -diplomat_result_box_ICU4XFixedDecimal_ICU4XError ICU4XFixedDecimal_create_from_f64_with_integer_precision(double f); +diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalLimitError ICU4XFixedDecimal_create_from_f64_with_integer_precision(double f); -diplomat_result_box_ICU4XFixedDecimal_ICU4XError ICU4XFixedDecimal_create_from_f64_with_lower_magnitude(double f, int16_t magnitude); +diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalLimitError ICU4XFixedDecimal_create_from_f64_with_lower_magnitude(double f, int16_t magnitude); -diplomat_result_box_ICU4XFixedDecimal_ICU4XError ICU4XFixedDecimal_create_from_f64_with_significant_digits(double f, uint8_t digits); +diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalLimitError ICU4XFixedDecimal_create_from_f64_with_significant_digits(double f, uint8_t digits); -diplomat_result_box_ICU4XFixedDecimal_ICU4XError ICU4XFixedDecimal_create_from_f64_with_floating_precision(double f); +diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalLimitError ICU4XFixedDecimal_create_from_f64_with_floating_precision(double f); -diplomat_result_box_ICU4XFixedDecimal_ICU4XError ICU4XFixedDecimal_create_from_string(const char* v_data, size_t v_len); +diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalParseError ICU4XFixedDecimal_create_from_string(const char* v_data, size_t v_len); uint8_t ICU4XFixedDecimal_digit_at(const ICU4XFixedDecimal* self, int16_t magnitude); diff --git a/ffi/capi/bindings/cpp/ICU4XFixedDecimal.hpp b/ffi/capi/bindings/cpp/ICU4XFixedDecimal.hpp index 83b7859868e..f0207fdea66 100644 --- a/ffi/capi/bindings/cpp/ICU4XFixedDecimal.hpp +++ b/ffi/capi/bindings/cpp/ICU4XFixedDecimal.hpp @@ -10,8 +10,9 @@ #include #include #include "diplomat_runtime.hpp" -#include "ICU4XError.hpp" #include "ICU4XFixedDecimal.h" +#include "ICU4XFixedDecimalLimitError.hpp" +#include "ICU4XFixedDecimalParseError.hpp" #include "ICU4XFixedDecimalRoundingIncrement.hpp" #include "ICU4XFixedDecimalSign.hpp" #include "ICU4XFixedDecimalSignDisplay.hpp" @@ -37,32 +38,32 @@ inline std::unique_ptr ICU4XFixedDecimal::create_from_u64(uin return std::unique_ptr(ICU4XFixedDecimal::FromFFI(result)); } -inline diplomat::result, ICU4XError> ICU4XFixedDecimal::create_from_f64_with_integer_precision(double f) { +inline diplomat::result, ICU4XFixedDecimalLimitError> ICU4XFixedDecimal::create_from_f64_with_integer_precision(double f) { auto result = capi::ICU4XFixedDecimal_create_from_f64_with_integer_precision(f); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XFixedDecimal::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XFixedDecimalLimitError>(diplomat::Ok>(std::unique_ptr(ICU4XFixedDecimal::FromFFI(result.ok)))) : diplomat::result, ICU4XFixedDecimalLimitError>(diplomat::Err(ICU4XFixedDecimalLimitError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XFixedDecimal::create_from_f64_with_lower_magnitude(double f, int16_t magnitude) { +inline diplomat::result, ICU4XFixedDecimalLimitError> ICU4XFixedDecimal::create_from_f64_with_lower_magnitude(double f, int16_t magnitude) { auto result = capi::ICU4XFixedDecimal_create_from_f64_with_lower_magnitude(f, magnitude); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XFixedDecimal::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XFixedDecimalLimitError>(diplomat::Ok>(std::unique_ptr(ICU4XFixedDecimal::FromFFI(result.ok)))) : diplomat::result, ICU4XFixedDecimalLimitError>(diplomat::Err(ICU4XFixedDecimalLimitError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XFixedDecimal::create_from_f64_with_significant_digits(double f, uint8_t digits) { +inline diplomat::result, ICU4XFixedDecimalLimitError> ICU4XFixedDecimal::create_from_f64_with_significant_digits(double f, uint8_t digits) { auto result = capi::ICU4XFixedDecimal_create_from_f64_with_significant_digits(f, digits); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XFixedDecimal::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XFixedDecimalLimitError>(diplomat::Ok>(std::unique_ptr(ICU4XFixedDecimal::FromFFI(result.ok)))) : diplomat::result, ICU4XFixedDecimalLimitError>(diplomat::Err(ICU4XFixedDecimalLimitError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XFixedDecimal::create_from_f64_with_floating_precision(double f) { +inline diplomat::result, ICU4XFixedDecimalLimitError> ICU4XFixedDecimal::create_from_f64_with_floating_precision(double f) { auto result = capi::ICU4XFixedDecimal_create_from_f64_with_floating_precision(f); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XFixedDecimal::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XFixedDecimalLimitError>(diplomat::Ok>(std::unique_ptr(ICU4XFixedDecimal::FromFFI(result.ok)))) : diplomat::result, ICU4XFixedDecimalLimitError>(diplomat::Err(ICU4XFixedDecimalLimitError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XFixedDecimal::create_from_string(std::string_view v) { +inline diplomat::result, ICU4XFixedDecimalParseError> ICU4XFixedDecimal::create_from_string(std::string_view v) { auto result = capi::ICU4XFixedDecimal_create_from_string(v.data(), v.size()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XFixedDecimal::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XFixedDecimalParseError>(diplomat::Ok>(std::unique_ptr(ICU4XFixedDecimal::FromFFI(result.ok)))) : diplomat::result, ICU4XFixedDecimalParseError>(diplomat::Err(ICU4XFixedDecimalParseError::FromFFI(result.err))); } inline uint8_t ICU4XFixedDecimal::digit_at(int16_t magnitude) const { diff --git a/ffi/capi/bindings/cpp/ICU4XFixedDecimalFormatter.d.hpp b/ffi/capi/bindings/cpp/ICU4XFixedDecimalFormatter.d.hpp index f9fcef650ca..ee66784a58c 100644 --- a/ffi/capi/bindings/cpp/ICU4XFixedDecimalFormatter.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XFixedDecimalFormatter.d.hpp @@ -8,7 +8,7 @@ #include #include #include "diplomat_runtime.hpp" -#include "ICU4XError.d.hpp" +#include "ICU4XDataError.d.hpp" #include "ICU4XFixedDecimalFormatter.d.h" #include "ICU4XFixedDecimalGroupingStrategy.d.hpp" @@ -16,16 +16,16 @@ class ICU4XDataProvider; class ICU4XDataStruct; class ICU4XFixedDecimal; class ICU4XLocale; -class ICU4XError; +class ICU4XDataError; class ICU4XFixedDecimalGroupingStrategy; class ICU4XFixedDecimalFormatter { public: - inline static diplomat::result, ICU4XError> create_with_grouping_strategy(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XFixedDecimalGroupingStrategy grouping_strategy); + inline static diplomat::result, ICU4XDataError> create_with_grouping_strategy(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XFixedDecimalGroupingStrategy grouping_strategy); - inline static diplomat::result, ICU4XError> create_with_decimal_symbols_v1(const ICU4XDataStruct& data_struct, ICU4XFixedDecimalGroupingStrategy grouping_strategy); + inline static diplomat::result, ICU4XDataError> create_with_decimal_symbols_v1(const ICU4XDataStruct& data_struct, ICU4XFixedDecimalGroupingStrategy grouping_strategy); inline std::string format(const ICU4XFixedDecimal& value) const; diff --git a/ffi/capi/bindings/cpp/ICU4XFixedDecimalFormatter.h b/ffi/capi/bindings/cpp/ICU4XFixedDecimalFormatter.h index 87105b09ffe..9950d306e08 100644 --- a/ffi/capi/bindings/cpp/ICU4XFixedDecimalFormatter.h +++ b/ffi/capi/bindings/cpp/ICU4XFixedDecimalFormatter.h @@ -16,7 +16,7 @@ #include "ICU4XFixedDecimalGroupingStrategy.h" #include "ICU4XLocale.d.h" #include "ICU4XLocale.h" -#include "diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XDataError.d.h" #include "ICU4XFixedDecimalFormatter.d.h" @@ -26,9 +26,9 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError ICU4XFixedDecimalFormatter_create_with_grouping_strategy(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XFixedDecimalGroupingStrategy grouping_strategy); +diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XDataError ICU4XFixedDecimalFormatter_create_with_grouping_strategy(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XFixedDecimalGroupingStrategy grouping_strategy); -diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError ICU4XFixedDecimalFormatter_create_with_decimal_symbols_v1(const ICU4XDataStruct* data_struct, ICU4XFixedDecimalGroupingStrategy grouping_strategy); +diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XDataError ICU4XFixedDecimalFormatter_create_with_decimal_symbols_v1(const ICU4XDataStruct* data_struct, ICU4XFixedDecimalGroupingStrategy grouping_strategy); void ICU4XFixedDecimalFormatter_format(const ICU4XFixedDecimalFormatter* self, const ICU4XFixedDecimal* value, DiplomatWrite* write); diff --git a/ffi/capi/bindings/cpp/ICU4XFixedDecimalFormatter.hpp b/ffi/capi/bindings/cpp/ICU4XFixedDecimalFormatter.hpp index 7699336ead4..65c62439138 100644 --- a/ffi/capi/bindings/cpp/ICU4XFixedDecimalFormatter.hpp +++ b/ffi/capi/bindings/cpp/ICU4XFixedDecimalFormatter.hpp @@ -10,26 +10,26 @@ #include #include #include "diplomat_runtime.hpp" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" #include "ICU4XDataStruct.hpp" -#include "ICU4XError.hpp" #include "ICU4XFixedDecimal.hpp" #include "ICU4XFixedDecimalFormatter.h" #include "ICU4XFixedDecimalGroupingStrategy.hpp" #include "ICU4XLocale.hpp" -inline diplomat::result, ICU4XError> ICU4XFixedDecimalFormatter::create_with_grouping_strategy(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XFixedDecimalGroupingStrategy grouping_strategy) { +inline diplomat::result, ICU4XDataError> ICU4XFixedDecimalFormatter::create_with_grouping_strategy(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XFixedDecimalGroupingStrategy grouping_strategy) { auto result = capi::ICU4XFixedDecimalFormatter_create_with_grouping_strategy(provider.AsFFI(), locale.AsFFI(), grouping_strategy.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XFixedDecimalFormatter::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XFixedDecimalFormatter::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XFixedDecimalFormatter::create_with_decimal_symbols_v1(const ICU4XDataStruct& data_struct, ICU4XFixedDecimalGroupingStrategy grouping_strategy) { +inline diplomat::result, ICU4XDataError> ICU4XFixedDecimalFormatter::create_with_decimal_symbols_v1(const ICU4XDataStruct& data_struct, ICU4XFixedDecimalGroupingStrategy grouping_strategy) { auto result = capi::ICU4XFixedDecimalFormatter_create_with_decimal_symbols_v1(data_struct.AsFFI(), grouping_strategy.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XFixedDecimalFormatter::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XFixedDecimalFormatter::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline std::string ICU4XFixedDecimalFormatter::format(const ICU4XFixedDecimal& value) const { diff --git a/ffi/capi/bindings/cpp/ICU4XFixedDecimalLimitError.d.h b/ffi/capi/bindings/cpp/ICU4XFixedDecimalLimitError.d.h new file mode 100644 index 00000000000..bf4543c6597 --- /dev/null +++ b/ffi/capi/bindings/cpp/ICU4XFixedDecimalLimitError.d.h @@ -0,0 +1,26 @@ +#ifndef ICU4XFixedDecimalLimitError_D_H +#define ICU4XFixedDecimalLimitError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef enum ICU4XFixedDecimalLimitError { + ICU4XFixedDecimalLimitError_TodoZst = 0, +} ICU4XFixedDecimalLimitError; + + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // ICU4XFixedDecimalLimitError_D_H diff --git a/ffi/capi/bindings/cpp/ICU4XFixedDecimalLimitError.d.hpp b/ffi/capi/bindings/cpp/ICU4XFixedDecimalLimitError.d.hpp new file mode 100644 index 00000000000..77ca8f7a749 --- /dev/null +++ b/ffi/capi/bindings/cpp/ICU4XFixedDecimalLimitError.d.hpp @@ -0,0 +1,34 @@ +#ifndef ICU4XFixedDecimalLimitError_D_HPP +#define ICU4XFixedDecimalLimitError_D_HPP + +#include +#include +#include +#include +#include +#include +#include "diplomat_runtime.hpp" +#include "ICU4XFixedDecimalLimitError.d.h" + + +class ICU4XFixedDecimalLimitError { +public: + enum Value { + TodoZst = 0, + }; + + ICU4XFixedDecimalLimitError() = default; + // Implicit conversions between enum and ::Value + constexpr ICU4XFixedDecimalLimitError(Value v) : value(v) {} + constexpr operator Value() const { return value; } + // Prevent usage as boolean value + explicit operator bool() const = delete; + + inline capi::ICU4XFixedDecimalLimitError AsFFI() const; + inline static ICU4XFixedDecimalLimitError FromFFI(capi::ICU4XFixedDecimalLimitError c_enum); +private: + Value value; +}; + + +#endif // ICU4XFixedDecimalLimitError_D_HPP diff --git a/ffi/capi/bindings/cpp/ICU4XFixedDecimalLimitError.h b/ffi/capi/bindings/cpp/ICU4XFixedDecimalLimitError.h new file mode 100644 index 00000000000..5d157f744bc --- /dev/null +++ b/ffi/capi/bindings/cpp/ICU4XFixedDecimalLimitError.h @@ -0,0 +1,26 @@ +#ifndef ICU4XFixedDecimalLimitError_H +#define ICU4XFixedDecimalLimitError_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + +#include "ICU4XFixedDecimalLimitError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +// No Content + + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // ICU4XFixedDecimalLimitError_H diff --git a/ffi/capi/bindings/cpp/ICU4XFixedDecimalLimitError.hpp b/ffi/capi/bindings/cpp/ICU4XFixedDecimalLimitError.hpp new file mode 100644 index 00000000000..ec92435943e --- /dev/null +++ b/ffi/capi/bindings/cpp/ICU4XFixedDecimalLimitError.hpp @@ -0,0 +1,28 @@ +#ifndef ICU4XFixedDecimalLimitError_HPP +#define ICU4XFixedDecimalLimitError_HPP + +#include "ICU4XFixedDecimalLimitError.d.hpp" + +#include +#include +#include +#include +#include +#include +#include "diplomat_runtime.hpp" +#include "ICU4XFixedDecimalLimitError.h" + + +inline capi::ICU4XFixedDecimalLimitError ICU4XFixedDecimalLimitError::AsFFI() const { + return static_cast(value); +} + +inline ICU4XFixedDecimalLimitError ICU4XFixedDecimalLimitError::FromFFI(capi::ICU4XFixedDecimalLimitError c_enum) { + switch (c_enum) { + case capi::ICU4XFixedDecimalLimitError_TodoZst: + return static_cast(c_enum); + default: + abort(); + } +} +#endif // ICU4XFixedDecimalLimitError_HPP diff --git a/ffi/capi/bindings/cpp/ICU4XFixedDecimalParseError.d.h b/ffi/capi/bindings/cpp/ICU4XFixedDecimalParseError.d.h new file mode 100644 index 00000000000..257ec18adf8 --- /dev/null +++ b/ffi/capi/bindings/cpp/ICU4XFixedDecimalParseError.d.h @@ -0,0 +1,28 @@ +#ifndef ICU4XFixedDecimalParseError_D_H +#define ICU4XFixedDecimalParseError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef enum ICU4XFixedDecimalParseError { + ICU4XFixedDecimalParseError_Unknown = 0, + ICU4XFixedDecimalParseError_Limit = 1, + ICU4XFixedDecimalParseError_Syntax = 2, +} ICU4XFixedDecimalParseError; + + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // ICU4XFixedDecimalParseError_D_H diff --git a/ffi/capi/bindings/cpp/ICU4XFixedDecimalParseError.d.hpp b/ffi/capi/bindings/cpp/ICU4XFixedDecimalParseError.d.hpp new file mode 100644 index 00000000000..ef3bd3b27e0 --- /dev/null +++ b/ffi/capi/bindings/cpp/ICU4XFixedDecimalParseError.d.hpp @@ -0,0 +1,36 @@ +#ifndef ICU4XFixedDecimalParseError_D_HPP +#define ICU4XFixedDecimalParseError_D_HPP + +#include +#include +#include +#include +#include +#include +#include "diplomat_runtime.hpp" +#include "ICU4XFixedDecimalParseError.d.h" + + +class ICU4XFixedDecimalParseError { +public: + enum Value { + Unknown = 0, + Limit = 1, + Syntax = 2, + }; + + ICU4XFixedDecimalParseError() = default; + // Implicit conversions between enum and ::Value + constexpr ICU4XFixedDecimalParseError(Value v) : value(v) {} + constexpr operator Value() const { return value; } + // Prevent usage as boolean value + explicit operator bool() const = delete; + + inline capi::ICU4XFixedDecimalParseError AsFFI() const; + inline static ICU4XFixedDecimalParseError FromFFI(capi::ICU4XFixedDecimalParseError c_enum); +private: + Value value; +}; + + +#endif // ICU4XFixedDecimalParseError_D_HPP diff --git a/ffi/capi/bindings/cpp/ICU4XFixedDecimalParseError.h b/ffi/capi/bindings/cpp/ICU4XFixedDecimalParseError.h new file mode 100644 index 00000000000..ddca494e725 --- /dev/null +++ b/ffi/capi/bindings/cpp/ICU4XFixedDecimalParseError.h @@ -0,0 +1,26 @@ +#ifndef ICU4XFixedDecimalParseError_H +#define ICU4XFixedDecimalParseError_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + +#include "ICU4XFixedDecimalParseError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +// No Content + + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // ICU4XFixedDecimalParseError_H diff --git a/ffi/capi/bindings/cpp/ICU4XFixedDecimalParseError.hpp b/ffi/capi/bindings/cpp/ICU4XFixedDecimalParseError.hpp new file mode 100644 index 00000000000..1e2379ea46b --- /dev/null +++ b/ffi/capi/bindings/cpp/ICU4XFixedDecimalParseError.hpp @@ -0,0 +1,30 @@ +#ifndef ICU4XFixedDecimalParseError_HPP +#define ICU4XFixedDecimalParseError_HPP + +#include "ICU4XFixedDecimalParseError.d.hpp" + +#include +#include +#include +#include +#include +#include +#include "diplomat_runtime.hpp" +#include "ICU4XFixedDecimalParseError.h" + + +inline capi::ICU4XFixedDecimalParseError ICU4XFixedDecimalParseError::AsFFI() const { + return static_cast(value); +} + +inline ICU4XFixedDecimalParseError ICU4XFixedDecimalParseError::FromFFI(capi::ICU4XFixedDecimalParseError c_enum) { + switch (c_enum) { + case capi::ICU4XFixedDecimalParseError_Unknown: + case capi::ICU4XFixedDecimalParseError_Limit: + case capi::ICU4XFixedDecimalParseError_Syntax: + return static_cast(c_enum); + default: + abort(); + } +} +#endif // ICU4XFixedDecimalParseError_HPP diff --git a/ffi/capi/bindings/cpp/ICU4XGeneralCategoryNameToMaskMapper.d.hpp b/ffi/capi/bindings/cpp/ICU4XGeneralCategoryNameToMaskMapper.d.hpp index e3f52909dfb..06bd13ed9dc 100644 --- a/ffi/capi/bindings/cpp/ICU4XGeneralCategoryNameToMaskMapper.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XGeneralCategoryNameToMaskMapper.d.hpp @@ -8,11 +8,11 @@ #include #include #include "diplomat_runtime.hpp" -#include "ICU4XError.d.hpp" +#include "ICU4XDataError.d.hpp" #include "ICU4XGeneralCategoryNameToMaskMapper.d.h" class ICU4XDataProvider; -class ICU4XError; +class ICU4XDataError; class ICU4XGeneralCategoryNameToMaskMapper { @@ -22,7 +22,7 @@ class ICU4XGeneralCategoryNameToMaskMapper { inline uint32_t get_loose(std::string_view name) const; - inline static diplomat::result, ICU4XError> load(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load(const ICU4XDataProvider& provider); inline const capi::ICU4XGeneralCategoryNameToMaskMapper* AsFFI() const; inline capi::ICU4XGeneralCategoryNameToMaskMapper* AsFFI(); diff --git a/ffi/capi/bindings/cpp/ICU4XGeneralCategoryNameToMaskMapper.h b/ffi/capi/bindings/cpp/ICU4XGeneralCategoryNameToMaskMapper.h index bc05d09763b..7914dd03683 100644 --- a/ffi/capi/bindings/cpp/ICU4XGeneralCategoryNameToMaskMapper.h +++ b/ffi/capi/bindings/cpp/ICU4XGeneralCategoryNameToMaskMapper.h @@ -8,7 +8,7 @@ #include "diplomat_runtime.h" #include "ICU4XDataProvider.d.h" #include "ICU4XDataProvider.h" -#include "diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XDataError.d.h" #include "ICU4XGeneralCategoryNameToMaskMapper.d.h" @@ -22,7 +22,7 @@ uint32_t ICU4XGeneralCategoryNameToMaskMapper_get_strict(const ICU4XGeneralCateg uint32_t ICU4XGeneralCategoryNameToMaskMapper_get_loose(const ICU4XGeneralCategoryNameToMaskMapper* self, const char* name_data, size_t name_len); -diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError ICU4XGeneralCategoryNameToMaskMapper_load(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XDataError ICU4XGeneralCategoryNameToMaskMapper_load(const ICU4XDataProvider* provider); void ICU4XGeneralCategoryNameToMaskMapper_destroy(ICU4XGeneralCategoryNameToMaskMapper* self); diff --git a/ffi/capi/bindings/cpp/ICU4XGeneralCategoryNameToMaskMapper.hpp b/ffi/capi/bindings/cpp/ICU4XGeneralCategoryNameToMaskMapper.hpp index 3746220b4e5..573237dda8a 100644 --- a/ffi/capi/bindings/cpp/ICU4XGeneralCategoryNameToMaskMapper.hpp +++ b/ffi/capi/bindings/cpp/ICU4XGeneralCategoryNameToMaskMapper.hpp @@ -10,8 +10,8 @@ #include #include #include "diplomat_runtime.hpp" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" -#include "ICU4XError.hpp" #include "ICU4XGeneralCategoryNameToMaskMapper.h" @@ -29,9 +29,9 @@ inline uint32_t ICU4XGeneralCategoryNameToMaskMapper::get_loose(std::string_view return result; } -inline diplomat::result, ICU4XError> ICU4XGeneralCategoryNameToMaskMapper::load(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XGeneralCategoryNameToMaskMapper::load(const ICU4XDataProvider& provider) { auto result = capi::ICU4XGeneralCategoryNameToMaskMapper_load(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XGeneralCategoryNameToMaskMapper::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XGeneralCategoryNameToMaskMapper::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline const capi::ICU4XGeneralCategoryNameToMaskMapper* ICU4XGeneralCategoryNameToMaskMapper::AsFFI() const { diff --git a/ffi/capi/bindings/cpp/ICU4XGraphemeClusterSegmenter.d.hpp b/ffi/capi/bindings/cpp/ICU4XGraphemeClusterSegmenter.d.hpp index c51c497f4ae..630cb61d44e 100644 --- a/ffi/capi/bindings/cpp/ICU4XGraphemeClusterSegmenter.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XGraphemeClusterSegmenter.d.hpp @@ -8,20 +8,20 @@ #include #include #include "diplomat_runtime.hpp" -#include "ICU4XError.d.hpp" +#include "ICU4XDataError.d.hpp" #include "ICU4XGraphemeClusterSegmenter.d.h" class ICU4XDataProvider; class ICU4XGraphemeClusterBreakIteratorLatin1; class ICU4XGraphemeClusterBreakIteratorUtf16; class ICU4XGraphemeClusterBreakIteratorUtf8; -class ICU4XError; +class ICU4XDataError; class ICU4XGraphemeClusterSegmenter { public: - inline static diplomat::result, ICU4XError> create(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> create(const ICU4XDataProvider& provider); inline std::unique_ptr segment_utf8(std::string_view input) const; diff --git a/ffi/capi/bindings/cpp/ICU4XGraphemeClusterSegmenter.h b/ffi/capi/bindings/cpp/ICU4XGraphemeClusterSegmenter.h index ec9f9777f98..cbdcc973e4b 100644 --- a/ffi/capi/bindings/cpp/ICU4XGraphemeClusterSegmenter.h +++ b/ffi/capi/bindings/cpp/ICU4XGraphemeClusterSegmenter.h @@ -14,7 +14,7 @@ #include "ICU4XGraphemeClusterBreakIteratorUtf16.h" #include "ICU4XGraphemeClusterBreakIteratorUtf8.d.h" #include "ICU4XGraphemeClusterBreakIteratorUtf8.h" -#include "diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XDataError.d.h" #include "ICU4XGraphemeClusterSegmenter.d.h" @@ -24,7 +24,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError ICU4XGraphemeClusterSegmenter_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XDataError ICU4XGraphemeClusterSegmenter_create(const ICU4XDataProvider* provider); ICU4XGraphemeClusterBreakIteratorUtf8* ICU4XGraphemeClusterSegmenter_segment_utf8(const ICU4XGraphemeClusterSegmenter* self, const char* input_data, size_t input_len); diff --git a/ffi/capi/bindings/cpp/ICU4XGraphemeClusterSegmenter.hpp b/ffi/capi/bindings/cpp/ICU4XGraphemeClusterSegmenter.hpp index 370ab0786a9..a3d339c794f 100644 --- a/ffi/capi/bindings/cpp/ICU4XGraphemeClusterSegmenter.hpp +++ b/ffi/capi/bindings/cpp/ICU4XGraphemeClusterSegmenter.hpp @@ -10,17 +10,17 @@ #include #include #include "diplomat_runtime.hpp" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" -#include "ICU4XError.hpp" #include "ICU4XGraphemeClusterBreakIteratorLatin1.hpp" #include "ICU4XGraphemeClusterBreakIteratorUtf16.hpp" #include "ICU4XGraphemeClusterBreakIteratorUtf8.hpp" #include "ICU4XGraphemeClusterSegmenter.h" -inline diplomat::result, ICU4XError> ICU4XGraphemeClusterSegmenter::create(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XGraphemeClusterSegmenter::create(const ICU4XDataProvider& provider) { auto result = capi::ICU4XGraphemeClusterSegmenter_create(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XGraphemeClusterSegmenter::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XGraphemeClusterSegmenter::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline std::unique_ptr ICU4XGraphemeClusterSegmenter::segment_utf8(std::string_view input) const { diff --git a/ffi/capi/bindings/cpp/ICU4XIsoDate.d.hpp b/ffi/capi/bindings/cpp/ICU4XIsoDate.d.hpp index 9e701060113..13180b7130e 100644 --- a/ffi/capi/bindings/cpp/ICU4XIsoDate.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XIsoDate.d.hpp @@ -8,7 +8,7 @@ #include #include #include "diplomat_runtime.hpp" -#include "ICU4XError.d.hpp" +#include "ICU4XCalendarError.d.hpp" #include "ICU4XIsoDate.d.h" #include "ICU4XIsoWeekday.d.hpp" #include "ICU4XWeekOf.d.hpp" @@ -17,14 +17,14 @@ class ICU4XCalendar; class ICU4XDate; class ICU4XWeekCalculator; struct ICU4XWeekOf; -class ICU4XError; +class ICU4XCalendarError; class ICU4XIsoWeekday; class ICU4XIsoDate { public: - inline static diplomat::result, ICU4XError> create(int32_t year, uint8_t month, uint8_t day); + inline static diplomat::result, ICU4XCalendarError> create(int32_t year, uint8_t month, uint8_t day); inline static std::unique_ptr create_for_unix_epoch(); diff --git a/ffi/capi/bindings/cpp/ICU4XIsoDate.h b/ffi/capi/bindings/cpp/ICU4XIsoDate.h index ed334930ab2..1af90675e15 100644 --- a/ffi/capi/bindings/cpp/ICU4XIsoDate.h +++ b/ffi/capi/bindings/cpp/ICU4XIsoDate.h @@ -16,7 +16,7 @@ #include "ICU4XWeekCalculator.h" #include "ICU4XWeekOf.d.h" #include "ICU4XWeekOf.h" -#include "diplomat_result_box_ICU4XIsoDate_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XIsoDate_ICU4XCalendarError.d.h" #include "ICU4XIsoDate.d.h" @@ -26,7 +26,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XIsoDate_ICU4XError ICU4XIsoDate_create(int32_t year, uint8_t month, uint8_t day); +diplomat_result_box_ICU4XIsoDate_ICU4XCalendarError ICU4XIsoDate_create(int32_t year, uint8_t month, uint8_t day); ICU4XIsoDate* ICU4XIsoDate_create_for_unix_epoch(); diff --git a/ffi/capi/bindings/cpp/ICU4XIsoDate.hpp b/ffi/capi/bindings/cpp/ICU4XIsoDate.hpp index 0af5f14553e..5a23af51b76 100644 --- a/ffi/capi/bindings/cpp/ICU4XIsoDate.hpp +++ b/ffi/capi/bindings/cpp/ICU4XIsoDate.hpp @@ -11,19 +11,19 @@ #include #include "diplomat_runtime.hpp" #include "ICU4XCalendar.hpp" +#include "ICU4XCalendarError.hpp" #include "ICU4XDate.hpp" -#include "ICU4XError.hpp" #include "ICU4XIsoDate.h" #include "ICU4XIsoWeekday.hpp" #include "ICU4XWeekCalculator.hpp" #include "ICU4XWeekOf.hpp" -inline diplomat::result, ICU4XError> ICU4XIsoDate::create(int32_t year, uint8_t month, uint8_t day) { +inline diplomat::result, ICU4XCalendarError> ICU4XIsoDate::create(int32_t year, uint8_t month, uint8_t day) { auto result = capi::ICU4XIsoDate_create(year, month, day); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XIsoDate::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XCalendarError>(diplomat::Ok>(std::unique_ptr(ICU4XIsoDate::FromFFI(result.ok)))) : diplomat::result, ICU4XCalendarError>(diplomat::Err(ICU4XCalendarError::FromFFI(result.err))); } inline std::unique_ptr ICU4XIsoDate::create_for_unix_epoch() { diff --git a/ffi/capi/bindings/cpp/ICU4XIsoDateTime.d.hpp b/ffi/capi/bindings/cpp/ICU4XIsoDateTime.d.hpp index 849583d4fef..5f867618f78 100644 --- a/ffi/capi/bindings/cpp/ICU4XIsoDateTime.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XIsoDateTime.d.hpp @@ -8,7 +8,7 @@ #include #include #include "diplomat_runtime.hpp" -#include "ICU4XError.d.hpp" +#include "ICU4XCalendarError.d.hpp" #include "ICU4XIsoDateTime.d.h" #include "ICU4XIsoWeekday.d.hpp" #include "ICU4XWeekOf.d.hpp" @@ -19,14 +19,14 @@ class ICU4XIsoDate; class ICU4XTime; class ICU4XWeekCalculator; struct ICU4XWeekOf; -class ICU4XError; +class ICU4XCalendarError; class ICU4XIsoWeekday; class ICU4XIsoDateTime { public: - inline static diplomat::result, ICU4XError> create(int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond); + inline static diplomat::result, ICU4XCalendarError> create(int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond); inline static std::unique_ptr crate_from_date_and_time(const ICU4XIsoDate& date, const ICU4XTime& time); diff --git a/ffi/capi/bindings/cpp/ICU4XIsoDateTime.h b/ffi/capi/bindings/cpp/ICU4XIsoDateTime.h index db0d0896083..60ebc97f5d8 100644 --- a/ffi/capi/bindings/cpp/ICU4XIsoDateTime.h +++ b/ffi/capi/bindings/cpp/ICU4XIsoDateTime.h @@ -20,7 +20,7 @@ #include "ICU4XWeekCalculator.h" #include "ICU4XWeekOf.d.h" #include "ICU4XWeekOf.h" -#include "diplomat_result_box_ICU4XIsoDateTime_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XIsoDateTime_ICU4XCalendarError.d.h" #include "ICU4XIsoDateTime.d.h" @@ -30,7 +30,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XIsoDateTime_ICU4XError ICU4XIsoDateTime_create(int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond); +diplomat_result_box_ICU4XIsoDateTime_ICU4XCalendarError ICU4XIsoDateTime_create(int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond); ICU4XIsoDateTime* ICU4XIsoDateTime_crate_from_date_and_time(const ICU4XIsoDate* date, const ICU4XTime* time); diff --git a/ffi/capi/bindings/cpp/ICU4XIsoDateTime.hpp b/ffi/capi/bindings/cpp/ICU4XIsoDateTime.hpp index 9693accc7c5..6fc24c2c3f8 100644 --- a/ffi/capi/bindings/cpp/ICU4XIsoDateTime.hpp +++ b/ffi/capi/bindings/cpp/ICU4XIsoDateTime.hpp @@ -11,8 +11,8 @@ #include #include "diplomat_runtime.hpp" #include "ICU4XCalendar.hpp" +#include "ICU4XCalendarError.hpp" #include "ICU4XDateTime.hpp" -#include "ICU4XError.hpp" #include "ICU4XIsoDate.hpp" #include "ICU4XIsoDateTime.h" #include "ICU4XIsoWeekday.hpp" @@ -21,7 +21,7 @@ #include "ICU4XWeekOf.hpp" -inline diplomat::result, ICU4XError> ICU4XIsoDateTime::create(int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond) { +inline diplomat::result, ICU4XCalendarError> ICU4XIsoDateTime::create(int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond) { auto result = capi::ICU4XIsoDateTime_create(year, month, day, @@ -29,7 +29,7 @@ inline diplomat::result, ICU4XError> ICU4XIsoD minute, second, nanosecond); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XIsoDateTime::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XCalendarError>(diplomat::Ok>(std::unique_ptr(ICU4XIsoDateTime::FromFFI(result.ok)))) : diplomat::result, ICU4XCalendarError>(diplomat::Err(ICU4XCalendarError::FromFFI(result.err))); } inline std::unique_ptr ICU4XIsoDateTime::crate_from_date_and_time(const ICU4XIsoDate& date, const ICU4XTime& time) { diff --git a/ffi/capi/bindings/cpp/ICU4XLineSegmenter.d.hpp b/ffi/capi/bindings/cpp/ICU4XLineSegmenter.d.hpp index fa9ecda09d7..6397bcc72e6 100644 --- a/ffi/capi/bindings/cpp/ICU4XLineSegmenter.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XLineSegmenter.d.hpp @@ -8,7 +8,7 @@ #include #include #include "diplomat_runtime.hpp" -#include "ICU4XError.d.hpp" +#include "ICU4XDataError.d.hpp" #include "ICU4XLineBreakOptionsV1.d.hpp" #include "ICU4XLineSegmenter.d.h" @@ -17,23 +17,23 @@ class ICU4XLineBreakIteratorLatin1; class ICU4XLineBreakIteratorUtf16; class ICU4XLineBreakIteratorUtf8; struct ICU4XLineBreakOptionsV1; -class ICU4XError; +class ICU4XDataError; class ICU4XLineSegmenter { public: - inline static diplomat::result, ICU4XError> create_auto(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> create_auto(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> create_lstm(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> create_lstm(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> create_dictionary(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> create_dictionary(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> create_auto_with_options_v1(const ICU4XDataProvider& provider, ICU4XLineBreakOptionsV1 options); + inline static diplomat::result, ICU4XDataError> create_auto_with_options_v1(const ICU4XDataProvider& provider, ICU4XLineBreakOptionsV1 options); - inline static diplomat::result, ICU4XError> create_lstm_with_options_v1(const ICU4XDataProvider& provider, ICU4XLineBreakOptionsV1 options); + inline static diplomat::result, ICU4XDataError> create_lstm_with_options_v1(const ICU4XDataProvider& provider, ICU4XLineBreakOptionsV1 options); - inline static diplomat::result, ICU4XError> create_dictionary_with_options_v1(const ICU4XDataProvider& provider, ICU4XLineBreakOptionsV1 options); + inline static diplomat::result, ICU4XDataError> create_dictionary_with_options_v1(const ICU4XDataProvider& provider, ICU4XLineBreakOptionsV1 options); inline std::unique_ptr segment_utf8(std::string_view input) const; diff --git a/ffi/capi/bindings/cpp/ICU4XLineSegmenter.h b/ffi/capi/bindings/cpp/ICU4XLineSegmenter.h index f9fbc6ec0c1..eb1bf074069 100644 --- a/ffi/capi/bindings/cpp/ICU4XLineSegmenter.h +++ b/ffi/capi/bindings/cpp/ICU4XLineSegmenter.h @@ -16,7 +16,7 @@ #include "ICU4XLineBreakIteratorUtf8.h" #include "ICU4XLineBreakOptionsV1.d.h" #include "ICU4XLineBreakOptionsV1.h" -#include "diplomat_result_box_ICU4XLineSegmenter_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError.d.h" #include "ICU4XLineSegmenter.d.h" @@ -26,17 +26,17 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XLineSegmenter_ICU4XError ICU4XLineSegmenter_create_auto(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError ICU4XLineSegmenter_create_auto(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XLineSegmenter_ICU4XError ICU4XLineSegmenter_create_lstm(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError ICU4XLineSegmenter_create_lstm(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XLineSegmenter_ICU4XError ICU4XLineSegmenter_create_dictionary(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError ICU4XLineSegmenter_create_dictionary(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XLineSegmenter_ICU4XError ICU4XLineSegmenter_create_auto_with_options_v1(const ICU4XDataProvider* provider, ICU4XLineBreakOptionsV1 options); +diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError ICU4XLineSegmenter_create_auto_with_options_v1(const ICU4XDataProvider* provider, ICU4XLineBreakOptionsV1 options); -diplomat_result_box_ICU4XLineSegmenter_ICU4XError ICU4XLineSegmenter_create_lstm_with_options_v1(const ICU4XDataProvider* provider, ICU4XLineBreakOptionsV1 options); +diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError ICU4XLineSegmenter_create_lstm_with_options_v1(const ICU4XDataProvider* provider, ICU4XLineBreakOptionsV1 options); -diplomat_result_box_ICU4XLineSegmenter_ICU4XError ICU4XLineSegmenter_create_dictionary_with_options_v1(const ICU4XDataProvider* provider, ICU4XLineBreakOptionsV1 options); +diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError ICU4XLineSegmenter_create_dictionary_with_options_v1(const ICU4XDataProvider* provider, ICU4XLineBreakOptionsV1 options); ICU4XLineBreakIteratorUtf8* ICU4XLineSegmenter_segment_utf8(const ICU4XLineSegmenter* self, const char* input_data, size_t input_len); diff --git a/ffi/capi/bindings/cpp/ICU4XLineSegmenter.hpp b/ffi/capi/bindings/cpp/ICU4XLineSegmenter.hpp index 9aaf0124a78..9187577b9c6 100644 --- a/ffi/capi/bindings/cpp/ICU4XLineSegmenter.hpp +++ b/ffi/capi/bindings/cpp/ICU4XLineSegmenter.hpp @@ -10,8 +10,8 @@ #include #include #include "diplomat_runtime.hpp" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" -#include "ICU4XError.hpp" #include "ICU4XLineBreakIteratorLatin1.hpp" #include "ICU4XLineBreakIteratorUtf16.hpp" #include "ICU4XLineBreakIteratorUtf8.hpp" @@ -19,37 +19,37 @@ #include "ICU4XLineSegmenter.h" -inline diplomat::result, ICU4XError> ICU4XLineSegmenter::create_auto(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XLineSegmenter::create_auto(const ICU4XDataProvider& provider) { auto result = capi::ICU4XLineSegmenter_create_auto(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XLineSegmenter::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XLineSegmenter::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XLineSegmenter::create_lstm(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XLineSegmenter::create_lstm(const ICU4XDataProvider& provider) { auto result = capi::ICU4XLineSegmenter_create_lstm(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XLineSegmenter::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XLineSegmenter::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XLineSegmenter::create_dictionary(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XLineSegmenter::create_dictionary(const ICU4XDataProvider& provider) { auto result = capi::ICU4XLineSegmenter_create_dictionary(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XLineSegmenter::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XLineSegmenter::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XLineSegmenter::create_auto_with_options_v1(const ICU4XDataProvider& provider, ICU4XLineBreakOptionsV1 options) { +inline diplomat::result, ICU4XDataError> ICU4XLineSegmenter::create_auto_with_options_v1(const ICU4XDataProvider& provider, ICU4XLineBreakOptionsV1 options) { auto result = capi::ICU4XLineSegmenter_create_auto_with_options_v1(provider.AsFFI(), options.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XLineSegmenter::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XLineSegmenter::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XLineSegmenter::create_lstm_with_options_v1(const ICU4XDataProvider& provider, ICU4XLineBreakOptionsV1 options) { +inline diplomat::result, ICU4XDataError> ICU4XLineSegmenter::create_lstm_with_options_v1(const ICU4XDataProvider& provider, ICU4XLineBreakOptionsV1 options) { auto result = capi::ICU4XLineSegmenter_create_lstm_with_options_v1(provider.AsFFI(), options.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XLineSegmenter::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XLineSegmenter::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XLineSegmenter::create_dictionary_with_options_v1(const ICU4XDataProvider& provider, ICU4XLineBreakOptionsV1 options) { +inline diplomat::result, ICU4XDataError> ICU4XLineSegmenter::create_dictionary_with_options_v1(const ICU4XDataProvider& provider, ICU4XLineBreakOptionsV1 options) { auto result = capi::ICU4XLineSegmenter_create_dictionary_with_options_v1(provider.AsFFI(), options.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XLineSegmenter::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XLineSegmenter::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline std::unique_ptr ICU4XLineSegmenter::segment_utf8(std::string_view input) const { diff --git a/ffi/capi/bindings/cpp/ICU4XListFormatter.d.hpp b/ffi/capi/bindings/cpp/ICU4XListFormatter.d.hpp index 7f1f55a1974..59c871d7cb8 100644 --- a/ffi/capi/bindings/cpp/ICU4XListFormatter.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XListFormatter.d.hpp @@ -8,24 +8,24 @@ #include #include #include "diplomat_runtime.hpp" -#include "ICU4XError.d.hpp" +#include "ICU4XDataError.d.hpp" #include "ICU4XListFormatter.d.h" #include "ICU4XListLength.d.hpp" class ICU4XDataProvider; class ICU4XLocale; -class ICU4XError; +class ICU4XDataError; class ICU4XListLength; class ICU4XListFormatter { public: - inline static diplomat::result, ICU4XError> create_and_with_length(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XListLength length); + inline static diplomat::result, ICU4XDataError> create_and_with_length(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XListLength length); - inline static diplomat::result, ICU4XError> create_or_with_length(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XListLength length); + inline static diplomat::result, ICU4XDataError> create_or_with_length(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XListLength length); - inline static diplomat::result, ICU4XError> create_unit_with_length(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XListLength length); + inline static diplomat::result, ICU4XDataError> create_unit_with_length(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XListLength length); inline std::string format_valid_utf8(diplomat::span list) const; diff --git a/ffi/capi/bindings/cpp/ICU4XListFormatter.h b/ffi/capi/bindings/cpp/ICU4XListFormatter.h index 33fe4116af1..4d35f3c8b7b 100644 --- a/ffi/capi/bindings/cpp/ICU4XListFormatter.h +++ b/ffi/capi/bindings/cpp/ICU4XListFormatter.h @@ -12,7 +12,7 @@ #include "ICU4XListLength.h" #include "ICU4XLocale.d.h" #include "ICU4XLocale.h" -#include "diplomat_result_box_ICU4XListFormatter_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XListFormatter_ICU4XDataError.d.h" #include "ICU4XListFormatter.d.h" @@ -22,11 +22,11 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XListFormatter_ICU4XError ICU4XListFormatter_create_and_with_length(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XListLength length); +diplomat_result_box_ICU4XListFormatter_ICU4XDataError ICU4XListFormatter_create_and_with_length(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XListLength length); -diplomat_result_box_ICU4XListFormatter_ICU4XError ICU4XListFormatter_create_or_with_length(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XListLength length); +diplomat_result_box_ICU4XListFormatter_ICU4XDataError ICU4XListFormatter_create_or_with_length(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XListLength length); -diplomat_result_box_ICU4XListFormatter_ICU4XError ICU4XListFormatter_create_unit_with_length(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XListLength length); +diplomat_result_box_ICU4XListFormatter_ICU4XDataError ICU4XListFormatter_create_unit_with_length(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XListLength length); void ICU4XListFormatter_format_valid_utf8(const ICU4XListFormatter* self, DiplomatStringsView* list_data, size_t list_len, DiplomatWrite* write); diff --git a/ffi/capi/bindings/cpp/ICU4XListFormatter.hpp b/ffi/capi/bindings/cpp/ICU4XListFormatter.hpp index ee931c08c2f..a532cf964b0 100644 --- a/ffi/capi/bindings/cpp/ICU4XListFormatter.hpp +++ b/ffi/capi/bindings/cpp/ICU4XListFormatter.hpp @@ -10,32 +10,32 @@ #include #include #include "diplomat_runtime.hpp" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" -#include "ICU4XError.hpp" #include "ICU4XListFormatter.h" #include "ICU4XListLength.hpp" #include "ICU4XLocale.hpp" -inline diplomat::result, ICU4XError> ICU4XListFormatter::create_and_with_length(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XListLength length) { +inline diplomat::result, ICU4XDataError> ICU4XListFormatter::create_and_with_length(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XListLength length) { auto result = capi::ICU4XListFormatter_create_and_with_length(provider.AsFFI(), locale.AsFFI(), length.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XListFormatter::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XListFormatter::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XListFormatter::create_or_with_length(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XListLength length) { +inline diplomat::result, ICU4XDataError> ICU4XListFormatter::create_or_with_length(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XListLength length) { auto result = capi::ICU4XListFormatter_create_or_with_length(provider.AsFFI(), locale.AsFFI(), length.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XListFormatter::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XListFormatter::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XListFormatter::create_unit_with_length(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XListLength length) { +inline diplomat::result, ICU4XDataError> ICU4XListFormatter::create_unit_with_length(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XListLength length) { auto result = capi::ICU4XListFormatter_create_unit_with_length(provider.AsFFI(), locale.AsFFI(), length.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XListFormatter::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XListFormatter::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline std::string ICU4XListFormatter::format_valid_utf8(diplomat::span list) const { diff --git a/ffi/capi/bindings/cpp/ICU4XLocale.d.hpp b/ffi/capi/bindings/cpp/ICU4XLocale.d.hpp index 8c1edeaee3e..5e8c2ab2b79 100644 --- a/ffi/capi/bindings/cpp/ICU4XLocale.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XLocale.d.hpp @@ -8,16 +8,16 @@ #include #include #include "diplomat_runtime.hpp" -#include "ICU4XError.d.hpp" #include "ICU4XLocale.d.h" +#include "ICU4XLocaleParseError.d.hpp" -class ICU4XError; +class ICU4XLocaleParseError; class ICU4XLocale { public: - inline static diplomat::result, ICU4XError> create_from_string(std::string_view name); + inline static diplomat::result, ICU4XLocaleParseError> create_from_string(std::string_view name); inline static std::unique_ptr create_und(); @@ -29,17 +29,17 @@ class ICU4XLocale { inline std::string language() const; - inline diplomat::result set_language(std::string_view bytes); + inline diplomat::result set_language(std::string_view bytes); inline std::optional region() const; - inline diplomat::result set_region(std::string_view bytes); + inline diplomat::result set_region(std::string_view bytes); inline std::optional script() const; - inline diplomat::result set_script(std::string_view bytes); + inline diplomat::result set_script(std::string_view bytes); - inline static diplomat::result canonicalize(std::string_view bytes); + inline static diplomat::result canonicalize(std::string_view bytes); inline std::string to_string() const; diff --git a/ffi/capi/bindings/cpp/ICU4XLocale.h b/ffi/capi/bindings/cpp/ICU4XLocale.h index b8a6dffccbc..ea99837cc6f 100644 --- a/ffi/capi/bindings/cpp/ICU4XLocale.h +++ b/ffi/capi/bindings/cpp/ICU4XLocale.h @@ -6,8 +6,8 @@ #include #include #include "diplomat_runtime.h" -#include "diplomat_result_box_ICU4XLocale_ICU4XError.d.h" -#include "diplomat_result_void_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XLocale_ICU4XLocaleParseError.d.h" +#include "diplomat_result_void_ICU4XLocaleParseError.d.h" #include "diplomat_result_void_void.d.h" #include "ICU4XLocale.d.h" @@ -18,7 +18,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XLocale_ICU4XError ICU4XLocale_create_from_string(const char* name_data, size_t name_len); +diplomat_result_box_ICU4XLocale_ICU4XLocaleParseError ICU4XLocale_create_from_string(const char* name_data, size_t name_len); ICU4XLocale* ICU4XLocale_create_und(); @@ -30,17 +30,17 @@ diplomat_result_void_void ICU4XLocale_get_unicode_extension(const ICU4XLocale* s void ICU4XLocale_language(const ICU4XLocale* self, DiplomatWrite* write); -diplomat_result_void_ICU4XError ICU4XLocale_set_language(ICU4XLocale* self, const char* bytes_data, size_t bytes_len); +diplomat_result_void_ICU4XLocaleParseError ICU4XLocale_set_language(ICU4XLocale* self, const char* bytes_data, size_t bytes_len); diplomat_result_void_void ICU4XLocale_region(const ICU4XLocale* self, DiplomatWrite* write); -diplomat_result_void_ICU4XError ICU4XLocale_set_region(ICU4XLocale* self, const char* bytes_data, size_t bytes_len); +diplomat_result_void_ICU4XLocaleParseError ICU4XLocale_set_region(ICU4XLocale* self, const char* bytes_data, size_t bytes_len); diplomat_result_void_void ICU4XLocale_script(const ICU4XLocale* self, DiplomatWrite* write); -diplomat_result_void_ICU4XError ICU4XLocale_set_script(ICU4XLocale* self, const char* bytes_data, size_t bytes_len); +diplomat_result_void_ICU4XLocaleParseError ICU4XLocale_set_script(ICU4XLocale* self, const char* bytes_data, size_t bytes_len); -diplomat_result_void_ICU4XError ICU4XLocale_canonicalize(const char* bytes_data, size_t bytes_len, DiplomatWrite* write); +diplomat_result_void_ICU4XLocaleParseError ICU4XLocale_canonicalize(const char* bytes_data, size_t bytes_len, DiplomatWrite* write); void ICU4XLocale_to_string(const ICU4XLocale* self, DiplomatWrite* write); diff --git a/ffi/capi/bindings/cpp/ICU4XLocale.hpp b/ffi/capi/bindings/cpp/ICU4XLocale.hpp index dff8760b7b6..f08b6453790 100644 --- a/ffi/capi/bindings/cpp/ICU4XLocale.hpp +++ b/ffi/capi/bindings/cpp/ICU4XLocale.hpp @@ -10,14 +10,14 @@ #include #include #include "diplomat_runtime.hpp" -#include "ICU4XError.hpp" #include "ICU4XLocale.h" +#include "ICU4XLocaleParseError.hpp" -inline diplomat::result, ICU4XError> ICU4XLocale::create_from_string(std::string_view name) { +inline diplomat::result, ICU4XLocaleParseError> ICU4XLocale::create_from_string(std::string_view name) { auto result = capi::ICU4XLocale_create_from_string(name.data(), name.size()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XLocale::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XLocaleParseError>(diplomat::Ok>(std::unique_ptr(ICU4XLocale::FromFFI(result.ok)))) : diplomat::result, ICU4XLocaleParseError>(diplomat::Err(ICU4XLocaleParseError::FromFFI(result.err))); } inline std::unique_ptr ICU4XLocale::create_und() { @@ -56,11 +56,11 @@ inline std::string ICU4XLocale::language() const { return output; } -inline diplomat::result ICU4XLocale::set_language(std::string_view bytes) { +inline diplomat::result ICU4XLocale::set_language(std::string_view bytes) { auto result = capi::ICU4XLocale_set_language(this->AsFFI(), bytes.data(), bytes.size()); - return result.is_ok ? diplomat::result(diplomat::Ok()) : diplomat::result(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result(diplomat::Ok()) : diplomat::result(diplomat::Err(ICU4XLocaleParseError::FromFFI(result.err))); } inline std::optional ICU4XLocale::region() const { @@ -71,11 +71,11 @@ inline std::optional ICU4XLocale::region() const { return result.is_ok ? std::optional(std::move(output)) : std::nullopt; } -inline diplomat::result ICU4XLocale::set_region(std::string_view bytes) { +inline diplomat::result ICU4XLocale::set_region(std::string_view bytes) { auto result = capi::ICU4XLocale_set_region(this->AsFFI(), bytes.data(), bytes.size()); - return result.is_ok ? diplomat::result(diplomat::Ok()) : diplomat::result(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result(diplomat::Ok()) : diplomat::result(diplomat::Err(ICU4XLocaleParseError::FromFFI(result.err))); } inline std::optional ICU4XLocale::script() const { @@ -86,20 +86,20 @@ inline std::optional ICU4XLocale::script() const { return result.is_ok ? std::optional(std::move(output)) : std::nullopt; } -inline diplomat::result ICU4XLocale::set_script(std::string_view bytes) { +inline diplomat::result ICU4XLocale::set_script(std::string_view bytes) { auto result = capi::ICU4XLocale_set_script(this->AsFFI(), bytes.data(), bytes.size()); - return result.is_ok ? diplomat::result(diplomat::Ok()) : diplomat::result(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result(diplomat::Ok()) : diplomat::result(diplomat::Err(ICU4XLocaleParseError::FromFFI(result.err))); } -inline diplomat::result ICU4XLocale::canonicalize(std::string_view bytes) { +inline diplomat::result ICU4XLocale::canonicalize(std::string_view bytes) { std::string output; capi::DiplomatWrite write = diplomat::WriteFromString(output); auto result = capi::ICU4XLocale_canonicalize(bytes.data(), bytes.size(), &write); - return result.is_ok ? diplomat::result(diplomat::Ok(std::move(output))) : diplomat::result(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result(diplomat::Ok(std::move(output))) : diplomat::result(diplomat::Err(ICU4XLocaleParseError::FromFFI(result.err))); } inline std::string ICU4XLocale::to_string() const { diff --git a/ffi/capi/bindings/cpp/ICU4XLocaleDirectionality.d.hpp b/ffi/capi/bindings/cpp/ICU4XLocaleDirectionality.d.hpp index 7a99440f597..8dc66bf940d 100644 --- a/ffi/capi/bindings/cpp/ICU4XLocaleDirectionality.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XLocaleDirectionality.d.hpp @@ -8,23 +8,23 @@ #include #include #include "diplomat_runtime.hpp" -#include "ICU4XError.d.hpp" +#include "ICU4XDataError.d.hpp" #include "ICU4XLocaleDirection.d.hpp" #include "ICU4XLocaleDirectionality.d.h" class ICU4XDataProvider; class ICU4XLocale; class ICU4XLocaleExpander; -class ICU4XError; +class ICU4XDataError; class ICU4XLocaleDirection; class ICU4XLocaleDirectionality { public: - inline static diplomat::result, ICU4XError> create(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> create(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> create_with_expander(const ICU4XDataProvider& provider, const ICU4XLocaleExpander& expander); + inline static diplomat::result, ICU4XDataError> create_with_expander(const ICU4XDataProvider& provider, const ICU4XLocaleExpander& expander); inline ICU4XLocaleDirection get(const ICU4XLocale& locale) const; diff --git a/ffi/capi/bindings/cpp/ICU4XLocaleDirectionality.h b/ffi/capi/bindings/cpp/ICU4XLocaleDirectionality.h index 3bcef417736..a3913ff944f 100644 --- a/ffi/capi/bindings/cpp/ICU4XLocaleDirectionality.h +++ b/ffi/capi/bindings/cpp/ICU4XLocaleDirectionality.h @@ -14,7 +14,7 @@ #include "ICU4XLocaleDirection.h" #include "ICU4XLocaleExpander.d.h" #include "ICU4XLocaleExpander.h" -#include "diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XLocaleDirectionality_ICU4XDataError.d.h" #include "ICU4XLocaleDirectionality.d.h" @@ -24,9 +24,9 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError ICU4XLocaleDirectionality_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XLocaleDirectionality_ICU4XDataError ICU4XLocaleDirectionality_create(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError ICU4XLocaleDirectionality_create_with_expander(const ICU4XDataProvider* provider, const ICU4XLocaleExpander* expander); +diplomat_result_box_ICU4XLocaleDirectionality_ICU4XDataError ICU4XLocaleDirectionality_create_with_expander(const ICU4XDataProvider* provider, const ICU4XLocaleExpander* expander); ICU4XLocaleDirection ICU4XLocaleDirectionality_get(const ICU4XLocaleDirectionality* self, const ICU4XLocale* locale); diff --git a/ffi/capi/bindings/cpp/ICU4XLocaleDirectionality.hpp b/ffi/capi/bindings/cpp/ICU4XLocaleDirectionality.hpp index 629d180b108..027a4243f6e 100644 --- a/ffi/capi/bindings/cpp/ICU4XLocaleDirectionality.hpp +++ b/ffi/capi/bindings/cpp/ICU4XLocaleDirectionality.hpp @@ -10,23 +10,23 @@ #include #include #include "diplomat_runtime.hpp" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" -#include "ICU4XError.hpp" #include "ICU4XLocale.hpp" #include "ICU4XLocaleDirection.hpp" #include "ICU4XLocaleDirectionality.h" #include "ICU4XLocaleExpander.hpp" -inline diplomat::result, ICU4XError> ICU4XLocaleDirectionality::create(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XLocaleDirectionality::create(const ICU4XDataProvider& provider) { auto result = capi::ICU4XLocaleDirectionality_create(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XLocaleDirectionality::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XLocaleDirectionality::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XLocaleDirectionality::create_with_expander(const ICU4XDataProvider& provider, const ICU4XLocaleExpander& expander) { +inline diplomat::result, ICU4XDataError> ICU4XLocaleDirectionality::create_with_expander(const ICU4XDataProvider& provider, const ICU4XLocaleExpander& expander) { auto result = capi::ICU4XLocaleDirectionality_create_with_expander(provider.AsFFI(), expander.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XLocaleDirectionality::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XLocaleDirectionality::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline ICU4XLocaleDirection ICU4XLocaleDirectionality::get(const ICU4XLocale& locale) const { diff --git a/ffi/capi/bindings/cpp/ICU4XLocaleDisplayNamesFormatter.d.hpp b/ffi/capi/bindings/cpp/ICU4XLocaleDisplayNamesFormatter.d.hpp index 194795af01c..8012ee7a9cc 100644 --- a/ffi/capi/bindings/cpp/ICU4XLocaleDisplayNamesFormatter.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XLocaleDisplayNamesFormatter.d.hpp @@ -8,20 +8,20 @@ #include #include #include "diplomat_runtime.hpp" +#include "ICU4XDataError.d.hpp" #include "ICU4XDisplayNamesOptionsV1.d.hpp" -#include "ICU4XError.d.hpp" #include "ICU4XLocaleDisplayNamesFormatter.d.h" class ICU4XDataProvider; class ICU4XLocale; struct ICU4XDisplayNamesOptionsV1; -class ICU4XError; +class ICU4XDataError; class ICU4XLocaleDisplayNamesFormatter { public: - inline static diplomat::result, ICU4XError> create(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDisplayNamesOptionsV1 options); + inline static diplomat::result, ICU4XDataError> create(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDisplayNamesOptionsV1 options); inline std::string of(const ICU4XLocale& locale) const; diff --git a/ffi/capi/bindings/cpp/ICU4XLocaleDisplayNamesFormatter.h b/ffi/capi/bindings/cpp/ICU4XLocaleDisplayNamesFormatter.h index 2fd980c1086..1b40dfb7573 100644 --- a/ffi/capi/bindings/cpp/ICU4XLocaleDisplayNamesFormatter.h +++ b/ffi/capi/bindings/cpp/ICU4XLocaleDisplayNamesFormatter.h @@ -12,7 +12,7 @@ #include "ICU4XDisplayNamesOptionsV1.h" #include "ICU4XLocale.d.h" #include "ICU4XLocale.h" -#include "diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XDataError.d.h" #include "ICU4XLocaleDisplayNamesFormatter.d.h" @@ -22,7 +22,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError ICU4XLocaleDisplayNamesFormatter_create(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDisplayNamesOptionsV1 options); +diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XDataError ICU4XLocaleDisplayNamesFormatter_create(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDisplayNamesOptionsV1 options); void ICU4XLocaleDisplayNamesFormatter_of(const ICU4XLocaleDisplayNamesFormatter* self, const ICU4XLocale* locale, DiplomatWrite* write); diff --git a/ffi/capi/bindings/cpp/ICU4XLocaleDisplayNamesFormatter.hpp b/ffi/capi/bindings/cpp/ICU4XLocaleDisplayNamesFormatter.hpp index c84f61d94e4..21b3cc4786c 100644 --- a/ffi/capi/bindings/cpp/ICU4XLocaleDisplayNamesFormatter.hpp +++ b/ffi/capi/bindings/cpp/ICU4XLocaleDisplayNamesFormatter.hpp @@ -10,18 +10,18 @@ #include #include #include "diplomat_runtime.hpp" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" #include "ICU4XDisplayNamesOptionsV1.hpp" -#include "ICU4XError.hpp" #include "ICU4XLocale.hpp" #include "ICU4XLocaleDisplayNamesFormatter.h" -inline diplomat::result, ICU4XError> ICU4XLocaleDisplayNamesFormatter::create(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDisplayNamesOptionsV1 options) { +inline diplomat::result, ICU4XDataError> ICU4XLocaleDisplayNamesFormatter::create(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDisplayNamesOptionsV1 options) { auto result = capi::ICU4XLocaleDisplayNamesFormatter_create(provider.AsFFI(), locale.AsFFI(), options.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XLocaleDisplayNamesFormatter::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XLocaleDisplayNamesFormatter::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline std::string ICU4XLocaleDisplayNamesFormatter::of(const ICU4XLocale& locale) const { diff --git a/ffi/capi/bindings/cpp/ICU4XLocaleFallbacker.d.hpp b/ffi/capi/bindings/cpp/ICU4XLocaleFallbacker.d.hpp index 7c97ee0d4a9..c52e558e152 100644 --- a/ffi/capi/bindings/cpp/ICU4XLocaleFallbacker.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XLocaleFallbacker.d.hpp @@ -8,24 +8,26 @@ #include #include #include "diplomat_runtime.hpp" -#include "ICU4XError.d.hpp" +#include "ICU4XDataError.d.hpp" #include "ICU4XLocaleFallbackConfig.d.hpp" #include "ICU4XLocaleFallbacker.d.h" +#include "ICU4XLocaleParseError.d.hpp" class ICU4XDataProvider; class ICU4XLocaleFallbackerWithConfig; struct ICU4XLocaleFallbackConfig; -class ICU4XError; +class ICU4XDataError; +class ICU4XLocaleParseError; class ICU4XLocaleFallbacker { public: - inline static diplomat::result, ICU4XError> create(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> create(const ICU4XDataProvider& provider); inline static std::unique_ptr create_without_data(); - inline diplomat::result, ICU4XError> for_config(ICU4XLocaleFallbackConfig config) const; + inline diplomat::result, ICU4XLocaleParseError> for_config(ICU4XLocaleFallbackConfig config) const; inline const capi::ICU4XLocaleFallbacker* AsFFI() const; inline capi::ICU4XLocaleFallbacker* AsFFI(); diff --git a/ffi/capi/bindings/cpp/ICU4XLocaleFallbacker.h b/ffi/capi/bindings/cpp/ICU4XLocaleFallbacker.h index 5c2c802efd7..13e0a895548 100644 --- a/ffi/capi/bindings/cpp/ICU4XLocaleFallbacker.h +++ b/ffi/capi/bindings/cpp/ICU4XLocaleFallbacker.h @@ -10,8 +10,8 @@ #include "ICU4XDataProvider.h" #include "ICU4XLocaleFallbackConfig.d.h" #include "ICU4XLocaleFallbackConfig.h" -#include "diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError.d.h" -#include "diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XLocaleParseError.d.h" +#include "diplomat_result_box_ICU4XLocaleFallbacker_ICU4XDataError.d.h" #include "ICU4XLocaleFallbacker.d.h" @@ -21,11 +21,11 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError ICU4XLocaleFallbacker_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XLocaleFallbacker_ICU4XDataError ICU4XLocaleFallbacker_create(const ICU4XDataProvider* provider); ICU4XLocaleFallbacker* ICU4XLocaleFallbacker_create_without_data(); -diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError ICU4XLocaleFallbacker_for_config(const ICU4XLocaleFallbacker* self, ICU4XLocaleFallbackConfig config); +diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XLocaleParseError ICU4XLocaleFallbacker_for_config(const ICU4XLocaleFallbacker* self, ICU4XLocaleFallbackConfig config); void ICU4XLocaleFallbacker_destroy(ICU4XLocaleFallbacker* self); diff --git a/ffi/capi/bindings/cpp/ICU4XLocaleFallbacker.hpp b/ffi/capi/bindings/cpp/ICU4XLocaleFallbacker.hpp index 027f763558a..0333a86acda 100644 --- a/ffi/capi/bindings/cpp/ICU4XLocaleFallbacker.hpp +++ b/ffi/capi/bindings/cpp/ICU4XLocaleFallbacker.hpp @@ -10,16 +10,17 @@ #include #include #include "diplomat_runtime.hpp" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" -#include "ICU4XError.hpp" #include "ICU4XLocaleFallbackConfig.hpp" #include "ICU4XLocaleFallbacker.h" #include "ICU4XLocaleFallbackerWithConfig.hpp" +#include "ICU4XLocaleParseError.hpp" -inline diplomat::result, ICU4XError> ICU4XLocaleFallbacker::create(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XLocaleFallbacker::create(const ICU4XDataProvider& provider) { auto result = capi::ICU4XLocaleFallbacker_create(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XLocaleFallbacker::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XLocaleFallbacker::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline std::unique_ptr ICU4XLocaleFallbacker::create_without_data() { @@ -27,10 +28,10 @@ inline std::unique_ptr ICU4XLocaleFallbacker::create_with return std::unique_ptr(ICU4XLocaleFallbacker::FromFFI(result)); } -inline diplomat::result, ICU4XError> ICU4XLocaleFallbacker::for_config(ICU4XLocaleFallbackConfig config) const { +inline diplomat::result, ICU4XLocaleParseError> ICU4XLocaleFallbacker::for_config(ICU4XLocaleFallbackConfig config) const { auto result = capi::ICU4XLocaleFallbacker_for_config(this->AsFFI(), config.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XLocaleFallbackerWithConfig::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XLocaleParseError>(diplomat::Ok>(std::unique_ptr(ICU4XLocaleFallbackerWithConfig::FromFFI(result.ok)))) : diplomat::result, ICU4XLocaleParseError>(diplomat::Err(ICU4XLocaleParseError::FromFFI(result.err))); } inline const capi::ICU4XLocaleFallbacker* ICU4XLocaleFallbacker::AsFFI() const { diff --git a/ffi/capi/bindings/cpp/ICU4XLocaleParseError.d.h b/ffi/capi/bindings/cpp/ICU4XLocaleParseError.d.h new file mode 100644 index 00000000000..900c9b95e69 --- /dev/null +++ b/ffi/capi/bindings/cpp/ICU4XLocaleParseError.d.h @@ -0,0 +1,29 @@ +#ifndef ICU4XLocaleParseError_D_H +#define ICU4XLocaleParseError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef enum ICU4XLocaleParseError { + ICU4XLocaleParseError_Unknown = 0, + ICU4XLocaleParseError_Language = 1, + ICU4XLocaleParseError_Subtag = 2, + ICU4XLocaleParseError_Extension = 3, +} ICU4XLocaleParseError; + + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // ICU4XLocaleParseError_D_H diff --git a/ffi/capi/bindings/cpp/ICU4XLocaleParseError.d.hpp b/ffi/capi/bindings/cpp/ICU4XLocaleParseError.d.hpp new file mode 100644 index 00000000000..e73d1854e19 --- /dev/null +++ b/ffi/capi/bindings/cpp/ICU4XLocaleParseError.d.hpp @@ -0,0 +1,37 @@ +#ifndef ICU4XLocaleParseError_D_HPP +#define ICU4XLocaleParseError_D_HPP + +#include +#include +#include +#include +#include +#include +#include "diplomat_runtime.hpp" +#include "ICU4XLocaleParseError.d.h" + + +class ICU4XLocaleParseError { +public: + enum Value { + Unknown = 0, + Language = 1, + Subtag = 2, + Extension = 3, + }; + + ICU4XLocaleParseError() = default; + // Implicit conversions between enum and ::Value + constexpr ICU4XLocaleParseError(Value v) : value(v) {} + constexpr operator Value() const { return value; } + // Prevent usage as boolean value + explicit operator bool() const = delete; + + inline capi::ICU4XLocaleParseError AsFFI() const; + inline static ICU4XLocaleParseError FromFFI(capi::ICU4XLocaleParseError c_enum); +private: + Value value; +}; + + +#endif // ICU4XLocaleParseError_D_HPP diff --git a/ffi/capi/bindings/cpp/ICU4XLocaleParseError.h b/ffi/capi/bindings/cpp/ICU4XLocaleParseError.h new file mode 100644 index 00000000000..6793f90a748 --- /dev/null +++ b/ffi/capi/bindings/cpp/ICU4XLocaleParseError.h @@ -0,0 +1,26 @@ +#ifndef ICU4XLocaleParseError_H +#define ICU4XLocaleParseError_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + +#include "ICU4XLocaleParseError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +// No Content + + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // ICU4XLocaleParseError_H diff --git a/ffi/capi/bindings/cpp/ICU4XLocaleParseError.hpp b/ffi/capi/bindings/cpp/ICU4XLocaleParseError.hpp new file mode 100644 index 00000000000..7b1901b6f31 --- /dev/null +++ b/ffi/capi/bindings/cpp/ICU4XLocaleParseError.hpp @@ -0,0 +1,31 @@ +#ifndef ICU4XLocaleParseError_HPP +#define ICU4XLocaleParseError_HPP + +#include "ICU4XLocaleParseError.d.hpp" + +#include +#include +#include +#include +#include +#include +#include "diplomat_runtime.hpp" +#include "ICU4XLocaleParseError.h" + + +inline capi::ICU4XLocaleParseError ICU4XLocaleParseError::AsFFI() const { + return static_cast(value); +} + +inline ICU4XLocaleParseError ICU4XLocaleParseError::FromFFI(capi::ICU4XLocaleParseError c_enum) { + switch (c_enum) { + case capi::ICU4XLocaleParseError_Unknown: + case capi::ICU4XLocaleParseError_Language: + case capi::ICU4XLocaleParseError_Subtag: + case capi::ICU4XLocaleParseError_Extension: + return static_cast(c_enum); + default: + abort(); + } +} +#endif // ICU4XLocaleParseError_HPP diff --git a/ffi/capi/bindings/cpp/ICU4XMetazoneCalculator.d.hpp b/ffi/capi/bindings/cpp/ICU4XMetazoneCalculator.d.hpp index 12932be7b0f..c81f670d992 100644 --- a/ffi/capi/bindings/cpp/ICU4XMetazoneCalculator.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XMetazoneCalculator.d.hpp @@ -8,17 +8,17 @@ #include #include #include "diplomat_runtime.hpp" -#include "ICU4XError.d.hpp" +#include "ICU4XDataError.d.hpp" #include "ICU4XMetazoneCalculator.d.h" class ICU4XDataProvider; -class ICU4XError; +class ICU4XDataError; class ICU4XMetazoneCalculator { public: - inline static diplomat::result, ICU4XError> create(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> create(const ICU4XDataProvider& provider); inline const capi::ICU4XMetazoneCalculator* AsFFI() const; inline capi::ICU4XMetazoneCalculator* AsFFI(); diff --git a/ffi/capi/bindings/cpp/ICU4XMetazoneCalculator.h b/ffi/capi/bindings/cpp/ICU4XMetazoneCalculator.h index 19833e844e8..fb0b1a241e0 100644 --- a/ffi/capi/bindings/cpp/ICU4XMetazoneCalculator.h +++ b/ffi/capi/bindings/cpp/ICU4XMetazoneCalculator.h @@ -8,7 +8,7 @@ #include "diplomat_runtime.h" #include "ICU4XDataProvider.d.h" #include "ICU4XDataProvider.h" -#include "diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XMetazoneCalculator_ICU4XDataError.d.h" #include "ICU4XMetazoneCalculator.d.h" @@ -18,7 +18,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError ICU4XMetazoneCalculator_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XMetazoneCalculator_ICU4XDataError ICU4XMetazoneCalculator_create(const ICU4XDataProvider* provider); void ICU4XMetazoneCalculator_destroy(ICU4XMetazoneCalculator* self); diff --git a/ffi/capi/bindings/cpp/ICU4XMetazoneCalculator.hpp b/ffi/capi/bindings/cpp/ICU4XMetazoneCalculator.hpp index 1b6a19bd5ae..36d09aac931 100644 --- a/ffi/capi/bindings/cpp/ICU4XMetazoneCalculator.hpp +++ b/ffi/capi/bindings/cpp/ICU4XMetazoneCalculator.hpp @@ -10,14 +10,14 @@ #include #include #include "diplomat_runtime.hpp" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" -#include "ICU4XError.hpp" #include "ICU4XMetazoneCalculator.h" -inline diplomat::result, ICU4XError> ICU4XMetazoneCalculator::create(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XMetazoneCalculator::create(const ICU4XDataProvider& provider) { auto result = capi::ICU4XMetazoneCalculator_create(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XMetazoneCalculator::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XMetazoneCalculator::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline const capi::ICU4XMetazoneCalculator* ICU4XMetazoneCalculator::AsFFI() const { diff --git a/ffi/capi/bindings/cpp/ICU4XPluralOperands.d.hpp b/ffi/capi/bindings/cpp/ICU4XPluralOperands.d.hpp index 793398a6570..8440fd09a23 100644 --- a/ffi/capi/bindings/cpp/ICU4XPluralOperands.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XPluralOperands.d.hpp @@ -8,17 +8,17 @@ #include #include #include "diplomat_runtime.hpp" -#include "ICU4XError.d.hpp" +#include "ICU4XFixedDecimalParseError.d.hpp" #include "ICU4XPluralOperands.d.h" class ICU4XFixedDecimal; -class ICU4XError; +class ICU4XFixedDecimalParseError; class ICU4XPluralOperands { public: - inline static diplomat::result, ICU4XError> create_from_string(std::string_view s); + inline static diplomat::result, ICU4XFixedDecimalParseError> create_from_string(std::string_view s); inline static std::unique_ptr create_from_fixed_decimal(const ICU4XFixedDecimal& x); diff --git a/ffi/capi/bindings/cpp/ICU4XPluralOperands.h b/ffi/capi/bindings/cpp/ICU4XPluralOperands.h index 7e10bf0d4eb..5cb4ddd736a 100644 --- a/ffi/capi/bindings/cpp/ICU4XPluralOperands.h +++ b/ffi/capi/bindings/cpp/ICU4XPluralOperands.h @@ -8,7 +8,7 @@ #include "diplomat_runtime.h" #include "ICU4XFixedDecimal.d.h" #include "ICU4XFixedDecimal.h" -#include "diplomat_result_box_ICU4XPluralOperands_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XPluralOperands_ICU4XFixedDecimalParseError.d.h" #include "ICU4XPluralOperands.d.h" @@ -18,7 +18,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XPluralOperands_ICU4XError ICU4XPluralOperands_create_from_string(const char* s_data, size_t s_len); +diplomat_result_box_ICU4XPluralOperands_ICU4XFixedDecimalParseError ICU4XPluralOperands_create_from_string(const char* s_data, size_t s_len); ICU4XPluralOperands* ICU4XPluralOperands_create_from_fixed_decimal(const ICU4XFixedDecimal* x); diff --git a/ffi/capi/bindings/cpp/ICU4XPluralOperands.hpp b/ffi/capi/bindings/cpp/ICU4XPluralOperands.hpp index 45196890f73..c18ff3efa2e 100644 --- a/ffi/capi/bindings/cpp/ICU4XPluralOperands.hpp +++ b/ffi/capi/bindings/cpp/ICU4XPluralOperands.hpp @@ -10,15 +10,15 @@ #include #include #include "diplomat_runtime.hpp" -#include "ICU4XError.hpp" #include "ICU4XFixedDecimal.hpp" +#include "ICU4XFixedDecimalParseError.hpp" #include "ICU4XPluralOperands.h" -inline diplomat::result, ICU4XError> ICU4XPluralOperands::create_from_string(std::string_view s) { +inline diplomat::result, ICU4XFixedDecimalParseError> ICU4XPluralOperands::create_from_string(std::string_view s) { auto result = capi::ICU4XPluralOperands_create_from_string(s.data(), s.size()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XPluralOperands::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XFixedDecimalParseError>(diplomat::Ok>(std::unique_ptr(ICU4XPluralOperands::FromFFI(result.ok)))) : diplomat::result, ICU4XFixedDecimalParseError>(diplomat::Err(ICU4XFixedDecimalParseError::FromFFI(result.err))); } inline std::unique_ptr ICU4XPluralOperands::create_from_fixed_decimal(const ICU4XFixedDecimal& x) { diff --git a/ffi/capi/bindings/cpp/ICU4XPluralRules.d.hpp b/ffi/capi/bindings/cpp/ICU4XPluralRules.d.hpp index 2a056dc6292..2451156749f 100644 --- a/ffi/capi/bindings/cpp/ICU4XPluralRules.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XPluralRules.d.hpp @@ -8,7 +8,7 @@ #include #include #include "diplomat_runtime.hpp" -#include "ICU4XError.d.hpp" +#include "ICU4XDataError.d.hpp" #include "ICU4XPluralCategories.d.hpp" #include "ICU4XPluralCategory.d.hpp" #include "ICU4XPluralRules.d.h" @@ -17,16 +17,16 @@ class ICU4XDataProvider; class ICU4XLocale; class ICU4XPluralOperands; struct ICU4XPluralCategories; -class ICU4XError; +class ICU4XDataError; class ICU4XPluralCategory; class ICU4XPluralRules { public: - inline static diplomat::result, ICU4XError> create_cardinal(const ICU4XDataProvider& provider, const ICU4XLocale& locale); + inline static diplomat::result, ICU4XDataError> create_cardinal(const ICU4XDataProvider& provider, const ICU4XLocale& locale); - inline static diplomat::result, ICU4XError> create_ordinal(const ICU4XDataProvider& provider, const ICU4XLocale& locale); + inline static diplomat::result, ICU4XDataError> create_ordinal(const ICU4XDataProvider& provider, const ICU4XLocale& locale); inline ICU4XPluralCategory category_for(const ICU4XPluralOperands& op) const; diff --git a/ffi/capi/bindings/cpp/ICU4XPluralRules.h b/ffi/capi/bindings/cpp/ICU4XPluralRules.h index 6856a3c1226..87a12f60cd7 100644 --- a/ffi/capi/bindings/cpp/ICU4XPluralRules.h +++ b/ffi/capi/bindings/cpp/ICU4XPluralRules.h @@ -16,7 +16,7 @@ #include "ICU4XPluralCategory.h" #include "ICU4XPluralOperands.d.h" #include "ICU4XPluralOperands.h" -#include "diplomat_result_box_ICU4XPluralRules_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XPluralRules_ICU4XDataError.d.h" #include "ICU4XPluralRules.d.h" @@ -26,9 +26,9 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XPluralRules_ICU4XError ICU4XPluralRules_create_cardinal(const ICU4XDataProvider* provider, const ICU4XLocale* locale); +diplomat_result_box_ICU4XPluralRules_ICU4XDataError ICU4XPluralRules_create_cardinal(const ICU4XDataProvider* provider, const ICU4XLocale* locale); -diplomat_result_box_ICU4XPluralRules_ICU4XError ICU4XPluralRules_create_ordinal(const ICU4XDataProvider* provider, const ICU4XLocale* locale); +diplomat_result_box_ICU4XPluralRules_ICU4XDataError ICU4XPluralRules_create_ordinal(const ICU4XDataProvider* provider, const ICU4XLocale* locale); ICU4XPluralCategory ICU4XPluralRules_category_for(const ICU4XPluralRules* self, const ICU4XPluralOperands* op); diff --git a/ffi/capi/bindings/cpp/ICU4XPluralRules.hpp b/ffi/capi/bindings/cpp/ICU4XPluralRules.hpp index 46e29d096e7..56f989b4c28 100644 --- a/ffi/capi/bindings/cpp/ICU4XPluralRules.hpp +++ b/ffi/capi/bindings/cpp/ICU4XPluralRules.hpp @@ -10,8 +10,8 @@ #include #include #include "diplomat_runtime.hpp" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" -#include "ICU4XError.hpp" #include "ICU4XLocale.hpp" #include "ICU4XPluralCategories.hpp" #include "ICU4XPluralCategory.hpp" @@ -19,16 +19,16 @@ #include "ICU4XPluralRules.h" -inline diplomat::result, ICU4XError> ICU4XPluralRules::create_cardinal(const ICU4XDataProvider& provider, const ICU4XLocale& locale) { +inline diplomat::result, ICU4XDataError> ICU4XPluralRules::create_cardinal(const ICU4XDataProvider& provider, const ICU4XLocale& locale) { auto result = capi::ICU4XPluralRules_create_cardinal(provider.AsFFI(), locale.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XPluralRules::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XPluralRules::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XPluralRules::create_ordinal(const ICU4XDataProvider& provider, const ICU4XLocale& locale) { +inline diplomat::result, ICU4XDataError> ICU4XPluralRules::create_ordinal(const ICU4XDataProvider& provider, const ICU4XLocale& locale) { auto result = capi::ICU4XPluralRules_create_ordinal(provider.AsFFI(), locale.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XPluralRules::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XPluralRules::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline ICU4XPluralCategory ICU4XPluralRules::category_for(const ICU4XPluralOperands& op) const { diff --git a/ffi/capi/bindings/cpp/ICU4XPropertyValueNameToEnumMapper.d.hpp b/ffi/capi/bindings/cpp/ICU4XPropertyValueNameToEnumMapper.d.hpp index 5fc0f06975e..eb8b3e2e21b 100644 --- a/ffi/capi/bindings/cpp/ICU4XPropertyValueNameToEnumMapper.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XPropertyValueNameToEnumMapper.d.hpp @@ -8,11 +8,11 @@ #include #include #include "diplomat_runtime.hpp" -#include "ICU4XError.d.hpp" +#include "ICU4XDataError.d.hpp" #include "ICU4XPropertyValueNameToEnumMapper.d.h" class ICU4XDataProvider; -class ICU4XError; +class ICU4XDataError; class ICU4XPropertyValueNameToEnumMapper { @@ -22,25 +22,25 @@ class ICU4XPropertyValueNameToEnumMapper { inline int16_t get_loose(std::string_view name) const; - inline static diplomat::result, ICU4XError> load_general_category(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_general_category(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_hangul_syllable_type(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_hangul_syllable_type(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_east_asian_width(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_east_asian_width(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_bidi_class(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_bidi_class(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_indic_syllabic_category(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_indic_syllabic_category(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_line_break(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_line_break(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_grapheme_cluster_break(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_grapheme_cluster_break(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_word_break(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_word_break(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_sentence_break(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_sentence_break(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_script(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_script(const ICU4XDataProvider& provider); inline const capi::ICU4XPropertyValueNameToEnumMapper* AsFFI() const; inline capi::ICU4XPropertyValueNameToEnumMapper* AsFFI(); diff --git a/ffi/capi/bindings/cpp/ICU4XPropertyValueNameToEnumMapper.h b/ffi/capi/bindings/cpp/ICU4XPropertyValueNameToEnumMapper.h index 954d4a5cd6e..3b166f2533d 100644 --- a/ffi/capi/bindings/cpp/ICU4XPropertyValueNameToEnumMapper.h +++ b/ffi/capi/bindings/cpp/ICU4XPropertyValueNameToEnumMapper.h @@ -8,7 +8,7 @@ #include "diplomat_runtime.h" #include "ICU4XDataProvider.d.h" #include "ICU4XDataProvider.h" -#include "diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError.d.h" #include "ICU4XPropertyValueNameToEnumMapper.d.h" @@ -22,25 +22,25 @@ int16_t ICU4XPropertyValueNameToEnumMapper_get_strict(const ICU4XPropertyValueNa int16_t ICU4XPropertyValueNameToEnumMapper_get_loose(const ICU4XPropertyValueNameToEnumMapper* self, const char* name_data, size_t name_len); -diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_general_category(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError ICU4XPropertyValueNameToEnumMapper_load_general_category(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_hangul_syllable_type(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError ICU4XPropertyValueNameToEnumMapper_load_hangul_syllable_type(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_east_asian_width(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError ICU4XPropertyValueNameToEnumMapper_load_east_asian_width(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_bidi_class(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError ICU4XPropertyValueNameToEnumMapper_load_bidi_class(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_indic_syllabic_category(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError ICU4XPropertyValueNameToEnumMapper_load_indic_syllabic_category(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_line_break(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError ICU4XPropertyValueNameToEnumMapper_load_line_break(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_grapheme_cluster_break(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError ICU4XPropertyValueNameToEnumMapper_load_grapheme_cluster_break(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_word_break(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError ICU4XPropertyValueNameToEnumMapper_load_word_break(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_sentence_break(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError ICU4XPropertyValueNameToEnumMapper_load_sentence_break(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_script(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError ICU4XPropertyValueNameToEnumMapper_load_script(const ICU4XDataProvider* provider); void ICU4XPropertyValueNameToEnumMapper_destroy(ICU4XPropertyValueNameToEnumMapper* self); diff --git a/ffi/capi/bindings/cpp/ICU4XPropertyValueNameToEnumMapper.hpp b/ffi/capi/bindings/cpp/ICU4XPropertyValueNameToEnumMapper.hpp index 40956e66da6..11827a25af4 100644 --- a/ffi/capi/bindings/cpp/ICU4XPropertyValueNameToEnumMapper.hpp +++ b/ffi/capi/bindings/cpp/ICU4XPropertyValueNameToEnumMapper.hpp @@ -10,8 +10,8 @@ #include #include #include "diplomat_runtime.hpp" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" -#include "ICU4XError.hpp" #include "ICU4XPropertyValueNameToEnumMapper.h" @@ -29,54 +29,54 @@ inline int16_t ICU4XPropertyValueNameToEnumMapper::get_loose(std::string_view na return result; } -inline diplomat::result, ICU4XError> ICU4XPropertyValueNameToEnumMapper::load_general_category(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XPropertyValueNameToEnumMapper::load_general_category(const ICU4XDataProvider& provider) { auto result = capi::ICU4XPropertyValueNameToEnumMapper_load_general_category(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XPropertyValueNameToEnumMapper::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XPropertyValueNameToEnumMapper::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XPropertyValueNameToEnumMapper::load_hangul_syllable_type(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XPropertyValueNameToEnumMapper::load_hangul_syllable_type(const ICU4XDataProvider& provider) { auto result = capi::ICU4XPropertyValueNameToEnumMapper_load_hangul_syllable_type(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XPropertyValueNameToEnumMapper::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XPropertyValueNameToEnumMapper::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XPropertyValueNameToEnumMapper::load_east_asian_width(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XPropertyValueNameToEnumMapper::load_east_asian_width(const ICU4XDataProvider& provider) { auto result = capi::ICU4XPropertyValueNameToEnumMapper_load_east_asian_width(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XPropertyValueNameToEnumMapper::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XPropertyValueNameToEnumMapper::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XPropertyValueNameToEnumMapper::load_bidi_class(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XPropertyValueNameToEnumMapper::load_bidi_class(const ICU4XDataProvider& provider) { auto result = capi::ICU4XPropertyValueNameToEnumMapper_load_bidi_class(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XPropertyValueNameToEnumMapper::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XPropertyValueNameToEnumMapper::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XPropertyValueNameToEnumMapper::load_indic_syllabic_category(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XPropertyValueNameToEnumMapper::load_indic_syllabic_category(const ICU4XDataProvider& provider) { auto result = capi::ICU4XPropertyValueNameToEnumMapper_load_indic_syllabic_category(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XPropertyValueNameToEnumMapper::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XPropertyValueNameToEnumMapper::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XPropertyValueNameToEnumMapper::load_line_break(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XPropertyValueNameToEnumMapper::load_line_break(const ICU4XDataProvider& provider) { auto result = capi::ICU4XPropertyValueNameToEnumMapper_load_line_break(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XPropertyValueNameToEnumMapper::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XPropertyValueNameToEnumMapper::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XPropertyValueNameToEnumMapper::load_grapheme_cluster_break(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XPropertyValueNameToEnumMapper::load_grapheme_cluster_break(const ICU4XDataProvider& provider) { auto result = capi::ICU4XPropertyValueNameToEnumMapper_load_grapheme_cluster_break(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XPropertyValueNameToEnumMapper::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XPropertyValueNameToEnumMapper::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XPropertyValueNameToEnumMapper::load_word_break(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XPropertyValueNameToEnumMapper::load_word_break(const ICU4XDataProvider& provider) { auto result = capi::ICU4XPropertyValueNameToEnumMapper_load_word_break(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XPropertyValueNameToEnumMapper::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XPropertyValueNameToEnumMapper::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XPropertyValueNameToEnumMapper::load_sentence_break(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XPropertyValueNameToEnumMapper::load_sentence_break(const ICU4XDataProvider& provider) { auto result = capi::ICU4XPropertyValueNameToEnumMapper_load_sentence_break(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XPropertyValueNameToEnumMapper::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XPropertyValueNameToEnumMapper::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XPropertyValueNameToEnumMapper::load_script(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XPropertyValueNameToEnumMapper::load_script(const ICU4XDataProvider& provider) { auto result = capi::ICU4XPropertyValueNameToEnumMapper_load_script(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XPropertyValueNameToEnumMapper::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XPropertyValueNameToEnumMapper::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline const capi::ICU4XPropertyValueNameToEnumMapper* ICU4XPropertyValueNameToEnumMapper::AsFFI() const { diff --git a/ffi/capi/bindings/cpp/ICU4XRegionDisplayNames.d.hpp b/ffi/capi/bindings/cpp/ICU4XRegionDisplayNames.d.hpp index 4bcb18ab40c..2e3de04f28a 100644 --- a/ffi/capi/bindings/cpp/ICU4XRegionDisplayNames.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XRegionDisplayNames.d.hpp @@ -8,20 +8,22 @@ #include #include #include "diplomat_runtime.hpp" -#include "ICU4XError.d.hpp" +#include "ICU4XDataError.d.hpp" +#include "ICU4XLocaleParseError.d.hpp" #include "ICU4XRegionDisplayNames.d.h" class ICU4XDataProvider; class ICU4XLocale; -class ICU4XError; +class ICU4XDataError; +class ICU4XLocaleParseError; class ICU4XRegionDisplayNames { public: - inline static diplomat::result, ICU4XError> create(const ICU4XDataProvider& provider, const ICU4XLocale& locale); + inline static diplomat::result, ICU4XDataError> create(const ICU4XDataProvider& provider, const ICU4XLocale& locale); - inline diplomat::result of(std::string_view region) const; + inline diplomat::result of(std::string_view region) const; inline const capi::ICU4XRegionDisplayNames* AsFFI() const; inline capi::ICU4XRegionDisplayNames* AsFFI(); diff --git a/ffi/capi/bindings/cpp/ICU4XRegionDisplayNames.h b/ffi/capi/bindings/cpp/ICU4XRegionDisplayNames.h index c38cc4e09c5..66841d80c12 100644 --- a/ffi/capi/bindings/cpp/ICU4XRegionDisplayNames.h +++ b/ffi/capi/bindings/cpp/ICU4XRegionDisplayNames.h @@ -10,8 +10,8 @@ #include "ICU4XDataProvider.h" #include "ICU4XLocale.d.h" #include "ICU4XLocale.h" -#include "diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError.d.h" -#include "diplomat_result_void_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XRegionDisplayNames_ICU4XDataError.d.h" +#include "diplomat_result_void_ICU4XLocaleParseError.d.h" #include "ICU4XRegionDisplayNames.d.h" @@ -21,9 +21,9 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError ICU4XRegionDisplayNames_create(const ICU4XDataProvider* provider, const ICU4XLocale* locale); +diplomat_result_box_ICU4XRegionDisplayNames_ICU4XDataError ICU4XRegionDisplayNames_create(const ICU4XDataProvider* provider, const ICU4XLocale* locale); -diplomat_result_void_ICU4XError ICU4XRegionDisplayNames_of(const ICU4XRegionDisplayNames* self, const char* region_data, size_t region_len, DiplomatWrite* write); +diplomat_result_void_ICU4XLocaleParseError ICU4XRegionDisplayNames_of(const ICU4XRegionDisplayNames* self, const char* region_data, size_t region_len, DiplomatWrite* write); void ICU4XRegionDisplayNames_destroy(ICU4XRegionDisplayNames* self); diff --git a/ffi/capi/bindings/cpp/ICU4XRegionDisplayNames.hpp b/ffi/capi/bindings/cpp/ICU4XRegionDisplayNames.hpp index 290b12a2729..9e8085b7d13 100644 --- a/ffi/capi/bindings/cpp/ICU4XRegionDisplayNames.hpp +++ b/ffi/capi/bindings/cpp/ICU4XRegionDisplayNames.hpp @@ -10,26 +10,27 @@ #include #include #include "diplomat_runtime.hpp" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" -#include "ICU4XError.hpp" #include "ICU4XLocale.hpp" +#include "ICU4XLocaleParseError.hpp" #include "ICU4XRegionDisplayNames.h" -inline diplomat::result, ICU4XError> ICU4XRegionDisplayNames::create(const ICU4XDataProvider& provider, const ICU4XLocale& locale) { +inline diplomat::result, ICU4XDataError> ICU4XRegionDisplayNames::create(const ICU4XDataProvider& provider, const ICU4XLocale& locale) { auto result = capi::ICU4XRegionDisplayNames_create(provider.AsFFI(), locale.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XRegionDisplayNames::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XRegionDisplayNames::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result ICU4XRegionDisplayNames::of(std::string_view region) const { +inline diplomat::result ICU4XRegionDisplayNames::of(std::string_view region) const { std::string output; capi::DiplomatWrite write = diplomat::WriteFromString(output); auto result = capi::ICU4XRegionDisplayNames_of(this->AsFFI(), region.data(), region.size(), &write); - return result.is_ok ? diplomat::result(diplomat::Ok(std::move(output))) : diplomat::result(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result(diplomat::Ok(std::move(output))) : diplomat::result(diplomat::Err(ICU4XLocaleParseError::FromFFI(result.err))); } inline const capi::ICU4XRegionDisplayNames* ICU4XRegionDisplayNames::AsFFI() const { diff --git a/ffi/capi/bindings/cpp/ICU4XScriptWithExtensions.d.hpp b/ffi/capi/bindings/cpp/ICU4XScriptWithExtensions.d.hpp index fb9b931f1de..373f6b0bdc5 100644 --- a/ffi/capi/bindings/cpp/ICU4XScriptWithExtensions.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XScriptWithExtensions.d.hpp @@ -8,19 +8,19 @@ #include #include #include "diplomat_runtime.hpp" -#include "ICU4XError.d.hpp" +#include "ICU4XDataError.d.hpp" #include "ICU4XScriptWithExtensions.d.h" class ICU4XCodePointRangeIterator; class ICU4XDataProvider; class ICU4XScriptWithExtensionsBorrowed; -class ICU4XError; +class ICU4XDataError; class ICU4XScriptWithExtensions { public: - inline static diplomat::result, ICU4XError> create(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> create(const ICU4XDataProvider& provider); inline uint16_t get_script_val(uint32_t code_point) const; diff --git a/ffi/capi/bindings/cpp/ICU4XScriptWithExtensions.h b/ffi/capi/bindings/cpp/ICU4XScriptWithExtensions.h index 452a8a27546..cac3d912674 100644 --- a/ffi/capi/bindings/cpp/ICU4XScriptWithExtensions.h +++ b/ffi/capi/bindings/cpp/ICU4XScriptWithExtensions.h @@ -12,7 +12,7 @@ #include "ICU4XDataProvider.h" #include "ICU4XScriptWithExtensionsBorrowed.d.h" #include "ICU4XScriptWithExtensionsBorrowed.h" -#include "diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XScriptWithExtensions_ICU4XDataError.d.h" #include "ICU4XScriptWithExtensions.d.h" @@ -22,7 +22,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError ICU4XScriptWithExtensions_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XScriptWithExtensions_ICU4XDataError ICU4XScriptWithExtensions_create(const ICU4XDataProvider* provider); uint16_t ICU4XScriptWithExtensions_get_script_val(const ICU4XScriptWithExtensions* self, uint32_t code_point); diff --git a/ffi/capi/bindings/cpp/ICU4XScriptWithExtensions.hpp b/ffi/capi/bindings/cpp/ICU4XScriptWithExtensions.hpp index 8576ff6ea4f..9043d78bbb0 100644 --- a/ffi/capi/bindings/cpp/ICU4XScriptWithExtensions.hpp +++ b/ffi/capi/bindings/cpp/ICU4XScriptWithExtensions.hpp @@ -11,15 +11,15 @@ #include #include "diplomat_runtime.hpp" #include "ICU4XCodePointRangeIterator.hpp" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" -#include "ICU4XError.hpp" #include "ICU4XScriptWithExtensions.h" #include "ICU4XScriptWithExtensionsBorrowed.hpp" -inline diplomat::result, ICU4XError> ICU4XScriptWithExtensions::create(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XScriptWithExtensions::create(const ICU4XDataProvider& provider) { auto result = capi::ICU4XScriptWithExtensions_create(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XScriptWithExtensions::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XScriptWithExtensions::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline uint16_t ICU4XScriptWithExtensions::get_script_val(uint32_t code_point) const { diff --git a/ffi/capi/bindings/cpp/ICU4XSentenceSegmenter.d.hpp b/ffi/capi/bindings/cpp/ICU4XSentenceSegmenter.d.hpp index 1b923152d35..dd80d447553 100644 --- a/ffi/capi/bindings/cpp/ICU4XSentenceSegmenter.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XSentenceSegmenter.d.hpp @@ -8,20 +8,20 @@ #include #include #include "diplomat_runtime.hpp" -#include "ICU4XError.d.hpp" +#include "ICU4XDataError.d.hpp" #include "ICU4XSentenceSegmenter.d.h" class ICU4XDataProvider; class ICU4XSentenceBreakIteratorLatin1; class ICU4XSentenceBreakIteratorUtf16; class ICU4XSentenceBreakIteratorUtf8; -class ICU4XError; +class ICU4XDataError; class ICU4XSentenceSegmenter { public: - inline static diplomat::result, ICU4XError> create(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> create(const ICU4XDataProvider& provider); inline std::unique_ptr segment_utf8(std::string_view input) const; diff --git a/ffi/capi/bindings/cpp/ICU4XSentenceSegmenter.h b/ffi/capi/bindings/cpp/ICU4XSentenceSegmenter.h index 3abf42b3cd4..35b6bd88e0c 100644 --- a/ffi/capi/bindings/cpp/ICU4XSentenceSegmenter.h +++ b/ffi/capi/bindings/cpp/ICU4XSentenceSegmenter.h @@ -14,7 +14,7 @@ #include "ICU4XSentenceBreakIteratorUtf16.h" #include "ICU4XSentenceBreakIteratorUtf8.d.h" #include "ICU4XSentenceBreakIteratorUtf8.h" -#include "diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XSentenceSegmenter_ICU4XDataError.d.h" #include "ICU4XSentenceSegmenter.d.h" @@ -24,7 +24,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError ICU4XSentenceSegmenter_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XSentenceSegmenter_ICU4XDataError ICU4XSentenceSegmenter_create(const ICU4XDataProvider* provider); ICU4XSentenceBreakIteratorUtf8* ICU4XSentenceSegmenter_segment_utf8(const ICU4XSentenceSegmenter* self, const char* input_data, size_t input_len); diff --git a/ffi/capi/bindings/cpp/ICU4XSentenceSegmenter.hpp b/ffi/capi/bindings/cpp/ICU4XSentenceSegmenter.hpp index 13a47b5a4b9..6d032a0c36e 100644 --- a/ffi/capi/bindings/cpp/ICU4XSentenceSegmenter.hpp +++ b/ffi/capi/bindings/cpp/ICU4XSentenceSegmenter.hpp @@ -10,17 +10,17 @@ #include #include #include "diplomat_runtime.hpp" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" -#include "ICU4XError.hpp" #include "ICU4XSentenceBreakIteratorLatin1.hpp" #include "ICU4XSentenceBreakIteratorUtf16.hpp" #include "ICU4XSentenceBreakIteratorUtf8.hpp" #include "ICU4XSentenceSegmenter.h" -inline diplomat::result, ICU4XError> ICU4XSentenceSegmenter::create(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XSentenceSegmenter::create(const ICU4XDataProvider& provider) { auto result = capi::ICU4XSentenceSegmenter_create(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XSentenceSegmenter::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XSentenceSegmenter::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline std::unique_ptr ICU4XSentenceSegmenter::segment_utf8(std::string_view input) const { diff --git a/ffi/capi/bindings/cpp/ICU4XTime.d.hpp b/ffi/capi/bindings/cpp/ICU4XTime.d.hpp index a30b28e2ab8..3ee60938c55 100644 --- a/ffi/capi/bindings/cpp/ICU4XTime.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XTime.d.hpp @@ -8,18 +8,18 @@ #include #include #include "diplomat_runtime.hpp" -#include "ICU4XError.d.hpp" +#include "ICU4XCalendarError.d.hpp" #include "ICU4XTime.d.h" -class ICU4XError; +class ICU4XCalendarError; class ICU4XTime { public: - inline static diplomat::result, ICU4XError> create(uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond); + inline static diplomat::result, ICU4XCalendarError> create(uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond); - inline static diplomat::result, ICU4XError> create_midnight(); + inline static diplomat::result, ICU4XCalendarError> create_midnight(); inline uint8_t hour() const; diff --git a/ffi/capi/bindings/cpp/ICU4XTime.h b/ffi/capi/bindings/cpp/ICU4XTime.h index 295f4f180b8..0d96669a9e2 100644 --- a/ffi/capi/bindings/cpp/ICU4XTime.h +++ b/ffi/capi/bindings/cpp/ICU4XTime.h @@ -6,7 +6,7 @@ #include #include #include "diplomat_runtime.h" -#include "diplomat_result_box_ICU4XTime_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XTime_ICU4XCalendarError.d.h" #include "ICU4XTime.d.h" @@ -16,9 +16,9 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XTime_ICU4XError ICU4XTime_create(uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond); +diplomat_result_box_ICU4XTime_ICU4XCalendarError ICU4XTime_create(uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond); -diplomat_result_box_ICU4XTime_ICU4XError ICU4XTime_create_midnight(); +diplomat_result_box_ICU4XTime_ICU4XCalendarError ICU4XTime_create_midnight(); uint8_t ICU4XTime_hour(const ICU4XTime* self); diff --git a/ffi/capi/bindings/cpp/ICU4XTime.hpp b/ffi/capi/bindings/cpp/ICU4XTime.hpp index c307e38f39f..180db2dbc83 100644 --- a/ffi/capi/bindings/cpp/ICU4XTime.hpp +++ b/ffi/capi/bindings/cpp/ICU4XTime.hpp @@ -10,21 +10,21 @@ #include #include #include "diplomat_runtime.hpp" -#include "ICU4XError.hpp" +#include "ICU4XCalendarError.hpp" #include "ICU4XTime.h" -inline diplomat::result, ICU4XError> ICU4XTime::create(uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond) { +inline diplomat::result, ICU4XCalendarError> ICU4XTime::create(uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond) { auto result = capi::ICU4XTime_create(hour, minute, second, nanosecond); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XTime::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XCalendarError>(diplomat::Ok>(std::unique_ptr(ICU4XTime::FromFFI(result.ok)))) : diplomat::result, ICU4XCalendarError>(diplomat::Err(ICU4XCalendarError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XTime::create_midnight() { +inline diplomat::result, ICU4XCalendarError> ICU4XTime::create_midnight() { auto result = capi::ICU4XTime_create_midnight(); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XTime::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XCalendarError>(diplomat::Ok>(std::unique_ptr(ICU4XTime::FromFFI(result.ok)))) : diplomat::result, ICU4XCalendarError>(diplomat::Err(ICU4XCalendarError::FromFFI(result.err))); } inline uint8_t ICU4XTime::hour() const { diff --git a/ffi/capi/bindings/cpp/ICU4XTimeZoneIdMapper.d.hpp b/ffi/capi/bindings/cpp/ICU4XTimeZoneIdMapper.d.hpp index 438234d6688..74f04dbcc6c 100644 --- a/ffi/capi/bindings/cpp/ICU4XTimeZoneIdMapper.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XTimeZoneIdMapper.d.hpp @@ -8,25 +8,27 @@ #include #include #include "diplomat_runtime.hpp" -#include "ICU4XError.d.hpp" +#include "ICU4XDataError.d.hpp" #include "ICU4XTimeZoneIdMapper.d.h" +#include "ICU4XTimeZoneInvalidIdError.d.hpp" class ICU4XDataProvider; -class ICU4XError; +class ICU4XDataError; +class ICU4XTimeZoneInvalidIdError; class ICU4XTimeZoneIdMapper { public: - inline static diplomat::result, ICU4XError> create(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> create(const ICU4XDataProvider& provider); - inline diplomat::result iana_to_bcp47(std::string_view value) const; + inline diplomat::result iana_to_bcp47(std::string_view value) const; - inline diplomat::result, diplomat::Utf8Error> normalize_iana(std::string_view value) const; + inline diplomat::result, diplomat::Utf8Error> normalize_iana(std::string_view value) const; - inline diplomat::result, diplomat::Utf8Error> canonicalize_iana(std::string_view value) const; + inline diplomat::result, diplomat::Utf8Error> canonicalize_iana(std::string_view value) const; - inline diplomat::result find_canonical_iana_from_bcp47(std::string_view value) const; + inline diplomat::result find_canonical_iana_from_bcp47(std::string_view value) const; inline const capi::ICU4XTimeZoneIdMapper* AsFFI() const; inline capi::ICU4XTimeZoneIdMapper* AsFFI(); diff --git a/ffi/capi/bindings/cpp/ICU4XTimeZoneIdMapper.h b/ffi/capi/bindings/cpp/ICU4XTimeZoneIdMapper.h index e475f121eb7..42480e1c8c1 100644 --- a/ffi/capi/bindings/cpp/ICU4XTimeZoneIdMapper.h +++ b/ffi/capi/bindings/cpp/ICU4XTimeZoneIdMapper.h @@ -8,8 +8,8 @@ #include "diplomat_runtime.h" #include "ICU4XDataProvider.d.h" #include "ICU4XDataProvider.h" -#include "diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XError.d.h" -#include "diplomat_result_void_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XDataError.d.h" +#include "diplomat_result_void_ICU4XTimeZoneInvalidIdError.d.h" #include "ICU4XTimeZoneIdMapper.d.h" @@ -19,15 +19,15 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XError ICU4XTimeZoneIdMapper_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XDataError ICU4XTimeZoneIdMapper_create(const ICU4XDataProvider* provider); -diplomat_result_void_ICU4XError ICU4XTimeZoneIdMapper_iana_to_bcp47(const ICU4XTimeZoneIdMapper* self, const char* value_data, size_t value_len, DiplomatWrite* write); +diplomat_result_void_ICU4XTimeZoneInvalidIdError ICU4XTimeZoneIdMapper_iana_to_bcp47(const ICU4XTimeZoneIdMapper* self, const char* value_data, size_t value_len, DiplomatWrite* write); -diplomat_result_void_ICU4XError ICU4XTimeZoneIdMapper_normalize_iana(const ICU4XTimeZoneIdMapper* self, const char* value_data, size_t value_len, DiplomatWrite* write); +diplomat_result_void_ICU4XTimeZoneInvalidIdError ICU4XTimeZoneIdMapper_normalize_iana(const ICU4XTimeZoneIdMapper* self, const char* value_data, size_t value_len, DiplomatWrite* write); -diplomat_result_void_ICU4XError ICU4XTimeZoneIdMapper_canonicalize_iana(const ICU4XTimeZoneIdMapper* self, const char* value_data, size_t value_len, DiplomatWrite* write); +diplomat_result_void_ICU4XTimeZoneInvalidIdError ICU4XTimeZoneIdMapper_canonicalize_iana(const ICU4XTimeZoneIdMapper* self, const char* value_data, size_t value_len, DiplomatWrite* write); -diplomat_result_void_ICU4XError ICU4XTimeZoneIdMapper_find_canonical_iana_from_bcp47(const ICU4XTimeZoneIdMapper* self, const char* value_data, size_t value_len, DiplomatWrite* write); +diplomat_result_void_ICU4XTimeZoneInvalidIdError ICU4XTimeZoneIdMapper_find_canonical_iana_from_bcp47(const ICU4XTimeZoneIdMapper* self, const char* value_data, size_t value_len, DiplomatWrite* write); void ICU4XTimeZoneIdMapper_destroy(ICU4XTimeZoneIdMapper* self); diff --git a/ffi/capi/bindings/cpp/ICU4XTimeZoneIdMapper.hpp b/ffi/capi/bindings/cpp/ICU4XTimeZoneIdMapper.hpp index 0118135ae75..8d5a2cbeddf 100644 --- a/ffi/capi/bindings/cpp/ICU4XTimeZoneIdMapper.hpp +++ b/ffi/capi/bindings/cpp/ICU4XTimeZoneIdMapper.hpp @@ -10,27 +10,28 @@ #include #include #include "diplomat_runtime.hpp" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" -#include "ICU4XError.hpp" #include "ICU4XTimeZoneIdMapper.h" +#include "ICU4XTimeZoneInvalidIdError.hpp" -inline diplomat::result, ICU4XError> ICU4XTimeZoneIdMapper::create(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XTimeZoneIdMapper::create(const ICU4XDataProvider& provider) { auto result = capi::ICU4XTimeZoneIdMapper_create(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XTimeZoneIdMapper::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XTimeZoneIdMapper::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result ICU4XTimeZoneIdMapper::iana_to_bcp47(std::string_view value) const { +inline diplomat::result ICU4XTimeZoneIdMapper::iana_to_bcp47(std::string_view value) const { std::string output; capi::DiplomatWrite write = diplomat::WriteFromString(output); auto result = capi::ICU4XTimeZoneIdMapper_iana_to_bcp47(this->AsFFI(), value.data(), value.size(), &write); - return result.is_ok ? diplomat::result(diplomat::Ok(std::move(output))) : diplomat::result(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result(diplomat::Ok(std::move(output))) : diplomat::result(diplomat::Err(ICU4XTimeZoneInvalidIdError::FromFFI(result.err))); } -inline diplomat::result, diplomat::Utf8Error> ICU4XTimeZoneIdMapper::normalize_iana(std::string_view value) const { +inline diplomat::result, diplomat::Utf8Error> ICU4XTimeZoneIdMapper::normalize_iana(std::string_view value) const { if (!capi::diplomat_is_str(value.data(), value.size())) { return diplomat::Err(diplomat::Utf8Error()); } @@ -40,10 +41,10 @@ inline diplomat::result, diplomat::Utf value.data(), value.size(), &write); - return diplomat::Ok>(std::move(result.is_ok ? diplomat::result(diplomat::Ok(std::move(output))) : diplomat::result(diplomat::Err(ICU4XError::FromFFI(result.err))))); + return diplomat::Ok>(std::move(result.is_ok ? diplomat::result(diplomat::Ok(std::move(output))) : diplomat::result(diplomat::Err(ICU4XTimeZoneInvalidIdError::FromFFI(result.err))))); } -inline diplomat::result, diplomat::Utf8Error> ICU4XTimeZoneIdMapper::canonicalize_iana(std::string_view value) const { +inline diplomat::result, diplomat::Utf8Error> ICU4XTimeZoneIdMapper::canonicalize_iana(std::string_view value) const { if (!capi::diplomat_is_str(value.data(), value.size())) { return diplomat::Err(diplomat::Utf8Error()); } @@ -53,17 +54,17 @@ inline diplomat::result, diplomat::Utf value.data(), value.size(), &write); - return diplomat::Ok>(std::move(result.is_ok ? diplomat::result(diplomat::Ok(std::move(output))) : diplomat::result(diplomat::Err(ICU4XError::FromFFI(result.err))))); + return diplomat::Ok>(std::move(result.is_ok ? diplomat::result(diplomat::Ok(std::move(output))) : diplomat::result(diplomat::Err(ICU4XTimeZoneInvalidIdError::FromFFI(result.err))))); } -inline diplomat::result ICU4XTimeZoneIdMapper::find_canonical_iana_from_bcp47(std::string_view value) const { +inline diplomat::result ICU4XTimeZoneIdMapper::find_canonical_iana_from_bcp47(std::string_view value) const { std::string output; capi::DiplomatWrite write = diplomat::WriteFromString(output); auto result = capi::ICU4XTimeZoneIdMapper_find_canonical_iana_from_bcp47(this->AsFFI(), value.data(), value.size(), &write); - return result.is_ok ? diplomat::result(diplomat::Ok(std::move(output))) : diplomat::result(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result(diplomat::Ok(std::move(output))) : diplomat::result(diplomat::Err(ICU4XTimeZoneInvalidIdError::FromFFI(result.err))); } inline const capi::ICU4XTimeZoneIdMapper* ICU4XTimeZoneIdMapper::AsFFI() const { diff --git a/ffi/capi/bindings/cpp/ICU4XTimeZoneIdMapperWithFastCanonicalization.d.hpp b/ffi/capi/bindings/cpp/ICU4XTimeZoneIdMapperWithFastCanonicalization.d.hpp index acaa1f4da54..0c3662b8f38 100644 --- a/ffi/capi/bindings/cpp/ICU4XTimeZoneIdMapperWithFastCanonicalization.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XTimeZoneIdMapperWithFastCanonicalization.d.hpp @@ -8,21 +8,23 @@ #include #include #include "diplomat_runtime.hpp" -#include "ICU4XError.d.hpp" +#include "ICU4XDataError.d.hpp" #include "ICU4XTimeZoneIdMapperWithFastCanonicalization.d.h" +#include "ICU4XTimeZoneInvalidIdError.d.hpp" class ICU4XDataProvider; -class ICU4XError; +class ICU4XDataError; +class ICU4XTimeZoneInvalidIdError; class ICU4XTimeZoneIdMapperWithFastCanonicalization { public: - inline static diplomat::result, ICU4XError> create(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> create(const ICU4XDataProvider& provider); - inline diplomat::result, diplomat::Utf8Error> canonicalize_iana(std::string_view value) const; + inline diplomat::result, diplomat::Utf8Error> canonicalize_iana(std::string_view value) const; - inline diplomat::result canonical_iana_from_bcp47(std::string_view value) const; + inline diplomat::result canonical_iana_from_bcp47(std::string_view value) const; inline const capi::ICU4XTimeZoneIdMapperWithFastCanonicalization* AsFFI() const; inline capi::ICU4XTimeZoneIdMapperWithFastCanonicalization* AsFFI(); diff --git a/ffi/capi/bindings/cpp/ICU4XTimeZoneIdMapperWithFastCanonicalization.h b/ffi/capi/bindings/cpp/ICU4XTimeZoneIdMapperWithFastCanonicalization.h index 31f89e0fcdf..64bbc080adb 100644 --- a/ffi/capi/bindings/cpp/ICU4XTimeZoneIdMapperWithFastCanonicalization.h +++ b/ffi/capi/bindings/cpp/ICU4XTimeZoneIdMapperWithFastCanonicalization.h @@ -8,8 +8,8 @@ #include "diplomat_runtime.h" #include "ICU4XDataProvider.d.h" #include "ICU4XDataProvider.h" -#include "diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XError.d.h" -#include "diplomat_result_void_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XDataError.d.h" +#include "diplomat_result_void_ICU4XTimeZoneInvalidIdError.d.h" #include "ICU4XTimeZoneIdMapperWithFastCanonicalization.d.h" @@ -19,11 +19,11 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XError ICU4XTimeZoneIdMapperWithFastCanonicalization_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XDataError ICU4XTimeZoneIdMapperWithFastCanonicalization_create(const ICU4XDataProvider* provider); -diplomat_result_void_ICU4XError ICU4XTimeZoneIdMapperWithFastCanonicalization_canonicalize_iana(const ICU4XTimeZoneIdMapperWithFastCanonicalization* self, const char* value_data, size_t value_len, DiplomatWrite* write); +diplomat_result_void_ICU4XTimeZoneInvalidIdError ICU4XTimeZoneIdMapperWithFastCanonicalization_canonicalize_iana(const ICU4XTimeZoneIdMapperWithFastCanonicalization* self, const char* value_data, size_t value_len, DiplomatWrite* write); -diplomat_result_void_ICU4XError ICU4XTimeZoneIdMapperWithFastCanonicalization_canonical_iana_from_bcp47(const ICU4XTimeZoneIdMapperWithFastCanonicalization* self, const char* value_data, size_t value_len, DiplomatWrite* write); +diplomat_result_void_ICU4XTimeZoneInvalidIdError ICU4XTimeZoneIdMapperWithFastCanonicalization_canonical_iana_from_bcp47(const ICU4XTimeZoneIdMapperWithFastCanonicalization* self, const char* value_data, size_t value_len, DiplomatWrite* write); void ICU4XTimeZoneIdMapperWithFastCanonicalization_destroy(ICU4XTimeZoneIdMapperWithFastCanonicalization* self); diff --git a/ffi/capi/bindings/cpp/ICU4XTimeZoneIdMapperWithFastCanonicalization.hpp b/ffi/capi/bindings/cpp/ICU4XTimeZoneIdMapperWithFastCanonicalization.hpp index 58450801845..4bfcbddd4f8 100644 --- a/ffi/capi/bindings/cpp/ICU4XTimeZoneIdMapperWithFastCanonicalization.hpp +++ b/ffi/capi/bindings/cpp/ICU4XTimeZoneIdMapperWithFastCanonicalization.hpp @@ -10,17 +10,18 @@ #include #include #include "diplomat_runtime.hpp" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" -#include "ICU4XError.hpp" #include "ICU4XTimeZoneIdMapperWithFastCanonicalization.h" +#include "ICU4XTimeZoneInvalidIdError.hpp" -inline diplomat::result, ICU4XError> ICU4XTimeZoneIdMapperWithFastCanonicalization::create(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XTimeZoneIdMapperWithFastCanonicalization::create(const ICU4XDataProvider& provider) { auto result = capi::ICU4XTimeZoneIdMapperWithFastCanonicalization_create(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XTimeZoneIdMapperWithFastCanonicalization::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XTimeZoneIdMapperWithFastCanonicalization::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, diplomat::Utf8Error> ICU4XTimeZoneIdMapperWithFastCanonicalization::canonicalize_iana(std::string_view value) const { +inline diplomat::result, diplomat::Utf8Error> ICU4XTimeZoneIdMapperWithFastCanonicalization::canonicalize_iana(std::string_view value) const { if (!capi::diplomat_is_str(value.data(), value.size())) { return diplomat::Err(diplomat::Utf8Error()); } @@ -30,17 +31,17 @@ inline diplomat::result, diplomat::Utf value.data(), value.size(), &write); - return diplomat::Ok>(std::move(result.is_ok ? diplomat::result(diplomat::Ok(std::move(output))) : diplomat::result(diplomat::Err(ICU4XError::FromFFI(result.err))))); + return diplomat::Ok>(std::move(result.is_ok ? diplomat::result(diplomat::Ok(std::move(output))) : diplomat::result(diplomat::Err(ICU4XTimeZoneInvalidIdError::FromFFI(result.err))))); } -inline diplomat::result ICU4XTimeZoneIdMapperWithFastCanonicalization::canonical_iana_from_bcp47(std::string_view value) const { +inline diplomat::result ICU4XTimeZoneIdMapperWithFastCanonicalization::canonical_iana_from_bcp47(std::string_view value) const { std::string output; capi::DiplomatWrite write = diplomat::WriteFromString(output); auto result = capi::ICU4XTimeZoneIdMapperWithFastCanonicalization_canonical_iana_from_bcp47(this->AsFFI(), value.data(), value.size(), &write); - return result.is_ok ? diplomat::result(diplomat::Ok(std::move(output))) : diplomat::result(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result(diplomat::Ok(std::move(output))) : diplomat::result(diplomat::Err(ICU4XTimeZoneInvalidIdError::FromFFI(result.err))); } inline const capi::ICU4XTimeZoneIdMapperWithFastCanonicalization* ICU4XTimeZoneIdMapperWithFastCanonicalization::AsFFI() const { diff --git a/ffi/capi/bindings/cpp/ICU4XTimeZoneInvalidIdError.d.h b/ffi/capi/bindings/cpp/ICU4XTimeZoneInvalidIdError.d.h new file mode 100644 index 00000000000..8aa37d86fb5 --- /dev/null +++ b/ffi/capi/bindings/cpp/ICU4XTimeZoneInvalidIdError.d.h @@ -0,0 +1,26 @@ +#ifndef ICU4XTimeZoneInvalidIdError_D_H +#define ICU4XTimeZoneInvalidIdError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef enum ICU4XTimeZoneInvalidIdError { + ICU4XTimeZoneInvalidIdError_TodoZst = 0, +} ICU4XTimeZoneInvalidIdError; + + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // ICU4XTimeZoneInvalidIdError_D_H diff --git a/ffi/capi/bindings/cpp/ICU4XTimeZoneInvalidIdError.d.hpp b/ffi/capi/bindings/cpp/ICU4XTimeZoneInvalidIdError.d.hpp new file mode 100644 index 00000000000..f9f1eaa2353 --- /dev/null +++ b/ffi/capi/bindings/cpp/ICU4XTimeZoneInvalidIdError.d.hpp @@ -0,0 +1,34 @@ +#ifndef ICU4XTimeZoneInvalidIdError_D_HPP +#define ICU4XTimeZoneInvalidIdError_D_HPP + +#include +#include +#include +#include +#include +#include +#include "diplomat_runtime.hpp" +#include "ICU4XTimeZoneInvalidIdError.d.h" + + +class ICU4XTimeZoneInvalidIdError { +public: + enum Value { + TodoZst = 0, + }; + + ICU4XTimeZoneInvalidIdError() = default; + // Implicit conversions between enum and ::Value + constexpr ICU4XTimeZoneInvalidIdError(Value v) : value(v) {} + constexpr operator Value() const { return value; } + // Prevent usage as boolean value + explicit operator bool() const = delete; + + inline capi::ICU4XTimeZoneInvalidIdError AsFFI() const; + inline static ICU4XTimeZoneInvalidIdError FromFFI(capi::ICU4XTimeZoneInvalidIdError c_enum); +private: + Value value; +}; + + +#endif // ICU4XTimeZoneInvalidIdError_D_HPP diff --git a/ffi/capi/bindings/cpp/ICU4XTimeZoneInvalidIdError.h b/ffi/capi/bindings/cpp/ICU4XTimeZoneInvalidIdError.h new file mode 100644 index 00000000000..a6b98fb5e8d --- /dev/null +++ b/ffi/capi/bindings/cpp/ICU4XTimeZoneInvalidIdError.h @@ -0,0 +1,26 @@ +#ifndef ICU4XTimeZoneInvalidIdError_H +#define ICU4XTimeZoneInvalidIdError_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + +#include "ICU4XTimeZoneInvalidIdError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +// No Content + + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // ICU4XTimeZoneInvalidIdError_H diff --git a/ffi/capi/bindings/cpp/ICU4XTimeZoneInvalidIdError.hpp b/ffi/capi/bindings/cpp/ICU4XTimeZoneInvalidIdError.hpp new file mode 100644 index 00000000000..5e0aa6101a2 --- /dev/null +++ b/ffi/capi/bindings/cpp/ICU4XTimeZoneInvalidIdError.hpp @@ -0,0 +1,28 @@ +#ifndef ICU4XTimeZoneInvalidIdError_HPP +#define ICU4XTimeZoneInvalidIdError_HPP + +#include "ICU4XTimeZoneInvalidIdError.d.hpp" + +#include +#include +#include +#include +#include +#include +#include "diplomat_runtime.hpp" +#include "ICU4XTimeZoneInvalidIdError.h" + + +inline capi::ICU4XTimeZoneInvalidIdError ICU4XTimeZoneInvalidIdError::AsFFI() const { + return static_cast(value); +} + +inline ICU4XTimeZoneInvalidIdError ICU4XTimeZoneInvalidIdError::FromFFI(capi::ICU4XTimeZoneInvalidIdError c_enum) { + switch (c_enum) { + case capi::ICU4XTimeZoneInvalidIdError_TodoZst: + return static_cast(c_enum); + default: + abort(); + } +} +#endif // ICU4XTimeZoneInvalidIdError_HPP diff --git a/ffi/capi/bindings/cpp/ICU4XTimeZoneInvalidOffsetError.d.h b/ffi/capi/bindings/cpp/ICU4XTimeZoneInvalidOffsetError.d.h new file mode 100644 index 00000000000..20c5a72271a --- /dev/null +++ b/ffi/capi/bindings/cpp/ICU4XTimeZoneInvalidOffsetError.d.h @@ -0,0 +1,26 @@ +#ifndef ICU4XTimeZoneInvalidOffsetError_D_H +#define ICU4XTimeZoneInvalidOffsetError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef enum ICU4XTimeZoneInvalidOffsetError { + ICU4XTimeZoneInvalidOffsetError_TodoZst = 0, +} ICU4XTimeZoneInvalidOffsetError; + + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // ICU4XTimeZoneInvalidOffsetError_D_H diff --git a/ffi/capi/bindings/cpp/ICU4XTimeZoneInvalidOffsetError.d.hpp b/ffi/capi/bindings/cpp/ICU4XTimeZoneInvalidOffsetError.d.hpp new file mode 100644 index 00000000000..04a45af5815 --- /dev/null +++ b/ffi/capi/bindings/cpp/ICU4XTimeZoneInvalidOffsetError.d.hpp @@ -0,0 +1,34 @@ +#ifndef ICU4XTimeZoneInvalidOffsetError_D_HPP +#define ICU4XTimeZoneInvalidOffsetError_D_HPP + +#include +#include +#include +#include +#include +#include +#include "diplomat_runtime.hpp" +#include "ICU4XTimeZoneInvalidOffsetError.d.h" + + +class ICU4XTimeZoneInvalidOffsetError { +public: + enum Value { + TodoZst = 0, + }; + + ICU4XTimeZoneInvalidOffsetError() = default; + // Implicit conversions between enum and ::Value + constexpr ICU4XTimeZoneInvalidOffsetError(Value v) : value(v) {} + constexpr operator Value() const { return value; } + // Prevent usage as boolean value + explicit operator bool() const = delete; + + inline capi::ICU4XTimeZoneInvalidOffsetError AsFFI() const; + inline static ICU4XTimeZoneInvalidOffsetError FromFFI(capi::ICU4XTimeZoneInvalidOffsetError c_enum); +private: + Value value; +}; + + +#endif // ICU4XTimeZoneInvalidOffsetError_D_HPP diff --git a/ffi/capi/bindings/cpp/ICU4XTimeZoneInvalidOffsetError.h b/ffi/capi/bindings/cpp/ICU4XTimeZoneInvalidOffsetError.h new file mode 100644 index 00000000000..1438bc0e8d6 --- /dev/null +++ b/ffi/capi/bindings/cpp/ICU4XTimeZoneInvalidOffsetError.h @@ -0,0 +1,26 @@ +#ifndef ICU4XTimeZoneInvalidOffsetError_H +#define ICU4XTimeZoneInvalidOffsetError_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + +#include "ICU4XTimeZoneInvalidOffsetError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +// No Content + + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // ICU4XTimeZoneInvalidOffsetError_H diff --git a/ffi/capi/bindings/cpp/ICU4XTimeZoneInvalidOffsetError.hpp b/ffi/capi/bindings/cpp/ICU4XTimeZoneInvalidOffsetError.hpp new file mode 100644 index 00000000000..afc409f85cb --- /dev/null +++ b/ffi/capi/bindings/cpp/ICU4XTimeZoneInvalidOffsetError.hpp @@ -0,0 +1,28 @@ +#ifndef ICU4XTimeZoneInvalidOffsetError_HPP +#define ICU4XTimeZoneInvalidOffsetError_HPP + +#include "ICU4XTimeZoneInvalidOffsetError.d.hpp" + +#include +#include +#include +#include +#include +#include +#include "diplomat_runtime.hpp" +#include "ICU4XTimeZoneInvalidOffsetError.h" + + +inline capi::ICU4XTimeZoneInvalidOffsetError ICU4XTimeZoneInvalidOffsetError::AsFFI() const { + return static_cast(value); +} + +inline ICU4XTimeZoneInvalidOffsetError ICU4XTimeZoneInvalidOffsetError::FromFFI(capi::ICU4XTimeZoneInvalidOffsetError c_enum) { + switch (c_enum) { + case capi::ICU4XTimeZoneInvalidOffsetError_TodoZst: + return static_cast(c_enum); + default: + abort(); + } +} +#endif // ICU4XTimeZoneInvalidOffsetError_HPP diff --git a/ffi/capi/bindings/cpp/ICU4XTitlecaseMapper.d.hpp b/ffi/capi/bindings/cpp/ICU4XTitlecaseMapper.d.hpp index e8066e56d48..a1eadf4e14b 100644 --- a/ffi/capi/bindings/cpp/ICU4XTitlecaseMapper.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XTitlecaseMapper.d.hpp @@ -8,20 +8,20 @@ #include #include #include "diplomat_runtime.hpp" -#include "ICU4XError.d.hpp" +#include "ICU4XDataError.d.hpp" #include "ICU4XTitlecaseMapper.d.h" #include "ICU4XTitlecaseOptionsV1.d.hpp" class ICU4XDataProvider; class ICU4XLocale; struct ICU4XTitlecaseOptionsV1; -class ICU4XError; +class ICU4XDataError; class ICU4XTitlecaseMapper { public: - inline static diplomat::result, ICU4XError> create(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> create(const ICU4XDataProvider& provider); inline diplomat::result titlecase_segment_v1(std::string_view s, const ICU4XLocale& locale, ICU4XTitlecaseOptionsV1 options) const; diff --git a/ffi/capi/bindings/cpp/ICU4XTitlecaseMapper.h b/ffi/capi/bindings/cpp/ICU4XTitlecaseMapper.h index 2879b633515..95619468a0f 100644 --- a/ffi/capi/bindings/cpp/ICU4XTitlecaseMapper.h +++ b/ffi/capi/bindings/cpp/ICU4XTitlecaseMapper.h @@ -12,7 +12,7 @@ #include "ICU4XLocale.h" #include "ICU4XTitlecaseOptionsV1.d.h" #include "ICU4XTitlecaseOptionsV1.h" -#include "diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XTitlecaseMapper_ICU4XDataError.d.h" #include "ICU4XTitlecaseMapper.d.h" @@ -22,7 +22,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError ICU4XTitlecaseMapper_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XTitlecaseMapper_ICU4XDataError ICU4XTitlecaseMapper_create(const ICU4XDataProvider* provider); void ICU4XTitlecaseMapper_titlecase_segment_v1(const ICU4XTitlecaseMapper* self, const char* s_data, size_t s_len, const ICU4XLocale* locale, ICU4XTitlecaseOptionsV1 options, DiplomatWrite* write); diff --git a/ffi/capi/bindings/cpp/ICU4XTitlecaseMapper.hpp b/ffi/capi/bindings/cpp/ICU4XTitlecaseMapper.hpp index fad6191f83f..b11cbddaad3 100644 --- a/ffi/capi/bindings/cpp/ICU4XTitlecaseMapper.hpp +++ b/ffi/capi/bindings/cpp/ICU4XTitlecaseMapper.hpp @@ -10,16 +10,16 @@ #include #include #include "diplomat_runtime.hpp" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" -#include "ICU4XError.hpp" #include "ICU4XLocale.hpp" #include "ICU4XTitlecaseMapper.h" #include "ICU4XTitlecaseOptionsV1.hpp" -inline diplomat::result, ICU4XError> ICU4XTitlecaseMapper::create(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XTitlecaseMapper::create(const ICU4XDataProvider& provider) { auto result = capi::ICU4XTitlecaseMapper_create(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XTitlecaseMapper::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XTitlecaseMapper::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline diplomat::result ICU4XTitlecaseMapper::titlecase_segment_v1(std::string_view s, const ICU4XLocale& locale, ICU4XTitlecaseOptionsV1 options) const { diff --git a/ffi/capi/bindings/cpp/ICU4XUnicodeSetData.d.hpp b/ffi/capi/bindings/cpp/ICU4XUnicodeSetData.d.hpp index 307121df96e..e9fc2a77681 100644 --- a/ffi/capi/bindings/cpp/ICU4XUnicodeSetData.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XUnicodeSetData.d.hpp @@ -8,12 +8,12 @@ #include #include #include "diplomat_runtime.hpp" -#include "ICU4XError.d.hpp" +#include "ICU4XDataError.d.hpp" #include "ICU4XUnicodeSetData.d.h" class ICU4XDataProvider; class ICU4XLocale; -class ICU4XError; +class ICU4XDataError; class ICU4XUnicodeSetData { @@ -25,17 +25,17 @@ class ICU4XUnicodeSetData { inline bool contains32(uint32_t cp) const; - inline static diplomat::result, ICU4XError> load_basic_emoji(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> load_basic_emoji(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> load_exemplars_main(const ICU4XDataProvider& provider, const ICU4XLocale& locale); + inline static diplomat::result, ICU4XDataError> load_exemplars_main(const ICU4XDataProvider& provider, const ICU4XLocale& locale); - inline static diplomat::result, ICU4XError> load_exemplars_auxiliary(const ICU4XDataProvider& provider, const ICU4XLocale& locale); + inline static diplomat::result, ICU4XDataError> load_exemplars_auxiliary(const ICU4XDataProvider& provider, const ICU4XLocale& locale); - inline static diplomat::result, ICU4XError> load_exemplars_punctuation(const ICU4XDataProvider& provider, const ICU4XLocale& locale); + inline static diplomat::result, ICU4XDataError> load_exemplars_punctuation(const ICU4XDataProvider& provider, const ICU4XLocale& locale); - inline static diplomat::result, ICU4XError> load_exemplars_numbers(const ICU4XDataProvider& provider, const ICU4XLocale& locale); + inline static diplomat::result, ICU4XDataError> load_exemplars_numbers(const ICU4XDataProvider& provider, const ICU4XLocale& locale); - inline static diplomat::result, ICU4XError> load_exemplars_index(const ICU4XDataProvider& provider, const ICU4XLocale& locale); + inline static diplomat::result, ICU4XDataError> load_exemplars_index(const ICU4XDataProvider& provider, const ICU4XLocale& locale); inline const capi::ICU4XUnicodeSetData* AsFFI() const; inline capi::ICU4XUnicodeSetData* AsFFI(); diff --git a/ffi/capi/bindings/cpp/ICU4XUnicodeSetData.h b/ffi/capi/bindings/cpp/ICU4XUnicodeSetData.h index c4803de518f..d279e35600b 100644 --- a/ffi/capi/bindings/cpp/ICU4XUnicodeSetData.h +++ b/ffi/capi/bindings/cpp/ICU4XUnicodeSetData.h @@ -10,7 +10,7 @@ #include "ICU4XDataProvider.h" #include "ICU4XLocale.d.h" #include "ICU4XLocale.h" -#include "diplomat_result_box_ICU4XUnicodeSetData_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XUnicodeSetData_ICU4XDataError.d.h" #include "ICU4XUnicodeSetData.d.h" @@ -26,17 +26,17 @@ bool ICU4XUnicodeSetData_contains_char(const ICU4XUnicodeSetData* self, char32_t bool ICU4XUnicodeSetData_contains32(const ICU4XUnicodeSetData* self, uint32_t cp); -diplomat_result_box_ICU4XUnicodeSetData_ICU4XError ICU4XUnicodeSetData_load_basic_emoji(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XUnicodeSetData_ICU4XDataError ICU4XUnicodeSetData_load_basic_emoji(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XUnicodeSetData_ICU4XError ICU4XUnicodeSetData_load_exemplars_main(const ICU4XDataProvider* provider, const ICU4XLocale* locale); +diplomat_result_box_ICU4XUnicodeSetData_ICU4XDataError ICU4XUnicodeSetData_load_exemplars_main(const ICU4XDataProvider* provider, const ICU4XLocale* locale); -diplomat_result_box_ICU4XUnicodeSetData_ICU4XError ICU4XUnicodeSetData_load_exemplars_auxiliary(const ICU4XDataProvider* provider, const ICU4XLocale* locale); +diplomat_result_box_ICU4XUnicodeSetData_ICU4XDataError ICU4XUnicodeSetData_load_exemplars_auxiliary(const ICU4XDataProvider* provider, const ICU4XLocale* locale); -diplomat_result_box_ICU4XUnicodeSetData_ICU4XError ICU4XUnicodeSetData_load_exemplars_punctuation(const ICU4XDataProvider* provider, const ICU4XLocale* locale); +diplomat_result_box_ICU4XUnicodeSetData_ICU4XDataError ICU4XUnicodeSetData_load_exemplars_punctuation(const ICU4XDataProvider* provider, const ICU4XLocale* locale); -diplomat_result_box_ICU4XUnicodeSetData_ICU4XError ICU4XUnicodeSetData_load_exemplars_numbers(const ICU4XDataProvider* provider, const ICU4XLocale* locale); +diplomat_result_box_ICU4XUnicodeSetData_ICU4XDataError ICU4XUnicodeSetData_load_exemplars_numbers(const ICU4XDataProvider* provider, const ICU4XLocale* locale); -diplomat_result_box_ICU4XUnicodeSetData_ICU4XError ICU4XUnicodeSetData_load_exemplars_index(const ICU4XDataProvider* provider, const ICU4XLocale* locale); +diplomat_result_box_ICU4XUnicodeSetData_ICU4XDataError ICU4XUnicodeSetData_load_exemplars_index(const ICU4XDataProvider* provider, const ICU4XLocale* locale); void ICU4XUnicodeSetData_destroy(ICU4XUnicodeSetData* self); diff --git a/ffi/capi/bindings/cpp/ICU4XUnicodeSetData.hpp b/ffi/capi/bindings/cpp/ICU4XUnicodeSetData.hpp index 0cdf7c3f563..ad78f803369 100644 --- a/ffi/capi/bindings/cpp/ICU4XUnicodeSetData.hpp +++ b/ffi/capi/bindings/cpp/ICU4XUnicodeSetData.hpp @@ -10,8 +10,8 @@ #include #include #include "diplomat_runtime.hpp" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" -#include "ICU4XError.hpp" #include "ICU4XLocale.hpp" #include "ICU4XUnicodeSetData.h" @@ -35,39 +35,39 @@ inline bool ICU4XUnicodeSetData::contains32(uint32_t cp) const { return result; } -inline diplomat::result, ICU4XError> ICU4XUnicodeSetData::load_basic_emoji(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XUnicodeSetData::load_basic_emoji(const ICU4XDataProvider& provider) { auto result = capi::ICU4XUnicodeSetData_load_basic_emoji(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XUnicodeSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XUnicodeSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XUnicodeSetData::load_exemplars_main(const ICU4XDataProvider& provider, const ICU4XLocale& locale) { +inline diplomat::result, ICU4XDataError> ICU4XUnicodeSetData::load_exemplars_main(const ICU4XDataProvider& provider, const ICU4XLocale& locale) { auto result = capi::ICU4XUnicodeSetData_load_exemplars_main(provider.AsFFI(), locale.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XUnicodeSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XUnicodeSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XUnicodeSetData::load_exemplars_auxiliary(const ICU4XDataProvider& provider, const ICU4XLocale& locale) { +inline diplomat::result, ICU4XDataError> ICU4XUnicodeSetData::load_exemplars_auxiliary(const ICU4XDataProvider& provider, const ICU4XLocale& locale) { auto result = capi::ICU4XUnicodeSetData_load_exemplars_auxiliary(provider.AsFFI(), locale.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XUnicodeSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XUnicodeSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XUnicodeSetData::load_exemplars_punctuation(const ICU4XDataProvider& provider, const ICU4XLocale& locale) { +inline diplomat::result, ICU4XDataError> ICU4XUnicodeSetData::load_exemplars_punctuation(const ICU4XDataProvider& provider, const ICU4XLocale& locale) { auto result = capi::ICU4XUnicodeSetData_load_exemplars_punctuation(provider.AsFFI(), locale.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XUnicodeSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XUnicodeSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XUnicodeSetData::load_exemplars_numbers(const ICU4XDataProvider& provider, const ICU4XLocale& locale) { +inline diplomat::result, ICU4XDataError> ICU4XUnicodeSetData::load_exemplars_numbers(const ICU4XDataProvider& provider, const ICU4XLocale& locale) { auto result = capi::ICU4XUnicodeSetData_load_exemplars_numbers(provider.AsFFI(), locale.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XUnicodeSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XUnicodeSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XUnicodeSetData::load_exemplars_index(const ICU4XDataProvider& provider, const ICU4XLocale& locale) { +inline diplomat::result, ICU4XDataError> ICU4XUnicodeSetData::load_exemplars_index(const ICU4XDataProvider& provider, const ICU4XLocale& locale) { auto result = capi::ICU4XUnicodeSetData_load_exemplars_index(provider.AsFFI(), locale.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XUnicodeSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XUnicodeSetData::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline const capi::ICU4XUnicodeSetData* ICU4XUnicodeSetData::AsFFI() const { diff --git a/ffi/capi/bindings/cpp/ICU4XUnitsConverterFactory.d.hpp b/ffi/capi/bindings/cpp/ICU4XUnitsConverterFactory.d.hpp index 1ceac0395e9..ae040e8a297 100644 --- a/ffi/capi/bindings/cpp/ICU4XUnitsConverterFactory.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XUnitsConverterFactory.d.hpp @@ -8,20 +8,20 @@ #include #include #include "diplomat_runtime.hpp" -#include "ICU4XError.d.hpp" +#include "ICU4XDataError.d.hpp" #include "ICU4XUnitsConverterFactory.d.h" class ICU4XDataProvider; class ICU4XMeasureUnit; class ICU4XMeasureUnitParser; class ICU4XUnitsConverter; -class ICU4XError; +class ICU4XDataError; class ICU4XUnitsConverterFactory { public: - inline static diplomat::result, ICU4XError> create(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> create(const ICU4XDataProvider& provider); inline std::unique_ptr converter(const ICU4XMeasureUnit& from, const ICU4XMeasureUnit& to) const; diff --git a/ffi/capi/bindings/cpp/ICU4XUnitsConverterFactory.h b/ffi/capi/bindings/cpp/ICU4XUnitsConverterFactory.h index e7470ebee17..59f5f871eed 100644 --- a/ffi/capi/bindings/cpp/ICU4XUnitsConverterFactory.h +++ b/ffi/capi/bindings/cpp/ICU4XUnitsConverterFactory.h @@ -14,7 +14,7 @@ #include "ICU4XMeasureUnitParser.h" #include "ICU4XUnitsConverter.d.h" #include "ICU4XUnitsConverter.h" -#include "diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XDataError.d.h" #include "ICU4XUnitsConverterFactory.d.h" @@ -24,7 +24,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XError ICU4XUnitsConverterFactory_create(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XDataError ICU4XUnitsConverterFactory_create(const ICU4XDataProvider* provider); ICU4XUnitsConverter* ICU4XUnitsConverterFactory_converter(const ICU4XUnitsConverterFactory* self, const ICU4XMeasureUnit* from, const ICU4XMeasureUnit* to); diff --git a/ffi/capi/bindings/cpp/ICU4XUnitsConverterFactory.hpp b/ffi/capi/bindings/cpp/ICU4XUnitsConverterFactory.hpp index 8d57a2985a0..d2dea3fe041 100644 --- a/ffi/capi/bindings/cpp/ICU4XUnitsConverterFactory.hpp +++ b/ffi/capi/bindings/cpp/ICU4XUnitsConverterFactory.hpp @@ -10,17 +10,17 @@ #include #include #include "diplomat_runtime.hpp" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" -#include "ICU4XError.hpp" #include "ICU4XMeasureUnit.hpp" #include "ICU4XMeasureUnitParser.hpp" #include "ICU4XUnitsConverter.hpp" #include "ICU4XUnitsConverterFactory.h" -inline diplomat::result, ICU4XError> ICU4XUnitsConverterFactory::create(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XUnitsConverterFactory::create(const ICU4XDataProvider& provider) { auto result = capi::ICU4XUnitsConverterFactory_create(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XUnitsConverterFactory::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XUnitsConverterFactory::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline std::unique_ptr ICU4XUnitsConverterFactory::converter(const ICU4XMeasureUnit& from, const ICU4XMeasureUnit& to) const { diff --git a/ffi/capi/bindings/cpp/ICU4XWeekCalculator.d.hpp b/ffi/capi/bindings/cpp/ICU4XWeekCalculator.d.hpp index 0e9cdee9022..49350126619 100644 --- a/ffi/capi/bindings/cpp/ICU4XWeekCalculator.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XWeekCalculator.d.hpp @@ -8,7 +8,7 @@ #include #include #include "diplomat_runtime.hpp" -#include "ICU4XError.d.hpp" +#include "ICU4XDataError.d.hpp" #include "ICU4XIsoWeekday.d.hpp" #include "ICU4XWeekCalculator.d.h" #include "ICU4XWeekendContainsDay.d.hpp" @@ -16,14 +16,14 @@ class ICU4XDataProvider; class ICU4XLocale; struct ICU4XWeekendContainsDay; -class ICU4XError; +class ICU4XDataError; class ICU4XIsoWeekday; class ICU4XWeekCalculator { public: - inline static diplomat::result, ICU4XError> create(const ICU4XDataProvider& provider, const ICU4XLocale& locale); + inline static diplomat::result, ICU4XDataError> create(const ICU4XDataProvider& provider, const ICU4XLocale& locale); inline static std::unique_ptr create_from_first_day_of_week_and_min_week_days(ICU4XIsoWeekday first_weekday, uint8_t min_week_days); diff --git a/ffi/capi/bindings/cpp/ICU4XWeekCalculator.h b/ffi/capi/bindings/cpp/ICU4XWeekCalculator.h index 4387ad7675a..0de9552dd11 100644 --- a/ffi/capi/bindings/cpp/ICU4XWeekCalculator.h +++ b/ffi/capi/bindings/cpp/ICU4XWeekCalculator.h @@ -14,7 +14,7 @@ #include "ICU4XLocale.h" #include "ICU4XWeekendContainsDay.d.h" #include "ICU4XWeekendContainsDay.h" -#include "diplomat_result_box_ICU4XWeekCalculator_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XWeekCalculator_ICU4XDataError.d.h" #include "ICU4XWeekCalculator.d.h" @@ -24,7 +24,7 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XWeekCalculator_ICU4XError ICU4XWeekCalculator_create(const ICU4XDataProvider* provider, const ICU4XLocale* locale); +diplomat_result_box_ICU4XWeekCalculator_ICU4XDataError ICU4XWeekCalculator_create(const ICU4XDataProvider* provider, const ICU4XLocale* locale); ICU4XWeekCalculator* ICU4XWeekCalculator_create_from_first_day_of_week_and_min_week_days(ICU4XIsoWeekday first_weekday, uint8_t min_week_days); diff --git a/ffi/capi/bindings/cpp/ICU4XWeekCalculator.hpp b/ffi/capi/bindings/cpp/ICU4XWeekCalculator.hpp index 56ab1a8b12f..65d2accddb1 100644 --- a/ffi/capi/bindings/cpp/ICU4XWeekCalculator.hpp +++ b/ffi/capi/bindings/cpp/ICU4XWeekCalculator.hpp @@ -10,18 +10,18 @@ #include #include #include "diplomat_runtime.hpp" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" -#include "ICU4XError.hpp" #include "ICU4XIsoWeekday.hpp" #include "ICU4XLocale.hpp" #include "ICU4XWeekCalculator.h" #include "ICU4XWeekendContainsDay.hpp" -inline diplomat::result, ICU4XError> ICU4XWeekCalculator::create(const ICU4XDataProvider& provider, const ICU4XLocale& locale) { +inline diplomat::result, ICU4XDataError> ICU4XWeekCalculator::create(const ICU4XDataProvider& provider, const ICU4XLocale& locale) { auto result = capi::ICU4XWeekCalculator_create(provider.AsFFI(), locale.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XWeekCalculator::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XWeekCalculator::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline std::unique_ptr ICU4XWeekCalculator::create_from_first_day_of_week_and_min_week_days(ICU4XIsoWeekday first_weekday, uint8_t min_week_days) { diff --git a/ffi/capi/bindings/cpp/ICU4XWordSegmenter.d.hpp b/ffi/capi/bindings/cpp/ICU4XWordSegmenter.d.hpp index 6c0362b3517..c2bd9c938a9 100644 --- a/ffi/capi/bindings/cpp/ICU4XWordSegmenter.d.hpp +++ b/ffi/capi/bindings/cpp/ICU4XWordSegmenter.d.hpp @@ -8,24 +8,24 @@ #include #include #include "diplomat_runtime.hpp" -#include "ICU4XError.d.hpp" +#include "ICU4XDataError.d.hpp" #include "ICU4XWordSegmenter.d.h" class ICU4XDataProvider; class ICU4XWordBreakIteratorLatin1; class ICU4XWordBreakIteratorUtf16; class ICU4XWordBreakIteratorUtf8; -class ICU4XError; +class ICU4XDataError; class ICU4XWordSegmenter { public: - inline static diplomat::result, ICU4XError> create_auto(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> create_auto(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> create_lstm(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> create_lstm(const ICU4XDataProvider& provider); - inline static diplomat::result, ICU4XError> create_dictionary(const ICU4XDataProvider& provider); + inline static diplomat::result, ICU4XDataError> create_dictionary(const ICU4XDataProvider& provider); inline std::unique_ptr segment_utf8(std::string_view input) const; diff --git a/ffi/capi/bindings/cpp/ICU4XWordSegmenter.h b/ffi/capi/bindings/cpp/ICU4XWordSegmenter.h index bb18ae2496e..d7b50cf7e84 100644 --- a/ffi/capi/bindings/cpp/ICU4XWordSegmenter.h +++ b/ffi/capi/bindings/cpp/ICU4XWordSegmenter.h @@ -14,7 +14,7 @@ #include "ICU4XWordBreakIteratorUtf16.h" #include "ICU4XWordBreakIteratorUtf8.d.h" #include "ICU4XWordBreakIteratorUtf8.h" -#include "diplomat_result_box_ICU4XWordSegmenter_ICU4XError.d.h" +#include "diplomat_result_box_ICU4XWordSegmenter_ICU4XDataError.d.h" #include "ICU4XWordSegmenter.d.h" @@ -24,11 +24,11 @@ extern "C" { #endif // __cplusplus -diplomat_result_box_ICU4XWordSegmenter_ICU4XError ICU4XWordSegmenter_create_auto(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XWordSegmenter_ICU4XDataError ICU4XWordSegmenter_create_auto(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XWordSegmenter_ICU4XError ICU4XWordSegmenter_create_lstm(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XWordSegmenter_ICU4XDataError ICU4XWordSegmenter_create_lstm(const ICU4XDataProvider* provider); -diplomat_result_box_ICU4XWordSegmenter_ICU4XError ICU4XWordSegmenter_create_dictionary(const ICU4XDataProvider* provider); +diplomat_result_box_ICU4XWordSegmenter_ICU4XDataError ICU4XWordSegmenter_create_dictionary(const ICU4XDataProvider* provider); ICU4XWordBreakIteratorUtf8* ICU4XWordSegmenter_segment_utf8(const ICU4XWordSegmenter* self, const char* input_data, size_t input_len); diff --git a/ffi/capi/bindings/cpp/ICU4XWordSegmenter.hpp b/ffi/capi/bindings/cpp/ICU4XWordSegmenter.hpp index a3ef7af577c..d80026e4dbc 100644 --- a/ffi/capi/bindings/cpp/ICU4XWordSegmenter.hpp +++ b/ffi/capi/bindings/cpp/ICU4XWordSegmenter.hpp @@ -10,27 +10,27 @@ #include #include #include "diplomat_runtime.hpp" +#include "ICU4XDataError.hpp" #include "ICU4XDataProvider.hpp" -#include "ICU4XError.hpp" #include "ICU4XWordBreakIteratorLatin1.hpp" #include "ICU4XWordBreakIteratorUtf16.hpp" #include "ICU4XWordBreakIteratorUtf8.hpp" #include "ICU4XWordSegmenter.h" -inline diplomat::result, ICU4XError> ICU4XWordSegmenter::create_auto(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XWordSegmenter::create_auto(const ICU4XDataProvider& provider) { auto result = capi::ICU4XWordSegmenter_create_auto(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XWordSegmenter::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XWordSegmenter::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XWordSegmenter::create_lstm(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XWordSegmenter::create_lstm(const ICU4XDataProvider& provider) { auto result = capi::ICU4XWordSegmenter_create_lstm(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XWordSegmenter::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XWordSegmenter::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } -inline diplomat::result, ICU4XError> ICU4XWordSegmenter::create_dictionary(const ICU4XDataProvider& provider) { +inline diplomat::result, ICU4XDataError> ICU4XWordSegmenter::create_dictionary(const ICU4XDataProvider& provider) { auto result = capi::ICU4XWordSegmenter_create_dictionary(provider.AsFFI()); - return result.is_ok ? diplomat::result, ICU4XError>(diplomat::Ok>(std::unique_ptr(ICU4XWordSegmenter::FromFFI(result.ok)))) : diplomat::result, ICU4XError>(diplomat::Err(ICU4XError::FromFFI(result.err))); + return result.is_ok ? diplomat::result, ICU4XDataError>(diplomat::Ok>(std::unique_ptr(ICU4XWordSegmenter::FromFFI(result.ok)))) : diplomat::result, ICU4XDataError>(diplomat::Err(ICU4XDataError::FromFFI(result.err))); } inline std::unique_ptr ICU4XWordSegmenter::segment_utf8(std::string_view input) const { diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XBidi_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XBidi_ICU4XDataError.d.h similarity index 50% rename from ffi/capi/bindings/cpp/diplomat_result_box_ICU4XBidi_ICU4XError.d.h rename to ffi/capi/bindings/cpp/diplomat_result_box_ICU4XBidi_ICU4XDataError.d.h index e2b3857aa9b..bfb608fd845 100644 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XBidi_ICU4XError.d.h +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XBidi_ICU4XDataError.d.h @@ -1,5 +1,5 @@ -#ifndef diplomat_result_box_ICU4XBidi_ICU4XError_D_H -#define diplomat_result_box_ICU4XBidi_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XBidi_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XBidi_ICU4XDataError_D_H #include #include @@ -7,7 +7,7 @@ #include #include "diplomat_runtime.h" #include "ICU4XBidi.d.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #ifdef __cplusplus namespace capi { @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XBidi_ICU4XError { +typedef struct diplomat_result_box_ICU4XBidi_ICU4XDataError { union { ICU4XBidi* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XBidi_ICU4XError; +} diplomat_result_box_ICU4XBidi_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XBidi_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XBidi_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCalendar_ICU4XDataError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCalendar_ICU4XDataError.d.h new file mode 100644 index 00000000000..b5ace2af88f --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCalendar_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XCalendar_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XCalendar_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XCalendar.d.h" +#include "ICU4XDataError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XCalendar_ICU4XDataError { + union { + ICU4XCalendar* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XCalendar_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XCalendar_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCalendar_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCalendar_ICU4XError.d.h deleted file mode 100644 index 1e0ce4d10f3..00000000000 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCalendar_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XCalendar_ICU4XError_D_H -#define diplomat_result_box_ICU4XCalendar_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XCalendar.d.h" -#include "ICU4XError.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XCalendar_ICU4XError { - union { - ICU4XCalendar* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XCalendar_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XCalendar_ICU4XError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XDataError.d.h similarity index 76% rename from ffi/capi/bindings/c/diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError.d.h rename to ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XDataError.d.h index d4e919d6bdb..a35b612ed86 100644 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError.d.h +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XDataError.d.h @@ -1,5 +1,5 @@ -#ifndef diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError_D_H -#define diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XDataError_D_H #include #include @@ -7,7 +7,7 @@ #include #include "diplomat_runtime.h" #include "ICU4XCanonicalCombiningClassMap.d.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #ifdef __cplusplus namespace capi { @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError { +typedef struct diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XDataError { union { ICU4XCanonicalCombiningClassMap* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError; +} diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XCanonicalComposition_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCanonicalComposition_ICU4XDataError.d.h similarity index 55% rename from ffi/capi/bindings/c/diplomat_result_box_ICU4XCanonicalComposition_ICU4XError.d.h rename to ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCanonicalComposition_ICU4XDataError.d.h index 5ea5fcd60b8..b2f585048f8 100644 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XCanonicalComposition_ICU4XError.d.h +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCanonicalComposition_ICU4XDataError.d.h @@ -1,5 +1,5 @@ -#ifndef diplomat_result_box_ICU4XCanonicalComposition_ICU4XError_D_H -#define diplomat_result_box_ICU4XCanonicalComposition_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XCanonicalComposition_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XCanonicalComposition_ICU4XDataError_D_H #include #include @@ -7,7 +7,7 @@ #include #include "diplomat_runtime.h" #include "ICU4XCanonicalComposition.d.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #ifdef __cplusplus namespace capi { @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XCanonicalComposition_ICU4XError { +typedef struct diplomat_result_box_ICU4XCanonicalComposition_ICU4XDataError { union { ICU4XCanonicalComposition* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XCanonicalComposition_ICU4XError; +} diplomat_result_box_ICU4XCanonicalComposition_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XCanonicalComposition_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XCanonicalComposition_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XDataError.d.h similarity index 54% rename from ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError.d.h rename to ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XDataError.d.h index e4cad3c746d..79ea2df4073 100644 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError.d.h +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XDataError.d.h @@ -1,5 +1,5 @@ -#ifndef diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError_D_H -#define diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XDataError_D_H #include #include @@ -7,7 +7,7 @@ #include #include "diplomat_runtime.h" #include "ICU4XCanonicalDecomposition.d.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #ifdef __cplusplus namespace capi { @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError { +typedef struct diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XDataError { union { ICU4XCanonicalDecomposition* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError; +} diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCaseMapCloser_ICU4XDataError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCaseMapCloser_ICU4XDataError.d.h new file mode 100644 index 00000000000..f08f5166791 --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCaseMapCloser_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XCaseMapCloser_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XCaseMapCloser_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XCaseMapCloser.d.h" +#include "ICU4XDataError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XCaseMapCloser_ICU4XDataError { + union { + ICU4XCaseMapCloser* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XCaseMapCloser_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XCaseMapCloser_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCaseMapCloser_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCaseMapCloser_ICU4XError.d.h deleted file mode 100644 index 575eb389422..00000000000 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCaseMapCloser_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XCaseMapCloser_ICU4XError_D_H -#define diplomat_result_box_ICU4XCaseMapCloser_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XCaseMapCloser.d.h" -#include "ICU4XError.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XCaseMapCloser_ICU4XError { - union { - ICU4XCaseMapCloser* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XCaseMapCloser_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XCaseMapCloser_ICU4XError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCaseMapper_ICU4XDataError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCaseMapper_ICU4XDataError.d.h new file mode 100644 index 00000000000..97707306144 --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCaseMapper_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XCaseMapper_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XCaseMapper_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XCaseMapper.d.h" +#include "ICU4XDataError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XCaseMapper_ICU4XDataError { + union { + ICU4XCaseMapper* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XCaseMapper_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XCaseMapper_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCaseMapper_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCaseMapper_ICU4XError.d.h deleted file mode 100644 index ea8c433f861..00000000000 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCaseMapper_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XCaseMapper_ICU4XError_D_H -#define diplomat_result_box_ICU4XCaseMapper_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XCaseMapper.d.h" -#include "ICU4XError.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XCaseMapper_ICU4XError { - union { - ICU4XCaseMapper* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XCaseMapper_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XCaseMapper_ICU4XError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCodePointMapData16_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCodePointMapData16_ICU4XDataError.d.h similarity index 55% rename from ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCodePointMapData16_ICU4XError.d.h rename to ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCodePointMapData16_ICU4XDataError.d.h index 9a608f1232a..6ad0a1683b1 100644 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCodePointMapData16_ICU4XError.d.h +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCodePointMapData16_ICU4XDataError.d.h @@ -1,5 +1,5 @@ -#ifndef diplomat_result_box_ICU4XCodePointMapData16_ICU4XError_D_H -#define diplomat_result_box_ICU4XCodePointMapData16_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XCodePointMapData16_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XCodePointMapData16_ICU4XDataError_D_H #include #include @@ -7,7 +7,7 @@ #include #include "diplomat_runtime.h" #include "ICU4XCodePointMapData16.d.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #ifdef __cplusplus namespace capi { @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XCodePointMapData16_ICU4XError { +typedef struct diplomat_result_box_ICU4XCodePointMapData16_ICU4XDataError { union { ICU4XCodePointMapData16* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XCodePointMapData16_ICU4XError; +} diplomat_result_box_ICU4XCodePointMapData16_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XCodePointMapData16_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XCodePointMapData16_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError.d.h new file mode 100644 index 00000000000..d799e6194bf --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XCodePointMapData8.d.h" +#include "ICU4XDataError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError { + union { + ICU4XCodePointMapData8* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XCodePointMapData8_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCodePointMapData8_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCodePointMapData8_ICU4XError.d.h deleted file mode 100644 index 72c12b812c2..00000000000 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCodePointMapData8_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XCodePointMapData8_ICU4XError_D_H -#define diplomat_result_box_ICU4XCodePointMapData8_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XCodePointMapData8.d.h" -#include "ICU4XError.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XCodePointMapData8_ICU4XError { - union { - ICU4XCodePointMapData8* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XCodePointMapData8_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XCodePointMapData8_ICU4XError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError.d.h new file mode 100644 index 00000000000..a7052829652 --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XCodePointSetData.d.h" +#include "ICU4XDataError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError { + union { + ICU4XCodePointSetData* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XCodePointSetData_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCollator_ICU4XDataError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCollator_ICU4XDataError.d.h new file mode 100644 index 00000000000..4bd60e21f4b --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCollator_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XCollator_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XCollator_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XCollator.d.h" +#include "ICU4XDataError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XCollator_ICU4XDataError { + union { + ICU4XCollator* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XCollator_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XCollator_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCollator_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCollator_ICU4XError.d.h deleted file mode 100644 index b62bafbc89c..00000000000 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCollator_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XCollator_ICU4XError_D_H -#define diplomat_result_box_ICU4XCollator_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XCollator.d.h" -#include "ICU4XError.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XCollator_ICU4XError { - union { - ICU4XCollator* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XCollator_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XCollator_ICU4XError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XComposingNormalizer_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XComposingNormalizer_ICU4XDataError.d.h similarity index 55% rename from ffi/capi/bindings/cpp/diplomat_result_box_ICU4XComposingNormalizer_ICU4XError.d.h rename to ffi/capi/bindings/cpp/diplomat_result_box_ICU4XComposingNormalizer_ICU4XDataError.d.h index 0d8dc6a994b..46df4c3dc98 100644 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XComposingNormalizer_ICU4XError.d.h +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XComposingNormalizer_ICU4XDataError.d.h @@ -1,5 +1,5 @@ -#ifndef diplomat_result_box_ICU4XComposingNormalizer_ICU4XError_D_H -#define diplomat_result_box_ICU4XComposingNormalizer_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XComposingNormalizer_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XComposingNormalizer_ICU4XDataError_D_H #include #include @@ -7,7 +7,7 @@ #include #include "diplomat_runtime.h" #include "ICU4XComposingNormalizer.d.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #ifdef __cplusplus namespace capi { @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XComposingNormalizer_ICU4XError { +typedef struct diplomat_result_box_ICU4XComposingNormalizer_ICU4XDataError { union { ICU4XComposingNormalizer* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XComposingNormalizer_ICU4XError; +} diplomat_result_box_ICU4XComposingNormalizer_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XComposingNormalizer_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XComposingNormalizer_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCustomTimeZone_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCustomTimeZone_ICU4XError.d.h deleted file mode 100644 index fbc6510dfa1..00000000000 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCustomTimeZone_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XCustomTimeZone_ICU4XError_D_H -#define diplomat_result_box_ICU4XCustomTimeZone_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XCustomTimeZone.d.h" -#include "ICU4XError.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XCustomTimeZone_ICU4XError { - union { - ICU4XCustomTimeZone* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XCustomTimeZone_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XCustomTimeZone_ICU4XError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCustomTimeZone_ICU4XTimeZoneInvalidOffsetError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCustomTimeZone_ICU4XTimeZoneInvalidOffsetError.d.h new file mode 100644 index 00000000000..ce0b96b3cf6 --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XCustomTimeZone_ICU4XTimeZoneInvalidOffsetError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XCustomTimeZone_ICU4XTimeZoneInvalidOffsetError_D_H +#define diplomat_result_box_ICU4XCustomTimeZone_ICU4XTimeZoneInvalidOffsetError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XCustomTimeZone.d.h" +#include "ICU4XTimeZoneInvalidOffsetError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XCustomTimeZone_ICU4XTimeZoneInvalidOffsetError { + union { + ICU4XCustomTimeZone* ok; + ICU4XTimeZoneInvalidOffsetError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XCustomTimeZone_ICU4XTimeZoneInvalidOffsetError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XCustomTimeZone_ICU4XTimeZoneInvalidOffsetError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XDataProvider_ICU4XDataError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XDataProvider_ICU4XDataError.d.h new file mode 100644 index 00000000000..da949b24967 --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XDataProvider_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XDataProvider_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XDataProvider_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XDataError.d.h" +#include "ICU4XDataProvider.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XDataProvider_ICU4XDataError { + union { + ICU4XDataProvider* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XDataProvider_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XDataProvider_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XDataProvider_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XDataProvider_ICU4XError.d.h deleted file mode 100644 index 7b888e0e2c6..00000000000 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XDataProvider_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XDataProvider_ICU4XError_D_H -#define diplomat_result_box_ICU4XDataProvider_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XDataProvider.d.h" -#include "ICU4XError.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XDataProvider_ICU4XError { - union { - ICU4XDataProvider* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XDataProvider_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XDataProvider_ICU4XError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XDataStruct_ICU4XDataError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XDataStruct_ICU4XDataError.d.h new file mode 100644 index 00000000000..3c26421293b --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XDataStruct_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XDataStruct_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XDataStruct_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XDataError.d.h" +#include "ICU4XDataStruct.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XDataStruct_ICU4XDataError { + union { + ICU4XDataStruct* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XDataStruct_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XDataStruct_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XDataStruct_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XDataStruct_ICU4XError.d.h deleted file mode 100644 index 00758ed9876..00000000000 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XDataStruct_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XDataStruct_ICU4XError_D_H -#define diplomat_result_box_ICU4XDataStruct_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XDataStruct.d.h" -#include "ICU4XError.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XDataStruct_ICU4XError { - union { - ICU4XDataStruct* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XDataStruct_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XDataStruct_ICU4XError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XDateTime_ICU4XCalendarError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XDateTime_ICU4XCalendarError.d.h new file mode 100644 index 00000000000..9b290ccaa3b --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XDateTime_ICU4XCalendarError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XDateTime_ICU4XCalendarError_D_H +#define diplomat_result_box_ICU4XDateTime_ICU4XCalendarError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XCalendarError.d.h" +#include "ICU4XDateTime.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XDateTime_ICU4XCalendarError { + union { + ICU4XDateTime* ok; + ICU4XCalendarError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XDateTime_ICU4XCalendarError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XDateTime_ICU4XCalendarError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XDateTime_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XDateTime_ICU4XError.d.h deleted file mode 100644 index 48effbd4d47..00000000000 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XDateTime_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XDateTime_ICU4XError_D_H -#define diplomat_result_box_ICU4XDateTime_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XDateTime.d.h" -#include "ICU4XError.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XDateTime_ICU4XError { - union { - ICU4XDateTime* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XDateTime_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XDateTime_ICU4XError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XDate_ICU4XCalendarError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XDate_ICU4XCalendarError.d.h new file mode 100644 index 00000000000..65e482ba5e0 --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XDate_ICU4XCalendarError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XDate_ICU4XCalendarError_D_H +#define diplomat_result_box_ICU4XDate_ICU4XCalendarError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XCalendarError.d.h" +#include "ICU4XDate.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XDate_ICU4XCalendarError { + union { + ICU4XDate* ok; + ICU4XCalendarError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XDate_ICU4XCalendarError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XDate_ICU4XCalendarError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XDate_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XDate_ICU4XError.d.h deleted file mode 100644 index 1ca15736004..00000000000 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XDate_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XDate_ICU4XError_D_H -#define diplomat_result_box_ICU4XDate_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XDate.d.h" -#include "ICU4XError.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XDate_ICU4XError { - union { - ICU4XDate* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XDate_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XDate_ICU4XError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XDataError.d.h similarity index 54% rename from ffi/capi/bindings/c/diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError.d.h rename to ffi/capi/bindings/cpp/diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XDataError.d.h index 8efe70a07d0..e0b6e4f13ad 100644 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError.d.h +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XDataError.d.h @@ -1,13 +1,13 @@ -#ifndef diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError_D_H -#define diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XDataError_D_H #include #include #include #include #include "diplomat_runtime.h" +#include "ICU4XDataError.d.h" #include "ICU4XDecomposingNormalizer.d.h" -#include "ICU4XError.d.h" #ifdef __cplusplus namespace capi { @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError { +typedef struct diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XDataError { union { ICU4XDecomposingNormalizer* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError; +} diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/c/diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XDataError.d.h similarity index 54% rename from ffi/capi/bindings/c/diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError.d.h rename to ffi/capi/bindings/cpp/diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XDataError.d.h index 9e1028991fa..47452f2d530 100644 --- a/ffi/capi/bindings/c/diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError.d.h +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XDataError.d.h @@ -1,12 +1,12 @@ -#ifndef diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError_D_H -#define diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XDataError_D_H #include #include #include #include #include "diplomat_runtime.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #include "ICU4XFixedDecimalFormatter.d.h" #ifdef __cplusplus @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError { +typedef struct diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XDataError { union { ICU4XFixedDecimalFormatter* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError; +} diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XFixedDecimal_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XFixedDecimal_ICU4XError.d.h deleted file mode 100644 index 152ada239f7..00000000000 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XFixedDecimal_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XFixedDecimal_ICU4XError_D_H -#define diplomat_result_box_ICU4XFixedDecimal_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XFixedDecimal.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XFixedDecimal_ICU4XError { - union { - ICU4XFixedDecimal* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XFixedDecimal_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XFixedDecimal_ICU4XError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalLimitError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalLimitError.d.h new file mode 100644 index 00000000000..7a6b0555ae5 --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalLimitError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalLimitError_D_H +#define diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalLimitError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XFixedDecimal.d.h" +#include "ICU4XFixedDecimalLimitError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalLimitError { + union { + ICU4XFixedDecimal* ok; + ICU4XFixedDecimalLimitError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalLimitError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalLimitError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalParseError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalParseError.d.h new file mode 100644 index 00000000000..c9248b74094 --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalParseError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalParseError_D_H +#define diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalParseError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XFixedDecimal.d.h" +#include "ICU4XFixedDecimalParseError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalParseError { + union { + ICU4XFixedDecimal* ok; + ICU4XFixedDecimalParseError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalParseError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalParseError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XDataError.d.h similarity index 82% rename from ffi/capi/bindings/cpp/diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError.d.h rename to ffi/capi/bindings/cpp/diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XDataError.d.h index e68586fd279..9ccafa13ec2 100644 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError.d.h +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XDataError.d.h @@ -1,12 +1,12 @@ -#ifndef diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError_D_H -#define diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XDataError_D_H #include #include #include #include #include "diplomat_runtime.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #include "ICU4XGeneralCategoryNameToMaskMapper.d.h" #ifdef __cplusplus @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError { +typedef struct diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XDataError { union { ICU4XGeneralCategoryNameToMaskMapper* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError; +} diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XDataError.d.h similarity index 62% rename from ffi/capi/bindings/cpp/diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError.d.h rename to ffi/capi/bindings/cpp/diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XDataError.d.h index 7a86c70dfdc..3ff10243b2a 100644 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError.d.h +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XDataError.d.h @@ -1,12 +1,12 @@ -#ifndef diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError_D_H -#define diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XDataError_D_H #include #include #include #include #include "diplomat_runtime.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #include "ICU4XGraphemeClusterSegmenter.d.h" #ifdef __cplusplus @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError { +typedef struct diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XDataError { union { ICU4XGraphemeClusterSegmenter* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError; +} diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XIsoDateTime_ICU4XCalendarError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XIsoDateTime_ICU4XCalendarError.d.h new file mode 100644 index 00000000000..af130b0c527 --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XIsoDateTime_ICU4XCalendarError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XIsoDateTime_ICU4XCalendarError_D_H +#define diplomat_result_box_ICU4XIsoDateTime_ICU4XCalendarError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XCalendarError.d.h" +#include "ICU4XIsoDateTime.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XIsoDateTime_ICU4XCalendarError { + union { + ICU4XIsoDateTime* ok; + ICU4XCalendarError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XIsoDateTime_ICU4XCalendarError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XIsoDateTime_ICU4XCalendarError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XIsoDateTime_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XIsoDateTime_ICU4XError.d.h deleted file mode 100644 index 4a70f30d04f..00000000000 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XIsoDateTime_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XIsoDateTime_ICU4XError_D_H -#define diplomat_result_box_ICU4XIsoDateTime_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XIsoDateTime.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XIsoDateTime_ICU4XError { - union { - ICU4XIsoDateTime* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XIsoDateTime_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XIsoDateTime_ICU4XError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XIsoDate_ICU4XCalendarError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XIsoDate_ICU4XCalendarError.d.h new file mode 100644 index 00000000000..0fa2f313ea8 --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XIsoDate_ICU4XCalendarError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XIsoDate_ICU4XCalendarError_D_H +#define diplomat_result_box_ICU4XIsoDate_ICU4XCalendarError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XCalendarError.d.h" +#include "ICU4XIsoDate.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XIsoDate_ICU4XCalendarError { + union { + ICU4XIsoDate* ok; + ICU4XCalendarError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XIsoDate_ICU4XCalendarError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XIsoDate_ICU4XCalendarError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XIsoDate_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XIsoDate_ICU4XError.d.h deleted file mode 100644 index 9e0a8a377b4..00000000000 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XIsoDate_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XIsoDate_ICU4XError_D_H -#define diplomat_result_box_ICU4XIsoDate_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XIsoDate.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XIsoDate_ICU4XError { - union { - ICU4XIsoDate* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XIsoDate_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XIsoDate_ICU4XError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError.d.h new file mode 100644 index 00000000000..2607193662d --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XDataError.d.h" +#include "ICU4XLineSegmenter.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError { + union { + ICU4XLineSegmenter* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLineSegmenter_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLineSegmenter_ICU4XError.d.h deleted file mode 100644 index a8c831d5056..00000000000 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLineSegmenter_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XLineSegmenter_ICU4XError_D_H -#define diplomat_result_box_ICU4XLineSegmenter_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XLineSegmenter.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XLineSegmenter_ICU4XError { - union { - ICU4XLineSegmenter* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XLineSegmenter_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XLineSegmenter_ICU4XError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XListFormatter_ICU4XDataError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XListFormatter_ICU4XDataError.d.h new file mode 100644 index 00000000000..b61d38290bc --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XListFormatter_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XListFormatter_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XListFormatter_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XDataError.d.h" +#include "ICU4XListFormatter.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XListFormatter_ICU4XDataError { + union { + ICU4XListFormatter* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XListFormatter_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XListFormatter_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XListFormatter_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XListFormatter_ICU4XError.d.h deleted file mode 100644 index 5bd497bf3ac..00000000000 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XListFormatter_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XListFormatter_ICU4XError_D_H -#define diplomat_result_box_ICU4XListFormatter_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XListFormatter.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XListFormatter_ICU4XError { - union { - ICU4XListFormatter* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XListFormatter_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XListFormatter_ICU4XError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLocaleDirectionality_ICU4XDataError.d.h similarity index 55% rename from ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError.d.h rename to ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLocaleDirectionality_ICU4XDataError.d.h index 86862fe7cab..3afa0a3212c 100644 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError.d.h +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLocaleDirectionality_ICU4XDataError.d.h @@ -1,12 +1,12 @@ -#ifndef diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError_D_H -#define diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XLocaleDirectionality_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XLocaleDirectionality_ICU4XDataError_D_H #include #include #include #include #include "diplomat_runtime.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #include "ICU4XLocaleDirectionality.d.h" #ifdef __cplusplus @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError { +typedef struct diplomat_result_box_ICU4XLocaleDirectionality_ICU4XDataError { union { ICU4XLocaleDirectionality* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError; +} diplomat_result_box_ICU4XLocaleDirectionality_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XLocaleDirectionality_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XDataError.d.h similarity index 76% rename from ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError.d.h rename to ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XDataError.d.h index e5c87195eba..9bab82bb167 100644 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError.d.h +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XDataError.d.h @@ -1,12 +1,12 @@ -#ifndef diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError_D_H -#define diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XDataError_D_H #include #include #include #include #include "diplomat_runtime.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #include "ICU4XLocaleDisplayNamesFormatter.d.h" #ifdef __cplusplus @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError { +typedef struct diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XDataError { union { ICU4XLocaleDisplayNamesFormatter* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError; +} diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XLocaleParseError.d.h similarity index 72% rename from ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError.d.h rename to ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XLocaleParseError.d.h index 705a71684d9..6cfe75d0034 100644 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError.d.h +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XLocaleParseError.d.h @@ -1,13 +1,13 @@ -#ifndef diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError_D_H -#define diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XLocaleParseError_D_H +#define diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XLocaleParseError_D_H #include #include #include #include #include "diplomat_runtime.h" -#include "ICU4XError.d.h" #include "ICU4XLocaleFallbackerWithConfig.d.h" +#include "ICU4XLocaleParseError.d.h" #ifdef __cplusplus namespace capi { @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError { +typedef struct diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XLocaleParseError { union { ICU4XLocaleFallbackerWithConfig* ok; - ICU4XError err; + ICU4XLocaleParseError err; }; bool is_ok; -} diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError; +} diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XLocaleParseError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XLocaleParseError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLocaleFallbacker_ICU4XDataError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLocaleFallbacker_ICU4XDataError.d.h new file mode 100644 index 00000000000..a5bd96a278d --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLocaleFallbacker_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XLocaleFallbacker_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XLocaleFallbacker_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XDataError.d.h" +#include "ICU4XLocaleFallbacker.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XLocaleFallbacker_ICU4XDataError { + union { + ICU4XLocaleFallbacker* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XLocaleFallbacker_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XLocaleFallbacker_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError.d.h deleted file mode 100644 index 491a8548bff..00000000000 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError_D_H -#define diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XLocaleFallbacker.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError { - union { - ICU4XLocaleFallbacker* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLocale_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLocale_ICU4XError.d.h deleted file mode 100644 index 78451d1cedc..00000000000 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLocale_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XLocale_ICU4XError_D_H -#define diplomat_result_box_ICU4XLocale_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XLocale.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XLocale_ICU4XError { - union { - ICU4XLocale* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XLocale_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XLocale_ICU4XError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLocale_ICU4XLocaleParseError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLocale_ICU4XLocaleParseError.d.h new file mode 100644 index 00000000000..aff507a8438 --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XLocale_ICU4XLocaleParseError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XLocale_ICU4XLocaleParseError_D_H +#define diplomat_result_box_ICU4XLocale_ICU4XLocaleParseError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XLocale.d.h" +#include "ICU4XLocaleParseError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XLocale_ICU4XLocaleParseError { + union { + ICU4XLocale* ok; + ICU4XLocaleParseError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XLocale_ICU4XLocaleParseError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XLocale_ICU4XLocaleParseError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XMetazoneCalculator_ICU4XDataError.d.h similarity index 55% rename from ffi/capi/bindings/cpp/diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError.d.h rename to ffi/capi/bindings/cpp/diplomat_result_box_ICU4XMetazoneCalculator_ICU4XDataError.d.h index 570acbeee33..f74e6aefca3 100644 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError.d.h +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XMetazoneCalculator_ICU4XDataError.d.h @@ -1,12 +1,12 @@ -#ifndef diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError_D_H -#define diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XMetazoneCalculator_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XMetazoneCalculator_ICU4XDataError_D_H #include #include #include #include #include "diplomat_runtime.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #include "ICU4XMetazoneCalculator.d.h" #ifdef __cplusplus @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError { +typedef struct diplomat_result_box_ICU4XMetazoneCalculator_ICU4XDataError { union { ICU4XMetazoneCalculator* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError; +} diplomat_result_box_ICU4XMetazoneCalculator_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XMetazoneCalculator_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XPluralOperands_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XPluralOperands_ICU4XError.d.h deleted file mode 100644 index 13a20ec415e..00000000000 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XPluralOperands_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XPluralOperands_ICU4XError_D_H -#define diplomat_result_box_ICU4XPluralOperands_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XPluralOperands.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XPluralOperands_ICU4XError { - union { - ICU4XPluralOperands* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XPluralOperands_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XPluralOperands_ICU4XError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XPluralOperands_ICU4XFixedDecimalParseError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XPluralOperands_ICU4XFixedDecimalParseError.d.h new file mode 100644 index 00000000000..67a7b9c6829 --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XPluralOperands_ICU4XFixedDecimalParseError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XPluralOperands_ICU4XFixedDecimalParseError_D_H +#define diplomat_result_box_ICU4XPluralOperands_ICU4XFixedDecimalParseError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XFixedDecimalParseError.d.h" +#include "ICU4XPluralOperands.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XPluralOperands_ICU4XFixedDecimalParseError { + union { + ICU4XPluralOperands* ok; + ICU4XFixedDecimalParseError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XPluralOperands_ICU4XFixedDecimalParseError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XPluralOperands_ICU4XFixedDecimalParseError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XPluralRules_ICU4XDataError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XPluralRules_ICU4XDataError.d.h new file mode 100644 index 00000000000..17f2716930f --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XPluralRules_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XPluralRules_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XPluralRules_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XDataError.d.h" +#include "ICU4XPluralRules.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XPluralRules_ICU4XDataError { + union { + ICU4XPluralRules* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XPluralRules_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XPluralRules_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XPluralRules_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XPluralRules_ICU4XError.d.h deleted file mode 100644 index 8e03fe234e4..00000000000 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XPluralRules_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XPluralRules_ICU4XError_D_H -#define diplomat_result_box_ICU4XPluralRules_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XPluralRules.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XPluralRules_ICU4XError { - union { - ICU4XPluralRules* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XPluralRules_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XPluralRules_ICU4XError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError.d.h similarity index 75% rename from ffi/capi/bindings/cpp/diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError.d.h rename to ffi/capi/bindings/cpp/diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError.d.h index 792acae4280..960146f740c 100644 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError.d.h +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError.d.h @@ -1,12 +1,12 @@ -#ifndef diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError_D_H -#define diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError_D_H #include #include #include #include #include "diplomat_runtime.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #include "ICU4XPropertyValueNameToEnumMapper.d.h" #ifdef __cplusplus @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError { +typedef struct diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError { union { ICU4XPropertyValueNameToEnumMapper* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError; +} diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XRegionDisplayNames_ICU4XDataError.d.h similarity index 55% rename from ffi/capi/bindings/cpp/diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError.d.h rename to ffi/capi/bindings/cpp/diplomat_result_box_ICU4XRegionDisplayNames_ICU4XDataError.d.h index 29ef6dd65ec..4dcc633c519 100644 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError.d.h +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XRegionDisplayNames_ICU4XDataError.d.h @@ -1,12 +1,12 @@ -#ifndef diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError_D_H -#define diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XRegionDisplayNames_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XRegionDisplayNames_ICU4XDataError_D_H #include #include #include #include #include "diplomat_runtime.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #include "ICU4XRegionDisplayNames.d.h" #ifdef __cplusplus @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError { +typedef struct diplomat_result_box_ICU4XRegionDisplayNames_ICU4XDataError { union { ICU4XRegionDisplayNames* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError; +} diplomat_result_box_ICU4XRegionDisplayNames_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XRegionDisplayNames_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XScriptWithExtensions_ICU4XDataError.d.h similarity index 55% rename from ffi/capi/bindings/cpp/diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError.d.h rename to ffi/capi/bindings/cpp/diplomat_result_box_ICU4XScriptWithExtensions_ICU4XDataError.d.h index e24c410fdb7..14d214d4a2f 100644 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError.d.h +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XScriptWithExtensions_ICU4XDataError.d.h @@ -1,12 +1,12 @@ -#ifndef diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError_D_H -#define diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XScriptWithExtensions_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XScriptWithExtensions_ICU4XDataError_D_H #include #include #include #include #include "diplomat_runtime.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #include "ICU4XScriptWithExtensions.d.h" #ifdef __cplusplus @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError { +typedef struct diplomat_result_box_ICU4XScriptWithExtensions_ICU4XDataError { union { ICU4XScriptWithExtensions* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError; +} diplomat_result_box_ICU4XScriptWithExtensions_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XScriptWithExtensions_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XSentenceSegmenter_ICU4XDataError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XSentenceSegmenter_ICU4XDataError.d.h new file mode 100644 index 00000000000..f7ead2f2887 --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XSentenceSegmenter_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XSentenceSegmenter_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XSentenceSegmenter_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XDataError.d.h" +#include "ICU4XSentenceSegmenter.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XSentenceSegmenter_ICU4XDataError { + union { + ICU4XSentenceSegmenter* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XSentenceSegmenter_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XSentenceSegmenter_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError.d.h deleted file mode 100644 index 5bce2f5a2c6..00000000000 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError_D_H -#define diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XSentenceSegmenter.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError { - union { - ICU4XSentenceSegmenter* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XDataError.d.h similarity index 78% rename from ffi/capi/bindings/cpp/diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XError.d.h rename to ffi/capi/bindings/cpp/diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XDataError.d.h index 1e3e0ef74fe..db31968fdc3 100644 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XError.d.h +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XDataError.d.h @@ -1,12 +1,12 @@ -#ifndef diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XError_D_H -#define diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XDataError_D_H #include #include #include #include #include "diplomat_runtime.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #include "ICU4XTimeZoneIdMapperWithFastCanonicalization.d.h" #ifdef __cplusplus @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XError { +typedef struct diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XDataError { union { ICU4XTimeZoneIdMapperWithFastCanonicalization* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XError; +} diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XTimeZoneIdMapperWithFastCanonicalization_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XDataError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XDataError.d.h new file mode 100644 index 00000000000..96aa5216d5c --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XDataError.d.h" +#include "ICU4XTimeZoneIdMapper.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XDataError { + union { + ICU4XTimeZoneIdMapper* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XError.d.h deleted file mode 100644 index ecbdf46222d..00000000000 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XError_D_H -#define diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XTimeZoneIdMapper.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XError { - union { - ICU4XTimeZoneIdMapper* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XTimeZoneIdMapper_ICU4XError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XTime_ICU4XCalendarError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XTime_ICU4XCalendarError.d.h new file mode 100644 index 00000000000..9e32ce8b3e1 --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XTime_ICU4XCalendarError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XTime_ICU4XCalendarError_D_H +#define diplomat_result_box_ICU4XTime_ICU4XCalendarError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XCalendarError.d.h" +#include "ICU4XTime.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XTime_ICU4XCalendarError { + union { + ICU4XTime* ok; + ICU4XCalendarError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XTime_ICU4XCalendarError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XTime_ICU4XCalendarError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XTime_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XTime_ICU4XError.d.h deleted file mode 100644 index 5eaf9d55cd1..00000000000 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XTime_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XTime_ICU4XError_D_H -#define diplomat_result_box_ICU4XTime_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XTime.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XTime_ICU4XError { - union { - ICU4XTime* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XTime_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XTime_ICU4XError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XTitlecaseMapper_ICU4XDataError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XTitlecaseMapper_ICU4XDataError.d.h new file mode 100644 index 00000000000..12d193c7cb4 --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XTitlecaseMapper_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XTitlecaseMapper_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XTitlecaseMapper_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XDataError.d.h" +#include "ICU4XTitlecaseMapper.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XTitlecaseMapper_ICU4XDataError { + union { + ICU4XTitlecaseMapper* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XTitlecaseMapper_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XTitlecaseMapper_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError.d.h deleted file mode 100644 index ca0d34815d7..00000000000 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError_D_H -#define diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XTitlecaseMapper.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError { - union { - ICU4XTitlecaseMapper* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XUnicodeSetData_ICU4XDataError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XUnicodeSetData_ICU4XDataError.d.h new file mode 100644 index 00000000000..0adae4ef002 --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XUnicodeSetData_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XUnicodeSetData_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XUnicodeSetData_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XDataError.d.h" +#include "ICU4XUnicodeSetData.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XUnicodeSetData_ICU4XDataError { + union { + ICU4XUnicodeSetData* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XUnicodeSetData_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XUnicodeSetData_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XUnicodeSetData_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XUnicodeSetData_ICU4XError.d.h deleted file mode 100644 index 3b0925f5b26..00000000000 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XUnicodeSetData_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XUnicodeSetData_ICU4XError_D_H -#define diplomat_result_box_ICU4XUnicodeSetData_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XUnicodeSetData.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XUnicodeSetData_ICU4XError { - union { - ICU4XUnicodeSetData* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XUnicodeSetData_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XUnicodeSetData_ICU4XError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XDataError.d.h similarity index 54% rename from ffi/capi/bindings/cpp/diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XError.d.h rename to ffi/capi/bindings/cpp/diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XDataError.d.h index 24f24300f51..dbdc60c262e 100644 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XError.d.h +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XDataError.d.h @@ -1,12 +1,12 @@ -#ifndef diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XError_D_H -#define diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XError_D_H +#ifndef diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XDataError_D_H #include #include #include #include #include "diplomat_runtime.h" -#include "ICU4XError.d.h" +#include "ICU4XDataError.d.h" #include "ICU4XUnitsConverterFactory.d.h" #ifdef __cplusplus @@ -15,17 +15,17 @@ extern "C" { #endif // __cplusplus -typedef struct diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XError { +typedef struct diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XDataError { union { ICU4XUnitsConverterFactory* ok; - ICU4XError err; + ICU4XDataError err; }; bool is_ok; -} diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XError; +} diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XDataError; #ifdef __cplusplus } // extern "C" } // namespace capi #endif // __cplusplus -#endif // diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XError_D_H +#endif // diplomat_result_box_ICU4XUnitsConverterFactory_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XWeekCalculator_ICU4XDataError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XWeekCalculator_ICU4XDataError.d.h new file mode 100644 index 00000000000..2604e3b5aff --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XWeekCalculator_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XWeekCalculator_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XWeekCalculator_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XDataError.d.h" +#include "ICU4XWeekCalculator.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XWeekCalculator_ICU4XDataError { + union { + ICU4XWeekCalculator* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XWeekCalculator_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XWeekCalculator_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XWeekCalculator_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XWeekCalculator_ICU4XError.d.h deleted file mode 100644 index 3bdb0caf4be..00000000000 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XWeekCalculator_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XWeekCalculator_ICU4XError_D_H -#define diplomat_result_box_ICU4XWeekCalculator_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XWeekCalculator.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XWeekCalculator_ICU4XError { - union { - ICU4XWeekCalculator* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XWeekCalculator_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XWeekCalculator_ICU4XError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XWordSegmenter_ICU4XDataError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XWordSegmenter_ICU4XDataError.d.h new file mode 100644 index 00000000000..756a4c14f9b --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XWordSegmenter_ICU4XDataError.d.h @@ -0,0 +1,31 @@ +#ifndef diplomat_result_box_ICU4XWordSegmenter_ICU4XDataError_D_H +#define diplomat_result_box_ICU4XWordSegmenter_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XDataError.d.h" +#include "ICU4XWordSegmenter.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_box_ICU4XWordSegmenter_ICU4XDataError { + union { + ICU4XWordSegmenter* ok; + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XWordSegmenter_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_box_ICU4XWordSegmenter_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XWordSegmenter_ICU4XError.d.h b/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XWordSegmenter_ICU4XError.d.h deleted file mode 100644 index 4be99625e02..00000000000 --- a/ffi/capi/bindings/cpp/diplomat_result_box_ICU4XWordSegmenter_ICU4XError.d.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef diplomat_result_box_ICU4XWordSegmenter_ICU4XError_D_H -#define diplomat_result_box_ICU4XWordSegmenter_ICU4XError_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" -#include "ICU4XError.d.h" -#include "ICU4XWordSegmenter.d.h" - -#ifdef __cplusplus -namespace capi { -extern "C" { -#endif // __cplusplus - - -typedef struct diplomat_result_box_ICU4XWordSegmenter_ICU4XError { - union { - ICU4XWordSegmenter* ok; - ICU4XError err; - }; - bool is_ok; -} diplomat_result_box_ICU4XWordSegmenter_ICU4XError; - -#ifdef __cplusplus -} // extern "C" -} // namespace capi -#endif // __cplusplus - -#endif // diplomat_result_box_ICU4XWordSegmenter_ICU4XError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_void_ICU4XDataError.d.h b/ffi/capi/bindings/cpp/diplomat_result_void_ICU4XDataError.d.h new file mode 100644 index 00000000000..e169234a377 --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_void_ICU4XDataError.d.h @@ -0,0 +1,29 @@ +#ifndef diplomat_result_void_ICU4XDataError_D_H +#define diplomat_result_void_ICU4XDataError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XDataError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_void_ICU4XDataError { + union { + ICU4XDataError err; + }; + bool is_ok; +} diplomat_result_void_ICU4XDataError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_void_ICU4XDataError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_void_ICU4XLocaleParseError.d.h b/ffi/capi/bindings/cpp/diplomat_result_void_ICU4XLocaleParseError.d.h new file mode 100644 index 00000000000..5f3c2523bd3 --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_void_ICU4XLocaleParseError.d.h @@ -0,0 +1,29 @@ +#ifndef diplomat_result_void_ICU4XLocaleParseError_D_H +#define diplomat_result_void_ICU4XLocaleParseError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XLocaleParseError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_void_ICU4XLocaleParseError { + union { + ICU4XLocaleParseError err; + }; + bool is_ok; +} diplomat_result_void_ICU4XLocaleParseError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_void_ICU4XLocaleParseError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_void_ICU4XTimeZoneInvalidIdError.d.h b/ffi/capi/bindings/cpp/diplomat_result_void_ICU4XTimeZoneInvalidIdError.d.h new file mode 100644 index 00000000000..0c147e908c6 --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_void_ICU4XTimeZoneInvalidIdError.d.h @@ -0,0 +1,29 @@ +#ifndef diplomat_result_void_ICU4XTimeZoneInvalidIdError_D_H +#define diplomat_result_void_ICU4XTimeZoneInvalidIdError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XTimeZoneInvalidIdError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_void_ICU4XTimeZoneInvalidIdError { + union { + ICU4XTimeZoneInvalidIdError err; + }; + bool is_ok; +} diplomat_result_void_ICU4XTimeZoneInvalidIdError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_void_ICU4XTimeZoneInvalidIdError_D_H diff --git a/ffi/capi/bindings/cpp/diplomat_result_void_ICU4XTimeZoneInvalidOffsetError.d.h b/ffi/capi/bindings/cpp/diplomat_result_void_ICU4XTimeZoneInvalidOffsetError.d.h new file mode 100644 index 00000000000..f1fddd13595 --- /dev/null +++ b/ffi/capi/bindings/cpp/diplomat_result_void_ICU4XTimeZoneInvalidOffsetError.d.h @@ -0,0 +1,29 @@ +#ifndef diplomat_result_void_ICU4XTimeZoneInvalidOffsetError_D_H +#define diplomat_result_void_ICU4XTimeZoneInvalidOffsetError_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" +#include "ICU4XTimeZoneInvalidOffsetError.d.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif // __cplusplus + + +typedef struct diplomat_result_void_ICU4XTimeZoneInvalidOffsetError { + union { + ICU4XTimeZoneInvalidOffsetError err; + }; + bool is_ok; +} diplomat_result_void_ICU4XTimeZoneInvalidOffsetError; + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif // __cplusplus + +#endif // diplomat_result_void_ICU4XTimeZoneInvalidOffsetError_D_H diff --git a/ffi/capi/bindings/dart/Bidi.g.dart b/ffi/capi/bindings/dart/Bidi.g.dart index 2f007bfef62..a92ca33f69a 100644 --- a/ffi/capi/bindings/dart/Bidi.g.dart +++ b/ffi/capi/bindings/dart/Bidi.g.dart @@ -28,11 +28,11 @@ final class Bidi implements ffi.Finalizable { /// /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/properties/bidi/struct.BidiClassAdapter.html#method.new) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory Bidi(DataProvider provider) { final result = _ICU4XBidi_create(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return Bidi._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/BidiParagraph.g.dart b/ffi/capi/bindings/dart/BidiParagraph.g.dart index 77d36a00236..6eb62c97e6a 100644 --- a/ffi/capi/bindings/dart/BidiParagraph.g.dart +++ b/ffi/capi/bindings/dart/BidiParagraph.g.dart @@ -25,7 +25,7 @@ final class BidiParagraph implements ffi.Finalizable { static final _finalizer = ffi.NativeFinalizer(ffi.Native.addressOf(_ICU4XBidiParagraph_destroy)); /// Given a paragraph index `n` within the surrounding text, this sets this - /// object to the paragraph at that index. Returns `Error::OutOfBoundsError` when out of bounds. + /// object to the paragraph at that index. Returns nothing when out of bounds. /// /// This is equivalent to calling `paragraph_at()` on `BidiInfo` but doesn't /// create a new object diff --git a/ffi/capi/bindings/dart/Calendar.g.dart b/ffi/capi/bindings/dart/Calendar.g.dart index 23c9a47a490..0f9860210cb 100644 --- a/ffi/capi/bindings/dart/Calendar.g.dart +++ b/ffi/capi/bindings/dart/Calendar.g.dart @@ -26,11 +26,11 @@ final class Calendar implements ffi.Finalizable { /// /// See the [Rust documentation for `new_for_locale`](https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html#method.new_for_locale) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory Calendar.forLocale(DataProvider provider, Locale locale) { final result = _ICU4XCalendar_create_for_locale(provider._ffi, locale._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return Calendar._fromFfi(result.union.ok, []); } @@ -39,11 +39,11 @@ final class Calendar implements ffi.Finalizable { /// /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html#method.new) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory Calendar.forKind(DataProvider provider, AnyCalendarKind kind) { final result = _ICU4XCalendar_create_for_kind(provider._ffi, kind.index); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return Calendar._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/CalendarError.g.dart b/ffi/capi/bindings/dart/CalendarError.g.dart new file mode 100644 index 00000000000..548f0e872ed --- /dev/null +++ b/ffi/capi/bindings/dart/CalendarError.g.dart @@ -0,0 +1,14 @@ +// generated by diplomat-tool + +part of 'lib.g.dart'; + +/// Additional information: [1](https://docs.rs/icu/latest/icu/calendar/struct.RangeError.html), [2](https://docs.rs/icu/latest/icu/calendar/enum.DateError.html) +enum CalendarError { + unknown, + + outOfRange, + + unknownEra, + + unknownMonthCode; +} diff --git a/ffi/capi/bindings/dart/CanonicalCombiningClassMap.g.dart b/ffi/capi/bindings/dart/CanonicalCombiningClassMap.g.dart index 4415aa722e3..1ce182d7d67 100644 --- a/ffi/capi/bindings/dart/CanonicalCombiningClassMap.g.dart +++ b/ffi/capi/bindings/dart/CanonicalCombiningClassMap.g.dart @@ -28,11 +28,11 @@ final class CanonicalCombiningClassMap implements ffi.Finalizable { /// /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalCombiningClassMap.html#method.new) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CanonicalCombiningClassMap(DataProvider provider) { final result = _ICU4XCanonicalCombiningClassMap_create(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CanonicalCombiningClassMap._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/CanonicalComposition.g.dart b/ffi/capi/bindings/dart/CanonicalComposition.g.dart index 831d29dee73..8242be6377a 100644 --- a/ffi/capi/bindings/dart/CanonicalComposition.g.dart +++ b/ffi/capi/bindings/dart/CanonicalComposition.g.dart @@ -30,11 +30,11 @@ final class CanonicalComposition implements ffi.Finalizable { /// /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalComposition.html#method.new) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CanonicalComposition(DataProvider provider) { final result = _ICU4XCanonicalComposition_create(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CanonicalComposition._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/CanonicalDecomposition.g.dart b/ffi/capi/bindings/dart/CanonicalDecomposition.g.dart index 0d26b3fc3eb..032e3b9736b 100644 --- a/ffi/capi/bindings/dart/CanonicalDecomposition.g.dart +++ b/ffi/capi/bindings/dart/CanonicalDecomposition.g.dart @@ -30,11 +30,11 @@ final class CanonicalDecomposition implements ffi.Finalizable { /// /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalDecomposition.html#method.new) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CanonicalDecomposition(DataProvider provider) { final result = _ICU4XCanonicalDecomposition_create(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CanonicalDecomposition._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/CaseMapCloser.g.dart b/ffi/capi/bindings/dart/CaseMapCloser.g.dart index e1c5e836ffa..f6c7aef8d19 100644 --- a/ffi/capi/bindings/dart/CaseMapCloser.g.dart +++ b/ffi/capi/bindings/dart/CaseMapCloser.g.dart @@ -26,11 +26,11 @@ final class CaseMapCloser implements ffi.Finalizable { /// /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/casemap/struct.CaseMapCloser.html#method.new) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CaseMapCloser(DataProvider provider) { final result = _ICU4XCaseMapCloser_create(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CaseMapCloser._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/CaseMapper.g.dart b/ffi/capi/bindings/dart/CaseMapper.g.dart index 77f2ed9bbfc..fa10a9d485a 100644 --- a/ffi/capi/bindings/dart/CaseMapper.g.dart +++ b/ffi/capi/bindings/dart/CaseMapper.g.dart @@ -26,11 +26,11 @@ final class CaseMapper implements ffi.Finalizable { /// /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.new) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CaseMapper(DataProvider provider) { final result = _ICU4XCaseMapper_create(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CaseMapper._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/CodePointMapData16.g.dart b/ffi/capi/bindings/dart/CodePointMapData16.g.dart index 45827973563..d228e982864 100644 --- a/ffi/capi/bindings/dart/CodePointMapData16.g.dart +++ b/ffi/capi/bindings/dart/CodePointMapData16.g.dart @@ -68,11 +68,11 @@ final class CodePointMapData16 implements ffi.Finalizable { /// See the [Rust documentation for `script`](https://docs.rs/icu/latest/icu/properties/maps/fn.script.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointMapData16.script(DataProvider provider) { final result = _ICU4XCodePointMapData16_load_script(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointMapData16._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/CodePointMapData8.g.dart b/ffi/capi/bindings/dart/CodePointMapData8.g.dart index 0d2f8e7b79e..d270e2ca467 100644 --- a/ffi/capi/bindings/dart/CodePointMapData8.g.dart +++ b/ffi/capi/bindings/dart/CodePointMapData8.g.dart @@ -95,110 +95,110 @@ final class CodePointMapData8 implements ffi.Finalizable { /// See the [Rust documentation for `general_category`](https://docs.rs/icu/latest/icu/properties/maps/fn.general_category.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointMapData8.generalCategory(DataProvider provider) { final result = _ICU4XCodePointMapData8_load_general_category(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointMapData8._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `bidi_class`](https://docs.rs/icu/latest/icu/properties/maps/fn.bidi_class.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointMapData8.bidiClass(DataProvider provider) { final result = _ICU4XCodePointMapData8_load_bidi_class(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointMapData8._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `east_asian_width`](https://docs.rs/icu/latest/icu/properties/maps/fn.east_asian_width.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointMapData8.eastAsianWidth(DataProvider provider) { final result = _ICU4XCodePointMapData8_load_east_asian_width(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointMapData8._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `hangul_syllable_type`](https://docs.rs/icu/latest/icu/properties/maps/fn.hangul_syllable_type.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointMapData8.hangulSyllableType(DataProvider provider) { final result = _ICU4XCodePointMapData8_load_hangul_syllable_type(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointMapData8._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `indic_syllabic_category`](https://docs.rs/icu/latest/icu/properties/maps/fn.indic_syllabic_category.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointMapData8.indicSyllabicCategory(DataProvider provider) { final result = _ICU4XCodePointMapData8_load_indic_syllabic_category(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointMapData8._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `line_break`](https://docs.rs/icu/latest/icu/properties/maps/fn.line_break.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointMapData8.lineBreak(DataProvider provider) { final result = _ICU4XCodePointMapData8_load_line_break(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointMapData8._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `grapheme_cluster_break`](https://docs.rs/icu/latest/icu/properties/maps/fn.grapheme_cluster_break.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. static CodePointMapData8 tryGraphemeClusterBreak(DataProvider provider) { final result = _ICU4XCodePointMapData8_try_grapheme_cluster_break(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointMapData8._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `word_break`](https://docs.rs/icu/latest/icu/properties/maps/fn.word_break.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointMapData8.wordBreak(DataProvider provider) { final result = _ICU4XCodePointMapData8_load_word_break(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointMapData8._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `sentence_break`](https://docs.rs/icu/latest/icu/properties/maps/fn.sentence_break.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointMapData8.sentenceBreak(DataProvider provider) { final result = _ICU4XCodePointMapData8_load_sentence_break(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointMapData8._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `joining_type`](https://docs.rs/icu/latest/icu/properties/maps/fn.joining_type.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointMapData8.joiningType(DataProvider provider) { final result = _ICU4XCodePointMapData8_load_joining_type(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointMapData8._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/CodePointSetData.g.dart b/ffi/capi/bindings/dart/CodePointSetData.g.dart index 11dd245fac3..e8826e0c493 100644 --- a/ffi/capi/bindings/dart/CodePointSetData.g.dart +++ b/ffi/capi/bindings/dart/CodePointSetData.g.dart @@ -60,726 +60,726 @@ final class CodePointSetData implements ffi.Finalizable { /// /// See the [Rust documentation for `for_general_category_group`](https://docs.rs/icu/latest/icu/properties/sets/fn.for_general_category_group.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.forGeneralCategoryGroup(DataProvider provider, int group) { final result = _ICU4XCodePointSetData_load_for_general_category_group(provider._ffi, group); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `ascii_hex_digit`](https://docs.rs/icu/latest/icu/properties/sets/fn.ascii_hex_digit.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.asciiHexDigit(DataProvider provider) { final result = _ICU4XCodePointSetData_load_ascii_hex_digit(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `alnum`](https://docs.rs/icu/latest/icu/properties/sets/fn.alnum.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.alnum(DataProvider provider) { final result = _ICU4XCodePointSetData_load_alnum(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `alphabetic`](https://docs.rs/icu/latest/icu/properties/sets/fn.alphabetic.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.alphabetic(DataProvider provider) { final result = _ICU4XCodePointSetData_load_alphabetic(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `bidi_control`](https://docs.rs/icu/latest/icu/properties/sets/fn.bidi_control.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.bidiControl(DataProvider provider) { final result = _ICU4XCodePointSetData_load_bidi_control(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `bidi_mirrored`](https://docs.rs/icu/latest/icu/properties/sets/fn.bidi_mirrored.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.bidiMirrored(DataProvider provider) { final result = _ICU4XCodePointSetData_load_bidi_mirrored(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `blank`](https://docs.rs/icu/latest/icu/properties/sets/fn.blank.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.blank(DataProvider provider) { final result = _ICU4XCodePointSetData_load_blank(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `cased`](https://docs.rs/icu/latest/icu/properties/sets/fn.cased.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.cased(DataProvider provider) { final result = _ICU4XCodePointSetData_load_cased(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `case_ignorable`](https://docs.rs/icu/latest/icu/properties/sets/fn.case_ignorable.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.caseIgnorable(DataProvider provider) { final result = _ICU4XCodePointSetData_load_case_ignorable(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `full_composition_exclusion`](https://docs.rs/icu/latest/icu/properties/sets/fn.full_composition_exclusion.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.fullCompositionExclusion(DataProvider provider) { final result = _ICU4XCodePointSetData_load_full_composition_exclusion(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `changes_when_casefolded`](https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_casefolded.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.changesWhenCasefolded(DataProvider provider) { final result = _ICU4XCodePointSetData_load_changes_when_casefolded(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `changes_when_casemapped`](https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_casemapped.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.changesWhenCasemapped(DataProvider provider) { final result = _ICU4XCodePointSetData_load_changes_when_casemapped(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `changes_when_nfkc_casefolded`](https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_nfkc_casefolded.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.changesWhenNfkcCasefolded(DataProvider provider) { final result = _ICU4XCodePointSetData_load_changes_when_nfkc_casefolded(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `changes_when_lowercased`](https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_lowercased.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.changesWhenLowercased(DataProvider provider) { final result = _ICU4XCodePointSetData_load_changes_when_lowercased(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `changes_when_titlecased`](https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_titlecased.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.changesWhenTitlecased(DataProvider provider) { final result = _ICU4XCodePointSetData_load_changes_when_titlecased(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `changes_when_uppercased`](https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_uppercased.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.changesWhenUppercased(DataProvider provider) { final result = _ICU4XCodePointSetData_load_changes_when_uppercased(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `dash`](https://docs.rs/icu/latest/icu/properties/sets/fn.dash.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.dash(DataProvider provider) { final result = _ICU4XCodePointSetData_load_dash(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `deprecated`](https://docs.rs/icu/latest/icu/properties/sets/fn.deprecated.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.deprecated(DataProvider provider) { final result = _ICU4XCodePointSetData_load_deprecated(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `default_ignorable_code_point`](https://docs.rs/icu/latest/icu/properties/sets/fn.default_ignorable_code_point.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.defaultIgnorableCodePoint(DataProvider provider) { final result = _ICU4XCodePointSetData_load_default_ignorable_code_point(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `diacritic`](https://docs.rs/icu/latest/icu/properties/sets/fn.diacritic.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.diacritic(DataProvider provider) { final result = _ICU4XCodePointSetData_load_diacritic(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `emoji_modifier_base`](https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_modifier_base.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.emojiModifierBase(DataProvider provider) { final result = _ICU4XCodePointSetData_load_emoji_modifier_base(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `emoji_component`](https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_component.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.emojiComponent(DataProvider provider) { final result = _ICU4XCodePointSetData_load_emoji_component(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `emoji_modifier`](https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_modifier.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.emojiModifier(DataProvider provider) { final result = _ICU4XCodePointSetData_load_emoji_modifier(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `emoji`](https://docs.rs/icu/latest/icu/properties/sets/fn.emoji.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.emoji(DataProvider provider) { final result = _ICU4XCodePointSetData_load_emoji(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `emoji_presentation`](https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_presentation.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.emojiPresentation(DataProvider provider) { final result = _ICU4XCodePointSetData_load_emoji_presentation(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `extender`](https://docs.rs/icu/latest/icu/properties/sets/fn.extender.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.extender(DataProvider provider) { final result = _ICU4XCodePointSetData_load_extender(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `extended_pictographic`](https://docs.rs/icu/latest/icu/properties/sets/fn.extended_pictographic.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.extendedPictographic(DataProvider provider) { final result = _ICU4XCodePointSetData_load_extended_pictographic(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `graph`](https://docs.rs/icu/latest/icu/properties/sets/fn.graph.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.graph(DataProvider provider) { final result = _ICU4XCodePointSetData_load_graph(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `grapheme_base`](https://docs.rs/icu/latest/icu/properties/sets/fn.grapheme_base.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.graphemeBase(DataProvider provider) { final result = _ICU4XCodePointSetData_load_grapheme_base(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `grapheme_extend`](https://docs.rs/icu/latest/icu/properties/sets/fn.grapheme_extend.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.graphemeExtend(DataProvider provider) { final result = _ICU4XCodePointSetData_load_grapheme_extend(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `grapheme_link`](https://docs.rs/icu/latest/icu/properties/sets/fn.grapheme_link.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.graphemeLink(DataProvider provider) { final result = _ICU4XCodePointSetData_load_grapheme_link(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `hex_digit`](https://docs.rs/icu/latest/icu/properties/sets/fn.hex_digit.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.hexDigit(DataProvider provider) { final result = _ICU4XCodePointSetData_load_hex_digit(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `hyphen`](https://docs.rs/icu/latest/icu/properties/sets/fn.hyphen.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.hyphen(DataProvider provider) { final result = _ICU4XCodePointSetData_load_hyphen(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `id_continue`](https://docs.rs/icu/latest/icu/properties/sets/fn.id_continue.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.idContinue(DataProvider provider) { final result = _ICU4XCodePointSetData_load_id_continue(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `ideographic`](https://docs.rs/icu/latest/icu/properties/sets/fn.ideographic.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.ideographic(DataProvider provider) { final result = _ICU4XCodePointSetData_load_ideographic(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `id_start`](https://docs.rs/icu/latest/icu/properties/sets/fn.id_start.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.idStart(DataProvider provider) { final result = _ICU4XCodePointSetData_load_id_start(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `ids_binary_operator`](https://docs.rs/icu/latest/icu/properties/sets/fn.ids_binary_operator.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.idsBinaryOperator(DataProvider provider) { final result = _ICU4XCodePointSetData_load_ids_binary_operator(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `ids_trinary_operator`](https://docs.rs/icu/latest/icu/properties/sets/fn.ids_trinary_operator.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.idsTrinaryOperator(DataProvider provider) { final result = _ICU4XCodePointSetData_load_ids_trinary_operator(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `join_control`](https://docs.rs/icu/latest/icu/properties/sets/fn.join_control.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.joinControl(DataProvider provider) { final result = _ICU4XCodePointSetData_load_join_control(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `logical_order_exception`](https://docs.rs/icu/latest/icu/properties/sets/fn.logical_order_exception.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.logicalOrderException(DataProvider provider) { final result = _ICU4XCodePointSetData_load_logical_order_exception(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `lowercase`](https://docs.rs/icu/latest/icu/properties/sets/fn.lowercase.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.lowercase(DataProvider provider) { final result = _ICU4XCodePointSetData_load_lowercase(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `math`](https://docs.rs/icu/latest/icu/properties/sets/fn.math.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.math(DataProvider provider) { final result = _ICU4XCodePointSetData_load_math(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `noncharacter_code_point`](https://docs.rs/icu/latest/icu/properties/sets/fn.noncharacter_code_point.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.noncharacterCodePoint(DataProvider provider) { final result = _ICU4XCodePointSetData_load_noncharacter_code_point(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `nfc_inert`](https://docs.rs/icu/latest/icu/properties/sets/fn.nfc_inert.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.nfcInert(DataProvider provider) { final result = _ICU4XCodePointSetData_load_nfc_inert(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `nfd_inert`](https://docs.rs/icu/latest/icu/properties/sets/fn.nfd_inert.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.nfdInert(DataProvider provider) { final result = _ICU4XCodePointSetData_load_nfd_inert(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `nfkc_inert`](https://docs.rs/icu/latest/icu/properties/sets/fn.nfkc_inert.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.nfkcInert(DataProvider provider) { final result = _ICU4XCodePointSetData_load_nfkc_inert(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `nfkd_inert`](https://docs.rs/icu/latest/icu/properties/sets/fn.nfkd_inert.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.nfkdInert(DataProvider provider) { final result = _ICU4XCodePointSetData_load_nfkd_inert(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `pattern_syntax`](https://docs.rs/icu/latest/icu/properties/sets/fn.pattern_syntax.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.patternSyntax(DataProvider provider) { final result = _ICU4XCodePointSetData_load_pattern_syntax(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `pattern_white_space`](https://docs.rs/icu/latest/icu/properties/sets/fn.pattern_white_space.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.patternWhiteSpace(DataProvider provider) { final result = _ICU4XCodePointSetData_load_pattern_white_space(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `prepended_concatenation_mark`](https://docs.rs/icu/latest/icu/properties/sets/fn.prepended_concatenation_mark.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.prependedConcatenationMark(DataProvider provider) { final result = _ICU4XCodePointSetData_load_prepended_concatenation_mark(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `print`](https://docs.rs/icu/latest/icu/properties/sets/fn.print.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.print(DataProvider provider) { final result = _ICU4XCodePointSetData_load_print(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `quotation_mark`](https://docs.rs/icu/latest/icu/properties/sets/fn.quotation_mark.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.quotationMark(DataProvider provider) { final result = _ICU4XCodePointSetData_load_quotation_mark(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `radical`](https://docs.rs/icu/latest/icu/properties/sets/fn.radical.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.radical(DataProvider provider) { final result = _ICU4XCodePointSetData_load_radical(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `regional_indicator`](https://docs.rs/icu/latest/icu/properties/sets/fn.regional_indicator.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.regionalIndicator(DataProvider provider) { final result = _ICU4XCodePointSetData_load_regional_indicator(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `soft_dotted`](https://docs.rs/icu/latest/icu/properties/sets/fn.soft_dotted.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.softDotted(DataProvider provider) { final result = _ICU4XCodePointSetData_load_soft_dotted(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `segment_starter`](https://docs.rs/icu/latest/icu/properties/sets/fn.segment_starter.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.segmentStarter(DataProvider provider) { final result = _ICU4XCodePointSetData_load_segment_starter(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `case_sensitive`](https://docs.rs/icu/latest/icu/properties/sets/fn.case_sensitive.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.caseSensitive(DataProvider provider) { final result = _ICU4XCodePointSetData_load_case_sensitive(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `sentence_terminal`](https://docs.rs/icu/latest/icu/properties/sets/fn.sentence_terminal.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.sentenceTerminal(DataProvider provider) { final result = _ICU4XCodePointSetData_load_sentence_terminal(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `terminal_punctuation`](https://docs.rs/icu/latest/icu/properties/sets/fn.terminal_punctuation.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.terminalPunctuation(DataProvider provider) { final result = _ICU4XCodePointSetData_load_terminal_punctuation(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `unified_ideograph`](https://docs.rs/icu/latest/icu/properties/sets/fn.unified_ideograph.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.unifiedIdeograph(DataProvider provider) { final result = _ICU4XCodePointSetData_load_unified_ideograph(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `uppercase`](https://docs.rs/icu/latest/icu/properties/sets/fn.uppercase.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.uppercase(DataProvider provider) { final result = _ICU4XCodePointSetData_load_uppercase(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `variation_selector`](https://docs.rs/icu/latest/icu/properties/sets/fn.variation_selector.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.variationSelector(DataProvider provider) { final result = _ICU4XCodePointSetData_load_variation_selector(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `white_space`](https://docs.rs/icu/latest/icu/properties/sets/fn.white_space.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.whiteSpace(DataProvider provider) { final result = _ICU4XCodePointSetData_load_white_space(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `xdigit`](https://docs.rs/icu/latest/icu/properties/sets/fn.xdigit.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.xdigit(DataProvider provider) { final result = _ICU4XCodePointSetData_load_xdigit(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `xid_continue`](https://docs.rs/icu/latest/icu/properties/sets/fn.xid_continue.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.xidContinue(DataProvider provider) { final result = _ICU4XCodePointSetData_load_xid_continue(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `xid_start`](https://docs.rs/icu/latest/icu/properties/sets/fn.xid_start.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory CodePointSetData.xidStart(DataProvider provider) { final result = _ICU4XCodePointSetData_load_xid_start(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return CodePointSetData._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/Collator.g.dart b/ffi/capi/bindings/dart/Collator.g.dart index 14738386f22..42dff840476 100644 --- a/ffi/capi/bindings/dart/Collator.g.dart +++ b/ffi/capi/bindings/dart/Collator.g.dart @@ -26,13 +26,13 @@ final class Collator implements ffi.Finalizable { /// /// See the [Rust documentation for `try_new`](https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.try_new) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory Collator(DataProvider provider, Locale locale, CollatorOptions options) { final temp = ffi2.Arena(); final result = _ICU4XCollator_create_v1(provider._ffi, locale._ffi, options._toFfi(temp)); temp.releaseAll(); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return Collator._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/ComposingNormalizer.g.dart b/ffi/capi/bindings/dart/ComposingNormalizer.g.dart index 3c8242f83d6..4ed67781843 100644 --- a/ffi/capi/bindings/dart/ComposingNormalizer.g.dart +++ b/ffi/capi/bindings/dart/ComposingNormalizer.g.dart @@ -26,11 +26,11 @@ final class ComposingNormalizer implements ffi.Finalizable { /// /// See the [Rust documentation for `new_nfc`](https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.new_nfc) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory ComposingNormalizer.nfc(DataProvider provider) { final result = _ICU4XComposingNormalizer_create_nfc(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return ComposingNormalizer._fromFfi(result.union.ok, []); } @@ -39,11 +39,11 @@ final class ComposingNormalizer implements ffi.Finalizable { /// /// See the [Rust documentation for `new_nfkc`](https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.new_nfkc) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory ComposingNormalizer.nfkc(DataProvider provider) { final result = _ICU4XComposingNormalizer_create_nfkc(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return ComposingNormalizer._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/CustomTimeZone.g.dart b/ffi/capi/bindings/dart/CustomTimeZone.g.dart index 381c6545457..3d7e9cc661c 100644 --- a/ffi/capi/bindings/dart/CustomTimeZone.g.dart +++ b/ffi/capi/bindings/dart/CustomTimeZone.g.dart @@ -26,14 +26,14 @@ final class CustomTimeZone implements ffi.Finalizable { /// /// See the [Rust documentation for `from_str`](https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#method.from_str) for more information. /// - /// Throws [Error] on failure. + /// Throws [TimeZoneInvalidOffsetError] on failure. factory CustomTimeZone.fromString(String s) { final temp = ffi2.Arena(); final sView = s.utf8View; final result = _ICU4XCustomTimeZone_create_from_string(sView.allocIn(temp), sView.length); temp.releaseAll(); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw TimeZoneInvalidOffsetError.values[result.union.err]; } return CustomTimeZone._fromFfi(result.union.ok, []); } @@ -78,11 +78,11 @@ final class CustomTimeZone implements ffi.Finalizable { /// /// Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html) /// - /// Throws [Error] on failure. + /// Throws [TimeZoneInvalidOffsetError] on failure. void trySetGmtOffsetSeconds(int offsetSeconds) { final result = _ICU4XCustomTimeZone_try_set_gmt_offset_seconds(_ffi, offsetSeconds); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw TimeZoneInvalidOffsetError.values[result.union.err]; } } @@ -171,14 +171,14 @@ final class CustomTimeZone implements ffi.Finalizable { /// /// Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneBcp47Id.html) /// - /// Throws [Error] on failure. + /// Throws [TimeZoneInvalidIdError] on failure. void trySetTimeZoneId(String id) { final temp = ffi2.Arena(); final idView = id.utf8View; final result = _ICU4XCustomTimeZone_try_set_time_zone_id(_ffi, idView.allocIn(temp), idView.length); temp.releaseAll(); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw TimeZoneInvalidIdError.values[result.union.err]; } } @@ -188,14 +188,14 @@ final class CustomTimeZone implements ffi.Finalizable { /// /// Errors if the string is not a valid BCP-47 time zone ID. /// - /// Throws [Error] on failure. + /// Throws [TimeZoneInvalidIdError] on failure. void trySetIanaTimeZoneId(TimeZoneIdMapper mapper, String id) { final temp = ffi2.Arena(); final idView = id.utf8View; final result = _ICU4XCustomTimeZone_try_set_iana_time_zone_id(_ffi, mapper._ffi, idView.allocIn(temp), idView.length); temp.releaseAll(); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw TimeZoneInvalidIdError.values[result.union.err]; } } @@ -233,14 +233,14 @@ final class CustomTimeZone implements ffi.Finalizable { /// /// Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.MetazoneId.html) /// - /// Throws [Error] on failure. + /// Throws [TimeZoneInvalidIdError] on failure. void trySetMetazoneId(String id) { final temp = ffi2.Arena(); final idView = id.utf8View; final result = _ICU4XCustomTimeZone_try_set_metazone_id(_ffi, idView.allocIn(temp), idView.length); temp.releaseAll(); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw TimeZoneInvalidIdError.values[result.union.err]; } } diff --git a/ffi/capi/bindings/dart/DataError.g.dart b/ffi/capi/bindings/dart/DataError.g.dart new file mode 100644 index 00000000000..eb1c1610abd --- /dev/null +++ b/ffi/capi/bindings/dart/DataError.g.dart @@ -0,0 +1,38 @@ +// generated by diplomat-tool + +part of 'lib.g.dart'; + +/// Additional information: [1](https://docs.rs/icu/latest/icu/provider/struct.DataError.html), [2](https://docs.rs/icu/latest/icu/provider/enum.DataErrorKind.html) +enum DataError { + unknown, + + missingDataMarker, + + missingVariant, + + missingLocale, + + needsVariant, + + needsLocale, + + extraneousLocale, + + filteredResource, + + mismatchedType, + + missingPayload, + + invalidState, + + custom, + + io, + + unavailableBufferFormat, + + mismatchedAnyBuffer, + + dataStructValidityError; +} diff --git a/ffi/capi/bindings/dart/DataProvider.g.dart b/ffi/capi/bindings/dart/DataProvider.g.dart index d68f328b5ae..b107ab2db91 100644 --- a/ffi/capi/bindings/dart/DataProvider.g.dart +++ b/ffi/capi/bindings/dart/DataProvider.g.dart @@ -39,14 +39,14 @@ final class DataProvider implements ffi.Finalizable { /// /// See the [Rust documentation for `BlobDataProvider`](https://docs.rs/icu_provider_blob/latest/icu_provider_blob/struct.BlobDataProvider.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory DataProvider.fromByteSlice(ByteBuffer blob) { final temp = ffi2.Arena(); final blobView = blob; final result = _ICU4XDataProvider_create_from_byte_slice(blobView.allocIn(temp), blobView.length); temp.releaseAll(); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return DataProvider._fromFfi(result.union.ok, []); } @@ -70,11 +70,11 @@ final class DataProvider implements ffi.Finalizable { /// /// See the [Rust documentation for `ForkByMarkerProvider`](https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fork/type.ForkByMarkerProvider.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. void forkByKey(DataProvider other) { final result = _ICU4XDataProvider_fork_by_key(_ffi, other._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } } @@ -83,11 +83,11 @@ final class DataProvider implements ffi.Finalizable { /// /// See the [Rust documentation for `MissingLocalePredicate`](https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fork/predicates/struct.MissingLocalePredicate.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. void forkByLocale(DataProvider other) { final result = _ICU4XDataProvider_fork_by_locale(_ffi, other._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } } @@ -100,11 +100,11 @@ final class DataProvider implements ffi.Finalizable { /// /// Additional information: [1](https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html) /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. void enableLocaleFallback() { final result = _ICU4XDataProvider_enable_locale_fallback(_ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } } @@ -113,11 +113,11 @@ final class DataProvider implements ffi.Finalizable { /// /// Additional information: [1](https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html) /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. void enableLocaleFallbackWith(LocaleFallbacker fallbacker) { final result = _ICU4XDataProvider_enable_locale_fallback_with(_ffi, fallbacker._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } } diff --git a/ffi/capi/bindings/dart/Date.g.dart b/ffi/capi/bindings/dart/Date.g.dart index f2d729632f7..c3abebe70a3 100644 --- a/ffi/capi/bindings/dart/Date.g.dart +++ b/ffi/capi/bindings/dart/Date.g.dart @@ -29,11 +29,11 @@ final class Date implements ffi.Finalizable { /// /// See the [Rust documentation for `new_from_iso`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.new_from_iso) for more information. /// - /// Throws [Error] on failure. + /// Throws [CalendarError] on failure. factory Date.fromIsoInCalendar(int year, int month, int day, Calendar calendar) { final result = _ICU4XDate_create_from_iso_in_calendar(year, month, day, calendar._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw CalendarError.values[result.union.err]; } return Date._fromFfi(result.union.ok, []); } @@ -42,7 +42,7 @@ final class Date implements ffi.Finalizable { /// /// See the [Rust documentation for `try_new_from_codes`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.try_new_from_codes) for more information. /// - /// Throws [Error] on failure. + /// Throws [CalendarError] on failure. factory Date.fromCodesInCalendar(String eraCode, int year, String monthCode, int day, Calendar calendar) { final temp = ffi2.Arena(); final eraCodeView = eraCode.utf8View; @@ -50,7 +50,7 @@ final class Date implements ffi.Finalizable { final result = _ICU4XDate_create_from_codes_in_calendar(eraCodeView.allocIn(temp), eraCodeView.length, year, monthCodeView.allocIn(temp), monthCodeView.length, day, calendar._ffi); temp.releaseAll(); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw CalendarError.values[result.union.err]; } return Date._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/DateTime.g.dart b/ffi/capi/bindings/dart/DateTime.g.dart index 36cb52330a2..501cc1b1793 100644 --- a/ffi/capi/bindings/dart/DateTime.g.dart +++ b/ffi/capi/bindings/dart/DateTime.g.dart @@ -29,11 +29,11 @@ final class DateTime implements ffi.Finalizable { /// /// See the [Rust documentation for `new_from_iso`](https://docs.rs/icu/latest/icu/struct.DateTime.html#method.new_from_iso) for more information. /// - /// Throws [Error] on failure. + /// Throws [CalendarError] on failure. factory DateTime.fromIsoInCalendar(int year, int month, int day, int hour, int minute, int second, int nanosecond, Calendar calendar) { final result = _ICU4XDateTime_create_from_iso_in_calendar(year, month, day, hour, minute, second, nanosecond, calendar._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw CalendarError.values[result.union.err]; } return DateTime._fromFfi(result.union.ok, []); } @@ -42,7 +42,7 @@ final class DateTime implements ffi.Finalizable { /// /// See the [Rust documentation for `try_new_from_codes`](https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.try_new_from_codes) for more information. /// - /// Throws [Error] on failure. + /// Throws [CalendarError] on failure. factory DateTime.fromCodesInCalendar(String eraCode, int year, String monthCode, int day, int hour, int minute, int second, int nanosecond, Calendar calendar) { final temp = ffi2.Arena(); final eraCodeView = eraCode.utf8View; @@ -50,7 +50,7 @@ final class DateTime implements ffi.Finalizable { final result = _ICU4XDateTime_create_from_codes_in_calendar(eraCodeView.allocIn(temp), eraCodeView.length, year, monthCodeView.allocIn(temp), monthCodeView.length, day, hour, minute, second, nanosecond, calendar._ffi); temp.releaseAll(); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw CalendarError.values[result.union.err]; } return DateTime._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/DecomposingNormalizer.g.dart b/ffi/capi/bindings/dart/DecomposingNormalizer.g.dart index 461ff546b4e..4af5ec26b47 100644 --- a/ffi/capi/bindings/dart/DecomposingNormalizer.g.dart +++ b/ffi/capi/bindings/dart/DecomposingNormalizer.g.dart @@ -26,11 +26,11 @@ final class DecomposingNormalizer implements ffi.Finalizable { /// /// See the [Rust documentation for `new_nfd`](https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.new_nfd) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory DecomposingNormalizer.nfd(DataProvider provider) { final result = _ICU4XDecomposingNormalizer_create_nfd(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return DecomposingNormalizer._fromFfi(result.union.ok, []); } @@ -39,11 +39,11 @@ final class DecomposingNormalizer implements ffi.Finalizable { /// /// See the [Rust documentation for `new_nfkd`](https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.new_nfkd) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory DecomposingNormalizer.nfkd(DataProvider provider) { final result = _ICU4XDecomposingNormalizer_create_nfkd(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return DecomposingNormalizer._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/Error.g.dart b/ffi/capi/bindings/dart/Error.g.dart index 4f4694ddea7..74e33d26254 100644 --- a/ffi/capi/bindings/dart/Error.g.dart +++ b/ffi/capi/bindings/dart/Error.g.dart @@ -2,11 +2,9 @@ part of 'lib.g.dart'; -/// A common enum for errors that ICU4X may return, organized by API +/// Legacy error /// -/// The error names are stable and can be checked against as strings in the JS API -/// -/// Additional information: [1](https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.ParseError.html), [2](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.LimitError.html), [3](https://docs.rs/icu/latest/icu/calendar/struct.RangeError.html), [4](https://docs.rs/icu/latest/icu/calendar/enum.DateError.html), [5](https://docs.rs/icu/latest/icu/datetime/enum.DateTimeError.html), [6](https://docs.rs/icu/latest/icu/locale/enum.ParseError.html), [7](https://docs.rs/icu/latest/icu/provider/struct.DataError.html), [8](https://docs.rs/icu/latest/icu/provider/enum.DataErrorKind.html), [9](https://docs.rs/icu/latest/icu/timezone/struct.InvalidOffsetError.html), [10](https://docs.rs/icu_experimental/latest/icu_experimental/units/struct.InvalidUnitError.html) +/// Additional information: [1](https://docs.rs/icu/latest/icu/datetime/enum.DateTimeError.html), [2](https://docs.rs/icu/latest/icu/provider/struct.DataError.html), [3](https://docs.rs/icu/latest/icu/provider/enum.DataErrorKind.html) enum Error { /// The error is not currently categorized as ICU4XError. /// Please file a bug @@ -40,30 +38,8 @@ enum Error { dataMismatchedAnyBufferError, - /// The locale or subtag string failed to parse - localeParserLanguageError, - - localeParserSubtagError, - - localeParserExtensionError, - - /// Attempted to construct an invalid data struct - dataStructValidityError, - propertyUnexpectedPropertyNameError, - fixedDecimalLimitError, - - fixedDecimalSyntaxError, - - pluralsParseError, - - calendarOutOfRangeError, - - calendarUnknownEraError, - - calendarUnknownMonthCodeError, - dateTimePatternError, dateTimeMissingInputFieldError, @@ -80,11 +56,7 @@ enum Error { dateTimeFixedDecimalError, - dateTimeMismatchedCalendarError, - - timeZoneInvalidOffsetError, - - timeZoneInvalidIdError; + dateTimeMismatchedCalendarError; int get _ffi { switch (this) { @@ -118,28 +90,8 @@ enum Error { return 268; case dataMismatchedAnyBufferError: return 269; - case localeParserLanguageError: - return 513; - case localeParserSubtagError: - return 514; - case localeParserExtensionError: - return 515; - case dataStructValidityError: - return 768; case propertyUnexpectedPropertyNameError: return 1026; - case fixedDecimalLimitError: - return 1280; - case fixedDecimalSyntaxError: - return 1281; - case pluralsParseError: - return 1536; - case calendarOutOfRangeError: - return 1795; - case calendarUnknownEraError: - return 1796; - case calendarUnknownMonthCodeError: - return 1797; case dateTimePatternError: return 2048; case dateTimeMissingInputFieldError: @@ -158,10 +110,6 @@ enum Error { return 2055; case dateTimeMismatchedCalendarError: return 2056; - case timeZoneInvalidOffsetError: - return 2561; - case timeZoneInvalidIdError: - return 2563; } } } diff --git a/ffi/capi/bindings/dart/FixedDecimal.g.dart b/ffi/capi/bindings/dart/FixedDecimal.g.dart index d6d9d936c8c..46caff70076 100644 --- a/ffi/capi/bindings/dart/FixedDecimal.g.dart +++ b/ffi/capi/bindings/dart/FixedDecimal.g.dart @@ -36,11 +36,11 @@ final class FixedDecimal implements ffi.Finalizable { /// /// See the [Rust documentation for `FloatPrecision`](https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [FixedDecimalLimitError] on failure. factory FixedDecimal.fromDoubleWithLowerMagnitude(double f, int magnitude) { final result = _ICU4XFixedDecimal_create_from_f64_with_lower_magnitude(f, magnitude); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw FixedDecimalLimitError.values[result.union.err]; } return FixedDecimal._fromFfi(result.union.ok, []); } @@ -51,11 +51,11 @@ final class FixedDecimal implements ffi.Finalizable { /// /// See the [Rust documentation for `FloatPrecision`](https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [FixedDecimalLimitError] on failure. factory FixedDecimal.fromDoubleWithSignificantDigits(double f, int digits) { final result = _ICU4XFixedDecimal_create_from_f64_with_significant_digits(f, digits); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw FixedDecimalLimitError.values[result.union.err]; } return FixedDecimal._fromFfi(result.union.ok, []); } @@ -67,11 +67,11 @@ final class FixedDecimal implements ffi.Finalizable { /// /// See the [Rust documentation for `FloatPrecision`](https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [FixedDecimalLimitError] on failure. factory FixedDecimal.fromDoubleWithDoublePrecision(double f) { final result = _ICU4XFixedDecimal_create_from_f64_with_floating_precision(f); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw FixedDecimalLimitError.values[result.union.err]; } return FixedDecimal._fromFfi(result.union.ok, []); } @@ -80,14 +80,14 @@ final class FixedDecimal implements ffi.Finalizable { /// /// See the [Rust documentation for `from_str`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.from_str) for more information. /// - /// Throws [Error] on failure. + /// Throws [FixedDecimalParseError] on failure. factory FixedDecimal.fromString(String v) { final temp = ffi2.Arena(); final vView = v.utf8View; final result = _ICU4XFixedDecimal_create_from_string(vView.allocIn(temp), vView.length); temp.releaseAll(); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw FixedDecimalParseError.values[result.union.err]; } return FixedDecimal._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/FixedDecimalFormatter.g.dart b/ffi/capi/bindings/dart/FixedDecimalFormatter.g.dart index 6dc6b6da9b5..802d8b653e2 100644 --- a/ffi/capi/bindings/dart/FixedDecimalFormatter.g.dart +++ b/ffi/capi/bindings/dart/FixedDecimalFormatter.g.dart @@ -28,11 +28,11 @@ final class FixedDecimalFormatter implements ffi.Finalizable { /// /// See the [Rust documentation for `try_new`](https://docs.rs/icu/latest/icu/decimal/struct.FixedDecimalFormatter.html#method.try_new) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory FixedDecimalFormatter.withGroupingStrategy(DataProvider provider, Locale locale, FixedDecimalGroupingStrategy groupingStrategy) { final result = _ICU4XFixedDecimalFormatter_create_with_grouping_strategy(provider._ffi, locale._ffi, groupingStrategy.index); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return FixedDecimalFormatter._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/FixedDecimalLimitError.g.dart b/ffi/capi/bindings/dart/FixedDecimalLimitError.g.dart new file mode 100644 index 00000000000..ae93d25d8a9 --- /dev/null +++ b/ffi/capi/bindings/dart/FixedDecimalLimitError.g.dart @@ -0,0 +1,8 @@ +// generated by diplomat-tool + +part of 'lib.g.dart'; + +/// Additional information: [1](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.LimitError.html) +enum FixedDecimalLimitError { + todoZst; +} diff --git a/ffi/capi/bindings/dart/FixedDecimalParseError.g.dart b/ffi/capi/bindings/dart/FixedDecimalParseError.g.dart new file mode 100644 index 00000000000..2de4ce3aff4 --- /dev/null +++ b/ffi/capi/bindings/dart/FixedDecimalParseError.g.dart @@ -0,0 +1,12 @@ +// generated by diplomat-tool + +part of 'lib.g.dart'; + +/// Additional information: [1](https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.ParseError.html) +enum FixedDecimalParseError { + unknown, + + limit, + + syntax; +} diff --git a/ffi/capi/bindings/dart/GeneralCategoryNameToMaskMapper.g.dart b/ffi/capi/bindings/dart/GeneralCategoryNameToMaskMapper.g.dart index d083957c1f2..48a6d52e55b 100644 --- a/ffi/capi/bindings/dart/GeneralCategoryNameToMaskMapper.g.dart +++ b/ffi/capi/bindings/dart/GeneralCategoryNameToMaskMapper.g.dart @@ -50,11 +50,11 @@ final class GeneralCategoryNameToMaskMapper implements ffi.Finalizable { /// See the [Rust documentation for `name_to_enum_mapper`](https://docs.rs/icu/latest/icu/properties/struct.GeneralCategoryGroup.html#method.name_to_enum_mapper) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory GeneralCategoryNameToMaskMapper(DataProvider provider) { final result = _ICU4XGeneralCategoryNameToMaskMapper_load(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return GeneralCategoryNameToMaskMapper._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/GraphemeClusterSegmenter.g.dart b/ffi/capi/bindings/dart/GraphemeClusterSegmenter.g.dart index 2aa34245c82..ac77f1a2598 100644 --- a/ffi/capi/bindings/dart/GraphemeClusterSegmenter.g.dart +++ b/ffi/capi/bindings/dart/GraphemeClusterSegmenter.g.dart @@ -29,11 +29,11 @@ final class GraphemeClusterSegmenter implements ffi.Finalizable { /// /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.new) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory GraphemeClusterSegmenter(DataProvider provider) { final result = _ICU4XGraphemeClusterSegmenter_create(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return GraphemeClusterSegmenter._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/IsoDate.g.dart b/ffi/capi/bindings/dart/IsoDate.g.dart index d3f774e1a80..c6a4b7febc3 100644 --- a/ffi/capi/bindings/dart/IsoDate.g.dart +++ b/ffi/capi/bindings/dart/IsoDate.g.dart @@ -28,11 +28,11 @@ final class IsoDate implements ffi.Finalizable { /// /// See the [Rust documentation for `try_new_iso_date`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.try_new_iso_date) for more information. /// - /// Throws [Error] on failure. + /// Throws [CalendarError] on failure. factory IsoDate(int year, int month, int day) { final result = _ICU4XIsoDate_create(year, month, day); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw CalendarError.values[result.union.err]; } return IsoDate._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/IsoDateTime.g.dart b/ffi/capi/bindings/dart/IsoDateTime.g.dart index 12eef6a246f..399b1d75e9b 100644 --- a/ffi/capi/bindings/dart/IsoDateTime.g.dart +++ b/ffi/capi/bindings/dart/IsoDateTime.g.dart @@ -28,11 +28,11 @@ final class IsoDateTime implements ffi.Finalizable { /// /// See the [Rust documentation for `try_new_iso_datetime`](https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.try_new_iso_datetime) for more information. /// - /// Throws [Error] on failure. + /// Throws [CalendarError] on failure. factory IsoDateTime(int year, int month, int day, int hour, int minute, int second, int nanosecond) { final result = _ICU4XIsoDateTime_create(year, month, day, hour, minute, second, nanosecond); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw CalendarError.values[result.union.err]; } return IsoDateTime._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/LineSegmenter.g.dart b/ffi/capi/bindings/dart/LineSegmenter.g.dart index 01b4cde50e4..70eeb12b169 100644 --- a/ffi/capi/bindings/dart/LineSegmenter.g.dart +++ b/ffi/capi/bindings/dart/LineSegmenter.g.dart @@ -29,11 +29,11 @@ final class LineSegmenter implements ffi.Finalizable { /// /// See the [Rust documentation for `new_auto`](https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_auto) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory LineSegmenter.auto(DataProvider provider) { final result = _ICU4XLineSegmenter_create_auto(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return LineSegmenter._fromFfi(result.union.ok, []); } @@ -43,11 +43,11 @@ final class LineSegmenter implements ffi.Finalizable { /// /// See the [Rust documentation for `new_lstm`](https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_lstm) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory LineSegmenter.lstm(DataProvider provider) { final result = _ICU4XLineSegmenter_create_lstm(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return LineSegmenter._fromFfi(result.union.ok, []); } @@ -57,11 +57,11 @@ final class LineSegmenter implements ffi.Finalizable { /// /// See the [Rust documentation for `new_dictionary`](https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_dictionary) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory LineSegmenter.dictionary(DataProvider provider) { final result = _ICU4XLineSegmenter_create_dictionary(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return LineSegmenter._fromFfi(result.union.ok, []); } @@ -71,13 +71,13 @@ final class LineSegmenter implements ffi.Finalizable { /// /// See the [Rust documentation for `new_auto_with_options`](https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_auto_with_options) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory LineSegmenter.autoWithOptions(DataProvider provider, LineBreakOptions options) { final temp = ffi2.Arena(); final result = _ICU4XLineSegmenter_create_auto_with_options_v1(provider._ffi, options._toFfi(temp)); temp.releaseAll(); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return LineSegmenter._fromFfi(result.union.ok, []); } @@ -87,13 +87,13 @@ final class LineSegmenter implements ffi.Finalizable { /// /// See the [Rust documentation for `new_lstm_with_options`](https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_lstm_with_options) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory LineSegmenter.lstmWithOptions(DataProvider provider, LineBreakOptions options) { final temp = ffi2.Arena(); final result = _ICU4XLineSegmenter_create_lstm_with_options_v1(provider._ffi, options._toFfi(temp)); temp.releaseAll(); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return LineSegmenter._fromFfi(result.union.ok, []); } @@ -103,13 +103,13 @@ final class LineSegmenter implements ffi.Finalizable { /// /// See the [Rust documentation for `new_dictionary_with_options`](https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_dictionary_with_options) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory LineSegmenter.dictionaryWithOptions(DataProvider provider, LineBreakOptions options) { final temp = ffi2.Arena(); final result = _ICU4XLineSegmenter_create_dictionary_with_options_v1(provider._ffi, options._toFfi(temp)); temp.releaseAll(); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return LineSegmenter._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/ListFormatter.g.dart b/ffi/capi/bindings/dart/ListFormatter.g.dart index 1cdd084e349..19595afebf4 100644 --- a/ffi/capi/bindings/dart/ListFormatter.g.dart +++ b/ffi/capi/bindings/dart/ListFormatter.g.dart @@ -26,11 +26,11 @@ final class ListFormatter implements ffi.Finalizable { /// /// See the [Rust documentation for `try_new_and_with_length`](https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_and_with_length) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory ListFormatter.andWithLength(DataProvider provider, Locale locale, ListLength length) { final result = _ICU4XListFormatter_create_and_with_length(provider._ffi, locale._ffi, length.index); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return ListFormatter._fromFfi(result.union.ok, []); } @@ -39,11 +39,11 @@ final class ListFormatter implements ffi.Finalizable { /// /// See the [Rust documentation for `try_new_or_with_length`](https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_or_with_length) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory ListFormatter.orWithLength(DataProvider provider, Locale locale, ListLength length) { final result = _ICU4XListFormatter_create_or_with_length(provider._ffi, locale._ffi, length.index); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return ListFormatter._fromFfi(result.union.ok, []); } @@ -52,11 +52,11 @@ final class ListFormatter implements ffi.Finalizable { /// /// See the [Rust documentation for `try_new_unit_with_length`](https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_unit_with_length) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory ListFormatter.unitWithLength(DataProvider provider, Locale locale, ListLength length) { final result = _ICU4XListFormatter_create_unit_with_length(provider._ffi, locale._ffi, length.index); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return ListFormatter._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/Locale.g.dart b/ffi/capi/bindings/dart/Locale.g.dart index a9bcd549150..0ecd232481b 100644 --- a/ffi/capi/bindings/dart/Locale.g.dart +++ b/ffi/capi/bindings/dart/Locale.g.dart @@ -32,14 +32,14 @@ final class Locale implements ffi.Finalizable, core.Comparable { /// /// See the [Rust documentation for `try_from_bytes`](https://docs.rs/icu/latest/icu/locale/struct.Locale.html#method.try_from_bytes) for more information. /// - /// Throws [Error] on failure. + /// Throws [LocaleParseError] on failure. factory Locale.fromString(String name) { final temp = ffi2.Arena(); final nameView = name.utf8View; final result = _ICU4XLocale_create_from_string(nameView.allocIn(temp), nameView.length); temp.releaseAll(); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw LocaleParseError.values[result.union.err]; } return Locale._fromFfi(result.union.ok, []); } @@ -98,14 +98,14 @@ final class Locale implements ffi.Finalizable, core.Comparable { /// /// See the [Rust documentation for `try_from_bytes`](https://docs.rs/icu/latest/icu/locale/struct.Locale.html#method.try_from_bytes) for more information. /// - /// Throws [Error] on failure. + /// Throws [LocaleParseError] on failure. set language(String bytes) { final temp = ffi2.Arena(); final bytesView = bytes.utf8View; final result = _ICU4XLocale_set_language(_ffi, bytesView.allocIn(temp), bytesView.length); temp.releaseAll(); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw LocaleParseError.values[result.union.err]; } } @@ -126,14 +126,14 @@ final class Locale implements ffi.Finalizable, core.Comparable { /// /// See the [Rust documentation for `try_from_bytes`](https://docs.rs/icu/latest/icu/locale/struct.Locale.html#method.try_from_bytes) for more information. /// - /// Throws [Error] on failure. + /// Throws [LocaleParseError] on failure. void setRegion(String bytes) { final temp = ffi2.Arena(); final bytesView = bytes.utf8View; final result = _ICU4XLocale_set_region(_ffi, bytesView.allocIn(temp), bytesView.length); temp.releaseAll(); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw LocaleParseError.values[result.union.err]; } } @@ -154,14 +154,14 @@ final class Locale implements ffi.Finalizable, core.Comparable { /// /// See the [Rust documentation for `try_from_bytes`](https://docs.rs/icu/latest/icu/locale/struct.Locale.html#method.try_from_bytes) for more information. /// - /// Throws [Error] on failure. + /// Throws [LocaleParseError] on failure. void setScript(String bytes) { final temp = ffi2.Arena(); final bytesView = bytes.utf8View; final result = _ICU4XLocale_set_script(_ffi, bytesView.allocIn(temp), bytesView.length); temp.releaseAll(); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw LocaleParseError.values[result.union.err]; } } @@ -172,7 +172,7 @@ final class Locale implements ffi.Finalizable, core.Comparable { /// /// See the [Rust documentation for `canonicalize`](https://docs.rs/icu/latest/icu/locale/struct.Locale.html#method.canonicalize) for more information. /// - /// Throws [Error] on failure. + /// Throws [LocaleParseError] on failure. static String canonicalize(String bytes) { final temp = ffi2.Arena(); final bytesView = bytes.utf8View; @@ -180,7 +180,7 @@ final class Locale implements ffi.Finalizable, core.Comparable { final result = _ICU4XLocale_canonicalize(bytesView.allocIn(temp), bytesView.length, write._ffi); temp.releaseAll(); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw LocaleParseError.values[result.union.err]; } return write.finalize(); } diff --git a/ffi/capi/bindings/dart/LocaleDirectionality.g.dart b/ffi/capi/bindings/dart/LocaleDirectionality.g.dart index c61c5bf9a77..0a1a6250caf 100644 --- a/ffi/capi/bindings/dart/LocaleDirectionality.g.dart +++ b/ffi/capi/bindings/dart/LocaleDirectionality.g.dart @@ -26,11 +26,11 @@ final class LocaleDirectionality implements ffi.Finalizable { /// /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/locale/struct.LocaleDirectionality.html#method.new) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory LocaleDirectionality(DataProvider provider) { final result = _ICU4XLocaleDirectionality_create(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return LocaleDirectionality._fromFfi(result.union.ok, []); } @@ -39,11 +39,11 @@ final class LocaleDirectionality implements ffi.Finalizable { /// /// See the [Rust documentation for `new_with_expander`](https://docs.rs/icu/latest/icu/locale/struct.LocaleDirectionality.html#method.new_with_expander) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory LocaleDirectionality.withExpander(DataProvider provider, LocaleExpander expander) { final result = _ICU4XLocaleDirectionality_create_with_expander(provider._ffi, expander._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return LocaleDirectionality._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/LocaleDisplayNamesFormatter.g.dart b/ffi/capi/bindings/dart/LocaleDisplayNamesFormatter.g.dart index 752dd20aac2..3b384ccc48d 100644 --- a/ffi/capi/bindings/dart/LocaleDisplayNamesFormatter.g.dart +++ b/ffi/capi/bindings/dart/LocaleDisplayNamesFormatter.g.dart @@ -26,13 +26,13 @@ final class LocaleDisplayNamesFormatter implements ffi.Finalizable { /// /// See the [Rust documentation for `try_new`](https://docs.rs/icu/latest/icu/displaynames/struct.LocaleDisplayNamesFormatter.html#method.try_new) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory LocaleDisplayNamesFormatter(DataProvider provider, Locale locale, DisplayNamesOptions options) { final temp = ffi2.Arena(); final result = _ICU4XLocaleDisplayNamesFormatter_create(provider._ffi, locale._ffi, options._toFfi(temp)); temp.releaseAll(); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return LocaleDisplayNamesFormatter._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/LocaleFallbacker.g.dart b/ffi/capi/bindings/dart/LocaleFallbacker.g.dart index 502e31de537..dcc111969e8 100644 --- a/ffi/capi/bindings/dart/LocaleFallbacker.g.dart +++ b/ffi/capi/bindings/dart/LocaleFallbacker.g.dart @@ -28,11 +28,11 @@ final class LocaleFallbacker implements ffi.Finalizable { /// /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/locale/fallback/struct.LocaleFallbacker.html#method.new) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory LocaleFallbacker(DataProvider provider) { final result = _ICU4XLocaleFallbacker_create(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return LocaleFallbacker._fromFfi(result.union.ok, []); } @@ -49,7 +49,7 @@ final class LocaleFallbacker implements ffi.Finalizable { /// /// See the [Rust documentation for `for_config`](https://docs.rs/icu/latest/icu/locale/fallback/struct.LocaleFallbacker.html#method.for_config) for more information. /// - /// Throws [Error] on failure. + /// Throws [LocaleParseError] on failure. LocaleFallbackerWithConfig forConfig(LocaleFallbackConfig config) { final temp = ffi2.Arena(); // This lifetime edge depends on lifetimes: 'a @@ -57,7 +57,7 @@ final class LocaleFallbacker implements ffi.Finalizable { final result = _ICU4XLocaleFallbacker_for_config(_ffi, config._toFfi(temp)); temp.releaseAll(); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw LocaleParseError.values[result.union.err]; } return LocaleFallbackerWithConfig._fromFfi(result.union.ok, [], aEdges); } diff --git a/ffi/capi/bindings/dart/LocaleParseError.g.dart b/ffi/capi/bindings/dart/LocaleParseError.g.dart new file mode 100644 index 00000000000..5ecfec5709e --- /dev/null +++ b/ffi/capi/bindings/dart/LocaleParseError.g.dart @@ -0,0 +1,14 @@ +// generated by diplomat-tool + +part of 'lib.g.dart'; + +/// Additional information: [1](https://docs.rs/icu/latest/icu/locale/enum.ParseError.html) +enum LocaleParseError { + unknown, + + language, + + subtag, + + extension; +} diff --git a/ffi/capi/bindings/dart/MetazoneCalculator.g.dart b/ffi/capi/bindings/dart/MetazoneCalculator.g.dart index e88935f09f9..46e545697f5 100644 --- a/ffi/capi/bindings/dart/MetazoneCalculator.g.dart +++ b/ffi/capi/bindings/dart/MetazoneCalculator.g.dart @@ -30,11 +30,11 @@ final class MetazoneCalculator implements ffi.Finalizable { /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/timezone/struct.MetazoneCalculator.html#method.new) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory MetazoneCalculator(DataProvider provider) { final result = _ICU4XMetazoneCalculator_create(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return MetazoneCalculator._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/PluralOperands.g.dart b/ffi/capi/bindings/dart/PluralOperands.g.dart index ab93f9ecbf1..a52b0aa7a06 100644 --- a/ffi/capi/bindings/dart/PluralOperands.g.dart +++ b/ffi/capi/bindings/dart/PluralOperands.g.dart @@ -26,14 +26,14 @@ final class PluralOperands implements ffi.Finalizable { /// /// See the [Rust documentation for `from_str`](https://docs.rs/icu/latest/icu/plurals/struct.PluralOperands.html#method.from_str) for more information. /// - /// Throws [Error] on failure. + /// Throws [FixedDecimalParseError] on failure. factory PluralOperands.fromString(String s) { final temp = ffi2.Arena(); final sView = s.utf8View; final result = _ICU4XPluralOperands_create_from_string(sView.allocIn(temp), sView.length); temp.releaseAll(); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw FixedDecimalParseError.values[result.union.err]; } return PluralOperands._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/PluralRules.g.dart b/ffi/capi/bindings/dart/PluralRules.g.dart index bc9ecf86c33..04444ca486a 100644 --- a/ffi/capi/bindings/dart/PluralRules.g.dart +++ b/ffi/capi/bindings/dart/PluralRules.g.dart @@ -26,11 +26,11 @@ final class PluralRules implements ffi.Finalizable { /// /// See the [Rust documentation for `try_new_cardinal`](https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html#method.try_new_cardinal) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory PluralRules.cardinal(DataProvider provider, Locale locale) { final result = _ICU4XPluralRules_create_cardinal(provider._ffi, locale._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return PluralRules._fromFfi(result.union.ok, []); } @@ -39,11 +39,11 @@ final class PluralRules implements ffi.Finalizable { /// /// See the [Rust documentation for `try_new_ordinal`](https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html#method.try_new_ordinal) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory PluralRules.ordinal(DataProvider provider, Locale locale) { final result = _ICU4XPluralRules_create_ordinal(provider._ffi, locale._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return PluralRules._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/PropertyValueNameToEnumMapper.g.dart b/ffi/capi/bindings/dart/PropertyValueNameToEnumMapper.g.dart index ce63d0eada0..110f65c0b39 100644 --- a/ffi/capi/bindings/dart/PropertyValueNameToEnumMapper.g.dart +++ b/ffi/capi/bindings/dart/PropertyValueNameToEnumMapper.g.dart @@ -54,110 +54,110 @@ final class PropertyValueNameToEnumMapper implements ffi.Finalizable { /// See the [Rust documentation for `name_to_enum_mapper`](https://docs.rs/icu/latest/icu/properties/struct.GeneralCategory.html#method.name_to_enum_mapper) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory PropertyValueNameToEnumMapper.generalCategory(DataProvider provider) { final result = _ICU4XPropertyValueNameToEnumMapper_load_general_category(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return PropertyValueNameToEnumMapper._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `name_to_enum_mapper`](https://docs.rs/icu/latest/icu/properties/struct.HangulSyllableType.html#method.name_to_enum_mapper) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory PropertyValueNameToEnumMapper.hangulSyllableType(DataProvider provider) { final result = _ICU4XPropertyValueNameToEnumMapper_load_hangul_syllable_type(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return PropertyValueNameToEnumMapper._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `name_to_enum_mapper`](https://docs.rs/icu/latest/icu/properties/struct.EastAsianWidth.html#method.name_to_enum_mapper) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory PropertyValueNameToEnumMapper.eastAsianWidth(DataProvider provider) { final result = _ICU4XPropertyValueNameToEnumMapper_load_east_asian_width(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return PropertyValueNameToEnumMapper._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `name_to_enum_mapper`](https://docs.rs/icu/latest/icu/properties/struct.BidiClass.html#method.name_to_enum_mapper) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory PropertyValueNameToEnumMapper.bidiClass(DataProvider provider) { final result = _ICU4XPropertyValueNameToEnumMapper_load_bidi_class(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return PropertyValueNameToEnumMapper._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `name_to_enum_mapper`](https://docs.rs/icu/latest/icu/properties/struct.IndicSyllabicCategory.html#method.name_to_enum_mapper) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory PropertyValueNameToEnumMapper.indicSyllabicCategory(DataProvider provider) { final result = _ICU4XPropertyValueNameToEnumMapper_load_indic_syllabic_category(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return PropertyValueNameToEnumMapper._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `name_to_enum_mapper`](https://docs.rs/icu/latest/icu/properties/struct.LineBreak.html#method.name_to_enum_mapper) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory PropertyValueNameToEnumMapper.lineBreak(DataProvider provider) { final result = _ICU4XPropertyValueNameToEnumMapper_load_line_break(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return PropertyValueNameToEnumMapper._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `name_to_enum_mapper`](https://docs.rs/icu/latest/icu/properties/struct.GraphemeClusterBreak.html#method.name_to_enum_mapper) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory PropertyValueNameToEnumMapper.graphemeClusterBreak(DataProvider provider) { final result = _ICU4XPropertyValueNameToEnumMapper_load_grapheme_cluster_break(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return PropertyValueNameToEnumMapper._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `name_to_enum_mapper`](https://docs.rs/icu/latest/icu/properties/struct.WordBreak.html#method.name_to_enum_mapper) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory PropertyValueNameToEnumMapper.wordBreak(DataProvider provider) { final result = _ICU4XPropertyValueNameToEnumMapper_load_word_break(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return PropertyValueNameToEnumMapper._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `name_to_enum_mapper`](https://docs.rs/icu/latest/icu/properties/struct.SentenceBreak.html#method.name_to_enum_mapper) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory PropertyValueNameToEnumMapper.sentenceBreak(DataProvider provider) { final result = _ICU4XPropertyValueNameToEnumMapper_load_sentence_break(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return PropertyValueNameToEnumMapper._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `name_to_enum_mapper`](https://docs.rs/icu/latest/icu/properties/struct.Script.html#method.name_to_enum_mapper) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory PropertyValueNameToEnumMapper.script(DataProvider provider) { final result = _ICU4XPropertyValueNameToEnumMapper_load_script(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return PropertyValueNameToEnumMapper._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/RegionDisplayNames.g.dart b/ffi/capi/bindings/dart/RegionDisplayNames.g.dart index 11887a99025..8df941617be 100644 --- a/ffi/capi/bindings/dart/RegionDisplayNames.g.dart +++ b/ffi/capi/bindings/dart/RegionDisplayNames.g.dart @@ -26,11 +26,11 @@ final class RegionDisplayNames implements ffi.Finalizable { /// /// See the [Rust documentation for `try_new`](https://docs.rs/icu/latest/icu/displaynames/struct.RegionDisplayNames.html#method.try_new) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory RegionDisplayNames(DataProvider provider, Locale locale) { final result = _ICU4XRegionDisplayNames_create(provider._ffi, locale._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return RegionDisplayNames._fromFfi(result.union.ok, []); } @@ -41,7 +41,7 @@ final class RegionDisplayNames implements ffi.Finalizable { /// /// See the [Rust documentation for `of`](https://docs.rs/icu/latest/icu/displaynames/struct.RegionDisplayNames.html#method.of) for more information. /// - /// Throws [Error] on failure. + /// Throws [LocaleParseError] on failure. String of(String region) { final temp = ffi2.Arena(); final regionView = region.utf8View; @@ -49,7 +49,7 @@ final class RegionDisplayNames implements ffi.Finalizable { final result = _ICU4XRegionDisplayNames_of(_ffi, regionView.allocIn(temp), regionView.length, write._ffi); temp.releaseAll(); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw LocaleParseError.values[result.union.err]; } return write.finalize(); } diff --git a/ffi/capi/bindings/dart/ScriptWithExtensions.g.dart b/ffi/capi/bindings/dart/ScriptWithExtensions.g.dart index cf52c4047ce..74365b78b25 100644 --- a/ffi/capi/bindings/dart/ScriptWithExtensions.g.dart +++ b/ffi/capi/bindings/dart/ScriptWithExtensions.g.dart @@ -26,11 +26,11 @@ final class ScriptWithExtensions implements ffi.Finalizable { /// See the [Rust documentation for `script_with_extensions`](https://docs.rs/icu/latest/icu/properties/script/fn.script_with_extensions.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory ScriptWithExtensions(DataProvider provider) { final result = _ICU4XScriptWithExtensions_create(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return ScriptWithExtensions._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/SentenceSegmenter.g.dart b/ffi/capi/bindings/dart/SentenceSegmenter.g.dart index 160d7d2a594..4ff3328b65a 100644 --- a/ffi/capi/bindings/dart/SentenceSegmenter.g.dart +++ b/ffi/capi/bindings/dart/SentenceSegmenter.g.dart @@ -28,11 +28,11 @@ final class SentenceSegmenter implements ffi.Finalizable { /// /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html#method.new) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory SentenceSegmenter(DataProvider provider) { final result = _ICU4XSentenceSegmenter_create(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return SentenceSegmenter._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/Time.g.dart b/ffi/capi/bindings/dart/Time.g.dart index 90574541dca..98a3381f76c 100644 --- a/ffi/capi/bindings/dart/Time.g.dart +++ b/ffi/capi/bindings/dart/Time.g.dart @@ -28,11 +28,11 @@ final class Time implements ffi.Finalizable { /// /// See the [Rust documentation for `try_new`](https://docs.rs/icu/latest/icu/calendar/struct.Time.html#method.try_new) for more information. /// - /// Throws [Error] on failure. + /// Throws [CalendarError] on failure. factory Time(int hour, int minute, int second, int nanosecond) { final result = _ICU4XTime_create(hour, minute, second, nanosecond); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw CalendarError.values[result.union.err]; } return Time._fromFfi(result.union.ok, []); } @@ -41,11 +41,11 @@ final class Time implements ffi.Finalizable { /// /// See the [Rust documentation for `midnight`](https://docs.rs/icu/latest/icu/calendar/struct.Time.html#method.midnight) for more information. /// - /// Throws [Error] on failure. + /// Throws [CalendarError] on failure. factory Time.midnight() { final result = _ICU4XTime_create_midnight(); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw CalendarError.values[result.union.err]; } return Time._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/TimeZoneIdMapper.g.dart b/ffi/capi/bindings/dart/TimeZoneIdMapper.g.dart index 84731ed9a5c..ed0c40b7db2 100644 --- a/ffi/capi/bindings/dart/TimeZoneIdMapper.g.dart +++ b/ffi/capi/bindings/dart/TimeZoneIdMapper.g.dart @@ -29,18 +29,18 @@ final class TimeZoneIdMapper implements ffi.Finalizable { /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapper.html#method.new) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory TimeZoneIdMapper(DataProvider provider) { final result = _ICU4XTimeZoneIdMapper_create(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return TimeZoneIdMapper._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `iana_to_bcp47`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapperBorrowed.html#method.iana_to_bcp47) for more information. /// - /// Throws [Error] on failure. + /// Throws [TimeZoneInvalidIdError] on failure. String ianaToBcp47(String value) { final temp = ffi2.Arena(); final valueView = value.utf8View; @@ -48,14 +48,14 @@ final class TimeZoneIdMapper implements ffi.Finalizable { final result = _ICU4XTimeZoneIdMapper_iana_to_bcp47(_ffi, valueView.allocIn(temp), valueView.length, write._ffi); temp.releaseAll(); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw TimeZoneInvalidIdError.values[result.union.err]; } return write.finalize(); } /// See the [Rust documentation for `normalize_iana`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapperBorrowed.html#method.normalize_iana) for more information. /// - /// Throws [Error] on failure. + /// Throws [TimeZoneInvalidIdError] on failure. String normalizeIana(String value) { final temp = ffi2.Arena(); final valueView = value.utf8View; @@ -63,14 +63,14 @@ final class TimeZoneIdMapper implements ffi.Finalizable { final result = _ICU4XTimeZoneIdMapper_normalize_iana(_ffi, valueView.allocIn(temp), valueView.length, write._ffi); temp.releaseAll(); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw TimeZoneInvalidIdError.values[result.union.err]; } return write.finalize(); } /// See the [Rust documentation for `canonicalize_iana`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapperBorrowed.html#method.canonicalize_iana) for more information. /// - /// Throws [Error] on failure. + /// Throws [TimeZoneInvalidIdError] on failure. String canonicalizeIana(String value) { final temp = ffi2.Arena(); final valueView = value.utf8View; @@ -78,14 +78,14 @@ final class TimeZoneIdMapper implements ffi.Finalizable { final result = _ICU4XTimeZoneIdMapper_canonicalize_iana(_ffi, valueView.allocIn(temp), valueView.length, write._ffi); temp.releaseAll(); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw TimeZoneInvalidIdError.values[result.union.err]; } return write.finalize(); } /// See the [Rust documentation for `find_canonical_iana_from_bcp47`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapperBorrowed.html#method.find_canonical_iana_from_bcp47) for more information. /// - /// Throws [Error] on failure. + /// Throws [TimeZoneInvalidIdError] on failure. String findCanonicalIanaFromBcp47(String value) { final temp = ffi2.Arena(); final valueView = value.utf8View; @@ -93,7 +93,7 @@ final class TimeZoneIdMapper implements ffi.Finalizable { final result = _ICU4XTimeZoneIdMapper_find_canonical_iana_from_bcp47(_ffi, valueView.allocIn(temp), valueView.length, write._ffi); temp.releaseAll(); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw TimeZoneInvalidIdError.values[result.union.err]; } return write.finalize(); } diff --git a/ffi/capi/bindings/dart/TimeZoneIdMapperWithFastCanonicalization.g.dart b/ffi/capi/bindings/dart/TimeZoneIdMapperWithFastCanonicalization.g.dart index 21d6af3946e..0e817cde1ae 100644 --- a/ffi/capi/bindings/dart/TimeZoneIdMapperWithFastCanonicalization.g.dart +++ b/ffi/capi/bindings/dart/TimeZoneIdMapperWithFastCanonicalization.g.dart @@ -29,18 +29,18 @@ final class TimeZoneIdMapperWithFastCanonicalization implements ffi.Finalizable /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapperWithFastCanonicalization.html#method.new) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory TimeZoneIdMapperWithFastCanonicalization(DataProvider provider) { final result = _ICU4XTimeZoneIdMapperWithFastCanonicalization_create(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return TimeZoneIdMapperWithFastCanonicalization._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `canonicalize_iana`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapperWithFastCanonicalizationBorrowed.html#method.canonicalize_iana) for more information. /// - /// Throws [Error] on failure. + /// Throws [TimeZoneInvalidIdError] on failure. String canonicalizeIana(String value) { final temp = ffi2.Arena(); final valueView = value.utf8View; @@ -48,14 +48,14 @@ final class TimeZoneIdMapperWithFastCanonicalization implements ffi.Finalizable final result = _ICU4XTimeZoneIdMapperWithFastCanonicalization_canonicalize_iana(_ffi, valueView.allocIn(temp), valueView.length, write._ffi); temp.releaseAll(); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw TimeZoneInvalidIdError.values[result.union.err]; } return write.finalize(); } /// See the [Rust documentation for `canonical_iana_from_bcp47`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapperWithFastCanonicalizationBorrowed.html#method.canonical_iana_from_bcp47) for more information. /// - /// Throws [Error] on failure. + /// Throws [TimeZoneInvalidIdError] on failure. String canonicalIanaFromBcp47(String value) { final temp = ffi2.Arena(); final valueView = value.utf8View; @@ -63,7 +63,7 @@ final class TimeZoneIdMapperWithFastCanonicalization implements ffi.Finalizable final result = _ICU4XTimeZoneIdMapperWithFastCanonicalization_canonical_iana_from_bcp47(_ffi, valueView.allocIn(temp), valueView.length, write._ffi); temp.releaseAll(); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw TimeZoneInvalidIdError.values[result.union.err]; } return write.finalize(); } diff --git a/ffi/capi/bindings/dart/TimeZoneInvalidIdError.g.dart b/ffi/capi/bindings/dart/TimeZoneInvalidIdError.g.dart new file mode 100644 index 00000000000..68daad680db --- /dev/null +++ b/ffi/capi/bindings/dart/TimeZoneInvalidIdError.g.dart @@ -0,0 +1,7 @@ +// generated by diplomat-tool + +part of 'lib.g.dart'; + +enum TimeZoneInvalidIdError { + todoZst; +} diff --git a/ffi/capi/bindings/dart/TimeZoneInvalidOffsetError.g.dart b/ffi/capi/bindings/dart/TimeZoneInvalidOffsetError.g.dart new file mode 100644 index 00000000000..6809ae34b2e --- /dev/null +++ b/ffi/capi/bindings/dart/TimeZoneInvalidOffsetError.g.dart @@ -0,0 +1,8 @@ +// generated by diplomat-tool + +part of 'lib.g.dart'; + +/// Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.InvalidOffsetError.html) +enum TimeZoneInvalidOffsetError { + todoZst; +} diff --git a/ffi/capi/bindings/dart/TitlecaseMapper.g.dart b/ffi/capi/bindings/dart/TitlecaseMapper.g.dart index e5aef5f987d..61c3907fca8 100644 --- a/ffi/capi/bindings/dart/TitlecaseMapper.g.dart +++ b/ffi/capi/bindings/dart/TitlecaseMapper.g.dart @@ -26,11 +26,11 @@ final class TitlecaseMapper implements ffi.Finalizable { /// /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/casemap/struct.TitlecaseMapper.html#method.new) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory TitlecaseMapper(DataProvider provider) { final result = _ICU4XTitlecaseMapper_create(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return TitlecaseMapper._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/UnicodeSetData.g.dart b/ffi/capi/bindings/dart/UnicodeSetData.g.dart index 36931b6f57b..c74af90b60e 100644 --- a/ffi/capi/bindings/dart/UnicodeSetData.g.dart +++ b/ffi/capi/bindings/dart/UnicodeSetData.g.dart @@ -49,66 +49,66 @@ final class UnicodeSetData implements ffi.Finalizable { /// See the [Rust documentation for `basic_emoji`](https://docs.rs/icu/latest/icu/properties/sets/fn.basic_emoji.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory UnicodeSetData.basicEmoji(DataProvider provider) { final result = _ICU4XUnicodeSetData_load_basic_emoji(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return UnicodeSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `exemplars_main`](https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_main.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory UnicodeSetData.exemplarsMain(DataProvider provider, Locale locale) { final result = _ICU4XUnicodeSetData_load_exemplars_main(provider._ffi, locale._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return UnicodeSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `exemplars_auxiliary`](https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_auxiliary.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory UnicodeSetData.exemplarsAuxiliary(DataProvider provider, Locale locale) { final result = _ICU4XUnicodeSetData_load_exemplars_auxiliary(provider._ffi, locale._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return UnicodeSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `exemplars_punctuation`](https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_punctuation.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory UnicodeSetData.exemplarsPunctuation(DataProvider provider, Locale locale) { final result = _ICU4XUnicodeSetData_load_exemplars_punctuation(provider._ffi, locale._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return UnicodeSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `exemplars_numbers`](https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_numbers.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory UnicodeSetData.exemplarsNumbers(DataProvider provider, Locale locale) { final result = _ICU4XUnicodeSetData_load_exemplars_numbers(provider._ffi, locale._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return UnicodeSetData._fromFfi(result.union.ok, []); } /// See the [Rust documentation for `exemplars_index`](https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_index.html) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory UnicodeSetData.exemplarsIndex(DataProvider provider, Locale locale) { final result = _ICU4XUnicodeSetData_load_exemplars_index(provider._ffi, locale._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return UnicodeSetData._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/UnitsConverterFactory.g.dart b/ffi/capi/bindings/dart/UnitsConverterFactory.g.dart index 5f4451b53d9..b9e704af051 100644 --- a/ffi/capi/bindings/dart/UnitsConverterFactory.g.dart +++ b/ffi/capi/bindings/dart/UnitsConverterFactory.g.dart @@ -30,11 +30,11 @@ final class UnitsConverterFactory implements ffi.Finalizable { /// /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/experimental/units/converter_factory/struct.ConverterFactory.html#method.new) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory UnitsConverterFactory(DataProvider provider) { final result = _ICU4XUnitsConverterFactory_create(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return UnitsConverterFactory._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/WeekCalculator.g.dart b/ffi/capi/bindings/dart/WeekCalculator.g.dart index 493c9eb990d..0b4e9154653 100644 --- a/ffi/capi/bindings/dart/WeekCalculator.g.dart +++ b/ffi/capi/bindings/dart/WeekCalculator.g.dart @@ -28,11 +28,11 @@ final class WeekCalculator implements ffi.Finalizable { /// /// See the [Rust documentation for `try_new`](https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#method.try_new) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory WeekCalculator(DataProvider provider, Locale locale) { final result = _ICU4XWeekCalculator_create(provider._ffi, locale._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return WeekCalculator._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/WordSegmenter.g.dart b/ffi/capi/bindings/dart/WordSegmenter.g.dart index ad9eda20fce..cb58fe69bb5 100644 --- a/ffi/capi/bindings/dart/WordSegmenter.g.dart +++ b/ffi/capi/bindings/dart/WordSegmenter.g.dart @@ -32,11 +32,11 @@ final class WordSegmenter implements ffi.Finalizable { /// /// See the [Rust documentation for `new_auto`](https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.new_auto) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory WordSegmenter.auto(DataProvider provider) { final result = _ICU4XWordSegmenter_create_auto(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return WordSegmenter._fromFfi(result.union.ok, []); } @@ -49,11 +49,11 @@ final class WordSegmenter implements ffi.Finalizable { /// /// See the [Rust documentation for `new_lstm`](https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.new_lstm) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory WordSegmenter.lstm(DataProvider provider) { final result = _ICU4XWordSegmenter_create_lstm(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return WordSegmenter._fromFfi(result.union.ok, []); } @@ -63,11 +63,11 @@ final class WordSegmenter implements ffi.Finalizable { /// /// See the [Rust documentation for `new_dictionary`](https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.new_dictionary) for more information. /// - /// Throws [Error] on failure. + /// Throws [DataError] on failure. factory WordSegmenter.dictionary(DataProvider provider) { final result = _ICU4XWordSegmenter_create_dictionary(provider._ffi); if (!result.isOk) { - throw Error.values.firstWhere((v) => v._ffi == result.union.err); + throw DataError.values[result.union.err]; } return WordSegmenter._fromFfi(result.union.ok, []); } diff --git a/ffi/capi/bindings/dart/lib.g.dart b/ffi/capi/bindings/dart/lib.g.dart index abe8420d9a1..21c8b6a54da 100644 --- a/ffi/capi/bindings/dart/lib.g.dart +++ b/ffi/capi/bindings/dart/lib.g.dart @@ -14,6 +14,7 @@ part 'BidiDirection.g.dart'; part 'BidiInfo.g.dart'; part 'BidiParagraph.g.dart'; part 'Calendar.g.dart'; +part 'CalendarError.g.dart'; part 'CanonicalCombiningClassMap.g.dart'; part 'CanonicalComposition.g.dart'; part 'CanonicalDecomposition.g.dart'; @@ -36,6 +37,7 @@ part 'CollatorOptions.g.dart'; part 'CollatorStrength.g.dart'; part 'ComposingNormalizer.g.dart'; part 'CustomTimeZone.g.dart'; +part 'DataError.g.dart'; part 'DataProvider.g.dart'; part 'Date.g.dart'; part 'DateFormatter.g.dart'; @@ -51,6 +53,8 @@ part 'Error.g.dart'; part 'FixedDecimal.g.dart'; part 'FixedDecimalFormatter.g.dart'; part 'FixedDecimalGroupingStrategy.g.dart'; +part 'FixedDecimalLimitError.g.dart'; +part 'FixedDecimalParseError.g.dart'; part 'FixedDecimalRoundingIncrement.g.dart'; part 'FixedDecimalSign.g.dart'; part 'FixedDecimalSignDisplay.g.dart'; @@ -92,6 +96,7 @@ part 'LocaleFallbackPriority.g.dart'; part 'LocaleFallbackSupplement.g.dart'; part 'LocaleFallbacker.g.dart'; part 'LocaleFallbackerWithConfig.g.dart'; +part 'LocaleParseError.g.dart'; part 'Logger.g.dart'; part 'MeasureUnit.g.dart'; part 'MeasureUnitParser.g.dart'; @@ -118,6 +123,8 @@ part 'TimeLength.g.dart'; part 'TimeZoneFormatter.g.dart'; part 'TimeZoneIdMapper.g.dart'; part 'TimeZoneIdMapperWithFastCanonicalization.g.dart'; +part 'TimeZoneInvalidIdError.g.dart'; +part 'TimeZoneInvalidOffsetError.g.dart'; part 'TitlecaseMapper.g.dart'; part 'TitlecaseOptions.g.dart'; part 'TrailingCase.g.dart'; diff --git a/ffi/capi/bindings/js/ICU4XBidi.d.ts b/ffi/capi/bindings/js/ICU4XBidi.d.ts index 6e37f29d529..07ee3d4ce3f 100644 --- a/ffi/capi/bindings/js/ICU4XBidi.d.ts +++ b/ffi/capi/bindings/js/ICU4XBidi.d.ts @@ -1,8 +1,8 @@ import { u8 } from "./diplomat-runtime" import { FFIError } from "./diplomat-runtime" import { ICU4XBidiInfo } from "./ICU4XBidiInfo"; +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; -import { ICU4XError } from "./ICU4XError"; import { ICU4XReorderedIndexMap } from "./ICU4XReorderedIndexMap"; /** @@ -18,7 +18,7 @@ export class ICU4XBidi { * Creates a new {@link ICU4XBidi `ICU4XBidi`} from locale data. * See the {@link https://docs.rs/icu/latest/icu/properties/bidi/struct.BidiClassAdapter.html#method.new Rust documentation for `new`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create(provider: ICU4XDataProvider): ICU4XBidi | never; diff --git a/ffi/capi/bindings/js/ICU4XBidi.mjs b/ffi/capi/bindings/js/ICU4XBidi.mjs index a1d007a3bb2..7bc82f17d80 100644 --- a/ffi/capi/bindings/js/ICU4XBidi.mjs +++ b/ffi/capi/bindings/js/ICU4XBidi.mjs @@ -1,7 +1,7 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" import { ICU4XBidiInfo } from "./ICU4XBidiInfo.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" import { ICU4XReorderedIndexMap } from "./ICU4XReorderedIndexMap.mjs" const ICU4XBidi_box_destroy_registry = new FinalizationRegistry(underlying => { @@ -28,7 +28,7 @@ export class ICU4XBidi { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XBidiParagraph.d.ts b/ffi/capi/bindings/js/ICU4XBidiParagraph.d.ts index ea65613489f..fe27a8add41 100644 --- a/ffi/capi/bindings/js/ICU4XBidiParagraph.d.ts +++ b/ffi/capi/bindings/js/ICU4XBidiParagraph.d.ts @@ -9,7 +9,7 @@ export class ICU4XBidiParagraph { /** - * Given a paragraph index `n` within the surrounding text, this sets this object to the paragraph at that index. Returns `ICU4XError::OutOfBoundsError` when out of bounds. + * Given a paragraph index `n` within the surrounding text, this sets this object to the paragraph at that index. Returns nothing when out of bounds. * This is equivalent to calling `paragraph_at()` on `ICU4XBidiInfo` but doesn't create a new object */ diff --git a/ffi/capi/bindings/js/ICU4XCalendar.d.ts b/ffi/capi/bindings/js/ICU4XCalendar.d.ts index e1662c9cad9..80dba401999 100644 --- a/ffi/capi/bindings/js/ICU4XCalendar.d.ts +++ b/ffi/capi/bindings/js/ICU4XCalendar.d.ts @@ -1,7 +1,7 @@ import { FFIError } from "./diplomat-runtime" import { ICU4XAnyCalendarKind } from "./ICU4XAnyCalendarKind"; +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; -import { ICU4XError } from "./ICU4XError"; import { ICU4XLocale } from "./ICU4XLocale"; /** @@ -15,7 +15,7 @@ export class ICU4XCalendar { * Creates a new {@link ICU4XCalendar `ICU4XCalendar`} from the specified date and time. * See the {@link https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html#method.new_for_locale Rust documentation for `new_for_locale`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create_for_locale(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XCalendar | never; @@ -24,7 +24,7 @@ export class ICU4XCalendar { * Creates a new {@link ICU4XCalendar `ICU4XCalendar`} from the specified date and time. * See the {@link https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html#method.new Rust documentation for `new`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create_for_kind(provider: ICU4XDataProvider, kind: ICU4XAnyCalendarKind): ICU4XCalendar | never; diff --git a/ffi/capi/bindings/js/ICU4XCalendar.mjs b/ffi/capi/bindings/js/ICU4XCalendar.mjs index 65c45d53999..fe87497a174 100644 --- a/ffi/capi/bindings/js/ICU4XCalendar.mjs +++ b/ffi/capi/bindings/js/ICU4XCalendar.mjs @@ -1,7 +1,7 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" import { ICU4XAnyCalendarKind_js_to_rust, ICU4XAnyCalendarKind_rust_to_js } from "./ICU4XAnyCalendarKind.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" const ICU4XCalendar_box_destroy_registry = new FinalizationRegistry(underlying => { wasm.ICU4XCalendar_destroy(underlying); @@ -27,7 +27,7 @@ export class ICU4XCalendar { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -44,7 +44,7 @@ export class ICU4XCalendar { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XCalendarError.d.ts b/ffi/capi/bindings/js/ICU4XCalendarError.d.ts new file mode 100644 index 00000000000..2a97ce33e6b --- /dev/null +++ b/ffi/capi/bindings/js/ICU4XCalendarError.d.ts @@ -0,0 +1,19 @@ + +/** + + * Additional information: {@link https://docs.rs/icu/latest/icu/calendar/struct.RangeError.html 1}, {@link https://docs.rs/icu/latest/icu/calendar/enum.DateError.html 2} + */ +export enum ICU4XCalendarError { + /** + */ + Unknown = 'Unknown', + /** + */ + OutOfRange = 'OutOfRange', + /** + */ + UnknownEra = 'UnknownEra', + /** + */ + UnknownMonthCode = 'UnknownMonthCode', +} \ No newline at end of file diff --git a/ffi/capi/bindings/js/ICU4XCalendarError.mjs b/ffi/capi/bindings/js/ICU4XCalendarError.mjs new file mode 100644 index 00000000000..18c86de1408 --- /dev/null +++ b/ffi/capi/bindings/js/ICU4XCalendarError.mjs @@ -0,0 +1,23 @@ +import wasm from "./diplomat-wasm.mjs" +import * as diplomatRuntime from "./diplomat-runtime.mjs" + +export const ICU4XCalendarError_js_to_rust = { + "Unknown": 0, + "OutOfRange": 1, + "UnknownEra": 2, + "UnknownMonthCode": 3, +}; + +export const ICU4XCalendarError_rust_to_js = { + [0]: "Unknown", + [1]: "OutOfRange", + [2]: "UnknownEra", + [3]: "UnknownMonthCode", +}; + +export const ICU4XCalendarError = { + "Unknown": "Unknown", + "OutOfRange": "OutOfRange", + "UnknownEra": "UnknownEra", + "UnknownMonthCode": "UnknownMonthCode", +}; diff --git a/ffi/capi/bindings/js/ICU4XCanonicalCombiningClassMap.d.ts b/ffi/capi/bindings/js/ICU4XCanonicalCombiningClassMap.d.ts index ffe64f3541d..c74832de1d3 100644 --- a/ffi/capi/bindings/js/ICU4XCanonicalCombiningClassMap.d.ts +++ b/ffi/capi/bindings/js/ICU4XCanonicalCombiningClassMap.d.ts @@ -1,7 +1,7 @@ import { u8, u32, char } from "./diplomat-runtime" import { FFIError } from "./diplomat-runtime" +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; -import { ICU4XError } from "./ICU4XError"; /** @@ -16,7 +16,7 @@ export class ICU4XCanonicalCombiningClassMap { * Construct a new ICU4XCanonicalCombiningClassMap instance for NFC * See the {@link https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalCombiningClassMap.html#method.new Rust documentation for `new`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create(provider: ICU4XDataProvider): ICU4XCanonicalCombiningClassMap | never; diff --git a/ffi/capi/bindings/js/ICU4XCanonicalCombiningClassMap.mjs b/ffi/capi/bindings/js/ICU4XCanonicalCombiningClassMap.mjs index f6c8761183f..6a1c4fc738c 100644 --- a/ffi/capi/bindings/js/ICU4XCanonicalCombiningClassMap.mjs +++ b/ffi/capi/bindings/js/ICU4XCanonicalCombiningClassMap.mjs @@ -1,6 +1,6 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" const ICU4XCanonicalCombiningClassMap_box_destroy_registry = new FinalizationRegistry(underlying => { wasm.ICU4XCanonicalCombiningClassMap_destroy(underlying); @@ -26,7 +26,7 @@ export class ICU4XCanonicalCombiningClassMap { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XCanonicalComposition.d.ts b/ffi/capi/bindings/js/ICU4XCanonicalComposition.d.ts index 1459a47f7d1..a8cfbd50108 100644 --- a/ffi/capi/bindings/js/ICU4XCanonicalComposition.d.ts +++ b/ffi/capi/bindings/js/ICU4XCanonicalComposition.d.ts @@ -1,7 +1,7 @@ import { char } from "./diplomat-runtime" import { FFIError } from "./diplomat-runtime" +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; -import { ICU4XError } from "./ICU4XError"; /** @@ -18,7 +18,7 @@ export class ICU4XCanonicalComposition { * Construct a new ICU4XCanonicalComposition instance for NFC * See the {@link https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalComposition.html#method.new Rust documentation for `new`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create(provider: ICU4XDataProvider): ICU4XCanonicalComposition | never; diff --git a/ffi/capi/bindings/js/ICU4XCanonicalComposition.mjs b/ffi/capi/bindings/js/ICU4XCanonicalComposition.mjs index 680a8011769..97b6ced00c0 100644 --- a/ffi/capi/bindings/js/ICU4XCanonicalComposition.mjs +++ b/ffi/capi/bindings/js/ICU4XCanonicalComposition.mjs @@ -1,6 +1,6 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" const ICU4XCanonicalComposition_box_destroy_registry = new FinalizationRegistry(underlying => { wasm.ICU4XCanonicalComposition_destroy(underlying); @@ -26,7 +26,7 @@ export class ICU4XCanonicalComposition { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XCanonicalDecomposition.d.ts b/ffi/capi/bindings/js/ICU4XCanonicalDecomposition.d.ts index debadba0aba..511e1fa270f 100644 --- a/ffi/capi/bindings/js/ICU4XCanonicalDecomposition.d.ts +++ b/ffi/capi/bindings/js/ICU4XCanonicalDecomposition.d.ts @@ -1,8 +1,8 @@ import { char } from "./diplomat-runtime" import { FFIError } from "./diplomat-runtime" +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; import { ICU4XDecomposed } from "./ICU4XDecomposed"; -import { ICU4XError } from "./ICU4XError"; /** @@ -19,7 +19,7 @@ export class ICU4XCanonicalDecomposition { * Construct a new ICU4XCanonicalDecomposition instance for NFC * See the {@link https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalDecomposition.html#method.new Rust documentation for `new`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create(provider: ICU4XDataProvider): ICU4XCanonicalDecomposition | never; diff --git a/ffi/capi/bindings/js/ICU4XCanonicalDecomposition.mjs b/ffi/capi/bindings/js/ICU4XCanonicalDecomposition.mjs index f889b99ac5a..7ac7c4bf3d4 100644 --- a/ffi/capi/bindings/js/ICU4XCanonicalDecomposition.mjs +++ b/ffi/capi/bindings/js/ICU4XCanonicalDecomposition.mjs @@ -1,7 +1,7 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" import { ICU4XDecomposed } from "./ICU4XDecomposed.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" const ICU4XCanonicalDecomposition_box_destroy_registry = new FinalizationRegistry(underlying => { wasm.ICU4XCanonicalDecomposition_destroy(underlying); @@ -27,7 +27,7 @@ export class ICU4XCanonicalDecomposition { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XCaseMapCloser.d.ts b/ffi/capi/bindings/js/ICU4XCaseMapCloser.d.ts index 61af474e1f9..64bea930069 100644 --- a/ffi/capi/bindings/js/ICU4XCaseMapCloser.d.ts +++ b/ffi/capi/bindings/js/ICU4XCaseMapCloser.d.ts @@ -1,8 +1,8 @@ import { char } from "./diplomat-runtime" import { FFIError } from "./diplomat-runtime" import { ICU4XCodePointSetBuilder } from "./ICU4XCodePointSetBuilder"; +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; -import { ICU4XError } from "./ICU4XError"; /** @@ -15,7 +15,7 @@ export class ICU4XCaseMapCloser { * Construct a new ICU4XCaseMapper instance * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapCloser.html#method.new Rust documentation for `new`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create(provider: ICU4XDataProvider): ICU4XCaseMapCloser | never; diff --git a/ffi/capi/bindings/js/ICU4XCaseMapCloser.mjs b/ffi/capi/bindings/js/ICU4XCaseMapCloser.mjs index 67a0888f710..1d3a93eb59b 100644 --- a/ffi/capi/bindings/js/ICU4XCaseMapCloser.mjs +++ b/ffi/capi/bindings/js/ICU4XCaseMapCloser.mjs @@ -1,6 +1,6 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" const ICU4XCaseMapCloser_box_destroy_registry = new FinalizationRegistry(underlying => { wasm.ICU4XCaseMapCloser_destroy(underlying); @@ -26,7 +26,7 @@ export class ICU4XCaseMapCloser { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XCaseMapper.d.ts b/ffi/capi/bindings/js/ICU4XCaseMapper.d.ts index 79b9b9d4e05..517e553b75a 100644 --- a/ffi/capi/bindings/js/ICU4XCaseMapper.d.ts +++ b/ffi/capi/bindings/js/ICU4XCaseMapper.d.ts @@ -1,8 +1,8 @@ import { char } from "./diplomat-runtime" import { FFIError } from "./diplomat-runtime" import { ICU4XCodePointSetBuilder } from "./ICU4XCodePointSetBuilder"; +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; -import { ICU4XError } from "./ICU4XError"; import { ICU4XLocale } from "./ICU4XLocale"; import { ICU4XTitlecaseOptionsV1 } from "./ICU4XTitlecaseOptionsV1"; @@ -17,7 +17,7 @@ export class ICU4XCaseMapper { * Construct a new ICU4XCaseMapper instance * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.new Rust documentation for `new`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create(provider: ICU4XDataProvider): ICU4XCaseMapper | never; diff --git a/ffi/capi/bindings/js/ICU4XCaseMapper.mjs b/ffi/capi/bindings/js/ICU4XCaseMapper.mjs index c3623d79f74..f7846e97b26 100644 --- a/ffi/capi/bindings/js/ICU4XCaseMapper.mjs +++ b/ffi/capi/bindings/js/ICU4XCaseMapper.mjs @@ -1,6 +1,6 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" import { ICU4XLeadingAdjustment_js_to_rust, ICU4XLeadingAdjustment_rust_to_js } from "./ICU4XLeadingAdjustment.mjs" import { ICU4XTrailingCase_js_to_rust, ICU4XTrailingCase_rust_to_js } from "./ICU4XTrailingCase.mjs" @@ -28,7 +28,7 @@ export class ICU4XCaseMapper { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XCodePointMapData16.d.ts b/ffi/capi/bindings/js/ICU4XCodePointMapData16.d.ts index 2353dd84b0f..49fc1e902ee 100644 --- a/ffi/capi/bindings/js/ICU4XCodePointMapData16.d.ts +++ b/ffi/capi/bindings/js/ICU4XCodePointMapData16.d.ts @@ -2,8 +2,8 @@ import { u16, u32, char } from "./diplomat-runtime" import { FFIError } from "./diplomat-runtime" import { ICU4XCodePointRangeIterator } from "./ICU4XCodePointRangeIterator"; import { ICU4XCodePointSetData } from "./ICU4XCodePointSetData"; +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; -import { ICU4XError } from "./ICU4XError"; /** @@ -60,7 +60,7 @@ export class ICU4XCodePointMapData16 { /** * See the {@link https://docs.rs/icu/latest/icu/properties/maps/fn.script.html Rust documentation for `script`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_script(provider: ICU4XDataProvider): ICU4XCodePointMapData16 | never; } diff --git a/ffi/capi/bindings/js/ICU4XCodePointMapData16.mjs b/ffi/capi/bindings/js/ICU4XCodePointMapData16.mjs index cc9a24efae0..d7f370a60cf 100644 --- a/ffi/capi/bindings/js/ICU4XCodePointMapData16.mjs +++ b/ffi/capi/bindings/js/ICU4XCodePointMapData16.mjs @@ -2,7 +2,7 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" import { ICU4XCodePointRangeIterator } from "./ICU4XCodePointRangeIterator.mjs" import { ICU4XCodePointSetData } from "./ICU4XCodePointSetData.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" const ICU4XCodePointMapData16_box_destroy_registry = new FinalizationRegistry(underlying => { wasm.ICU4XCodePointMapData16_destroy(underlying); @@ -48,7 +48,7 @@ export class ICU4XCodePointMapData16 { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XCodePointMapData8.d.ts b/ffi/capi/bindings/js/ICU4XCodePointMapData8.d.ts index 1c609b20904..fa02f3d0c6e 100644 --- a/ffi/capi/bindings/js/ICU4XCodePointMapData8.d.ts +++ b/ffi/capi/bindings/js/ICU4XCodePointMapData8.d.ts @@ -2,8 +2,8 @@ import { u8, u32, char } from "./diplomat-runtime" import { FFIError } from "./diplomat-runtime" import { ICU4XCodePointRangeIterator } from "./ICU4XCodePointRangeIterator"; import { ICU4XCodePointSetData } from "./ICU4XCodePointSetData"; +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; -import { ICU4XError } from "./ICU4XError"; /** @@ -82,70 +82,70 @@ export class ICU4XCodePointMapData8 { /** * See the {@link https://docs.rs/icu/latest/icu/properties/maps/fn.general_category.html Rust documentation for `general_category`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_general_category(provider: ICU4XDataProvider): ICU4XCodePointMapData8 | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/maps/fn.bidi_class.html Rust documentation for `bidi_class`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_bidi_class(provider: ICU4XDataProvider): ICU4XCodePointMapData8 | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/maps/fn.east_asian_width.html Rust documentation for `east_asian_width`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_east_asian_width(provider: ICU4XDataProvider): ICU4XCodePointMapData8 | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/maps/fn.hangul_syllable_type.html Rust documentation for `hangul_syllable_type`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_hangul_syllable_type(provider: ICU4XDataProvider): ICU4XCodePointMapData8 | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/maps/fn.indic_syllabic_category.html Rust documentation for `indic_syllabic_category`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_indic_syllabic_category(provider: ICU4XDataProvider): ICU4XCodePointMapData8 | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/maps/fn.line_break.html Rust documentation for `line_break`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_line_break(provider: ICU4XDataProvider): ICU4XCodePointMapData8 | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/maps/fn.grapheme_cluster_break.html Rust documentation for `grapheme_cluster_break`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static try_grapheme_cluster_break(provider: ICU4XDataProvider): ICU4XCodePointMapData8 | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/maps/fn.word_break.html Rust documentation for `word_break`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_word_break(provider: ICU4XDataProvider): ICU4XCodePointMapData8 | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/maps/fn.sentence_break.html Rust documentation for `sentence_break`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_sentence_break(provider: ICU4XDataProvider): ICU4XCodePointMapData8 | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/maps/fn.joining_type.html Rust documentation for `joining_type`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_joining_type(provider: ICU4XDataProvider): ICU4XCodePointMapData8 | never; } diff --git a/ffi/capi/bindings/js/ICU4XCodePointMapData8.mjs b/ffi/capi/bindings/js/ICU4XCodePointMapData8.mjs index 6801ce10493..b170f7d8c7b 100644 --- a/ffi/capi/bindings/js/ICU4XCodePointMapData8.mjs +++ b/ffi/capi/bindings/js/ICU4XCodePointMapData8.mjs @@ -2,7 +2,7 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" import { ICU4XCodePointRangeIterator } from "./ICU4XCodePointRangeIterator.mjs" import { ICU4XCodePointSetData } from "./ICU4XCodePointSetData.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" const ICU4XCodePointMapData8_box_destroy_registry = new FinalizationRegistry(underlying => { wasm.ICU4XCodePointMapData8_destroy(underlying); @@ -56,7 +56,7 @@ export class ICU4XCodePointMapData8 { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -73,7 +73,7 @@ export class ICU4XCodePointMapData8 { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -90,7 +90,7 @@ export class ICU4XCodePointMapData8 { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -107,7 +107,7 @@ export class ICU4XCodePointMapData8 { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -124,7 +124,7 @@ export class ICU4XCodePointMapData8 { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -141,7 +141,7 @@ export class ICU4XCodePointMapData8 { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -158,7 +158,7 @@ export class ICU4XCodePointMapData8 { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -175,7 +175,7 @@ export class ICU4XCodePointMapData8 { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -192,7 +192,7 @@ export class ICU4XCodePointMapData8 { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -209,7 +209,7 @@ export class ICU4XCodePointMapData8 { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XCodePointSetData.d.ts b/ffi/capi/bindings/js/ICU4XCodePointSetData.d.ts index 37252df30ac..d1a83898326 100644 --- a/ffi/capi/bindings/js/ICU4XCodePointSetData.d.ts +++ b/ffi/capi/bindings/js/ICU4XCodePointSetData.d.ts @@ -1,6 +1,7 @@ import { u32, char } from "./diplomat-runtime" import { FFIError } from "./diplomat-runtime" import { ICU4XCodePointRangeIterator } from "./ICU4XCodePointRangeIterator"; +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; import { ICU4XError } from "./ICU4XError"; @@ -51,462 +52,462 @@ export class ICU4XCodePointSetData { * which is a mask with the same format as the `U_GC_XX_MASK` mask in ICU4C * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.for_general_category_group.html Rust documentation for `for_general_category_group`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_for_general_category_group(provider: ICU4XDataProvider, group: u32): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.ascii_hex_digit.html Rust documentation for `ascii_hex_digit`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_ascii_hex_digit(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.alnum.html Rust documentation for `alnum`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_alnum(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.alphabetic.html Rust documentation for `alphabetic`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_alphabetic(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.bidi_control.html Rust documentation for `bidi_control`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_bidi_control(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.bidi_mirrored.html Rust documentation for `bidi_mirrored`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_bidi_mirrored(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.blank.html Rust documentation for `blank`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_blank(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.cased.html Rust documentation for `cased`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_cased(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.case_ignorable.html Rust documentation for `case_ignorable`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_case_ignorable(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.full_composition_exclusion.html Rust documentation for `full_composition_exclusion`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_full_composition_exclusion(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_casefolded.html Rust documentation for `changes_when_casefolded`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_changes_when_casefolded(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_casemapped.html Rust documentation for `changes_when_casemapped`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_changes_when_casemapped(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_nfkc_casefolded.html Rust documentation for `changes_when_nfkc_casefolded`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_changes_when_nfkc_casefolded(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_lowercased.html Rust documentation for `changes_when_lowercased`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_changes_when_lowercased(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_titlecased.html Rust documentation for `changes_when_titlecased`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_changes_when_titlecased(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_uppercased.html Rust documentation for `changes_when_uppercased`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_changes_when_uppercased(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.dash.html Rust documentation for `dash`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_dash(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.deprecated.html Rust documentation for `deprecated`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_deprecated(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.default_ignorable_code_point.html Rust documentation for `default_ignorable_code_point`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_default_ignorable_code_point(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.diacritic.html Rust documentation for `diacritic`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_diacritic(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_modifier_base.html Rust documentation for `emoji_modifier_base`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_emoji_modifier_base(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_component.html Rust documentation for `emoji_component`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_emoji_component(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_modifier.html Rust documentation for `emoji_modifier`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_emoji_modifier(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.emoji.html Rust documentation for `emoji`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_emoji(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_presentation.html Rust documentation for `emoji_presentation`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_emoji_presentation(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.extender.html Rust documentation for `extender`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_extender(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.extended_pictographic.html Rust documentation for `extended_pictographic`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_extended_pictographic(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.graph.html Rust documentation for `graph`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_graph(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.grapheme_base.html Rust documentation for `grapheme_base`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_grapheme_base(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.grapheme_extend.html Rust documentation for `grapheme_extend`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_grapheme_extend(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.grapheme_link.html Rust documentation for `grapheme_link`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_grapheme_link(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.hex_digit.html Rust documentation for `hex_digit`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_hex_digit(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.hyphen.html Rust documentation for `hyphen`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_hyphen(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.id_continue.html Rust documentation for `id_continue`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_id_continue(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.ideographic.html Rust documentation for `ideographic`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_ideographic(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.id_start.html Rust documentation for `id_start`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_id_start(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.ids_binary_operator.html Rust documentation for `ids_binary_operator`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_ids_binary_operator(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.ids_trinary_operator.html Rust documentation for `ids_trinary_operator`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_ids_trinary_operator(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.join_control.html Rust documentation for `join_control`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_join_control(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.logical_order_exception.html Rust documentation for `logical_order_exception`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_logical_order_exception(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.lowercase.html Rust documentation for `lowercase`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_lowercase(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.math.html Rust documentation for `math`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_math(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.noncharacter_code_point.html Rust documentation for `noncharacter_code_point`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_noncharacter_code_point(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.nfc_inert.html Rust documentation for `nfc_inert`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_nfc_inert(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.nfd_inert.html Rust documentation for `nfd_inert`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_nfd_inert(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.nfkc_inert.html Rust documentation for `nfkc_inert`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_nfkc_inert(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.nfkd_inert.html Rust documentation for `nfkd_inert`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_nfkd_inert(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.pattern_syntax.html Rust documentation for `pattern_syntax`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_pattern_syntax(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.pattern_white_space.html Rust documentation for `pattern_white_space`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_pattern_white_space(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.prepended_concatenation_mark.html Rust documentation for `prepended_concatenation_mark`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_prepended_concatenation_mark(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.print.html Rust documentation for `print`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_print(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.quotation_mark.html Rust documentation for `quotation_mark`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_quotation_mark(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.radical.html Rust documentation for `radical`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_radical(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.regional_indicator.html Rust documentation for `regional_indicator`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_regional_indicator(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.soft_dotted.html Rust documentation for `soft_dotted`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_soft_dotted(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.segment_starter.html Rust documentation for `segment_starter`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_segment_starter(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.case_sensitive.html Rust documentation for `case_sensitive`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_case_sensitive(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.sentence_terminal.html Rust documentation for `sentence_terminal`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_sentence_terminal(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.terminal_punctuation.html Rust documentation for `terminal_punctuation`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_terminal_punctuation(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.unified_ideograph.html Rust documentation for `unified_ideograph`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_unified_ideograph(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.uppercase.html Rust documentation for `uppercase`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_uppercase(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.variation_selector.html Rust documentation for `variation_selector`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_variation_selector(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.white_space.html Rust documentation for `white_space`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_white_space(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.xdigit.html Rust documentation for `xdigit`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_xdigit(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.xid_continue.html Rust documentation for `xid_continue`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_xid_continue(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.xid_start.html Rust documentation for `xid_start`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_xid_start(provider: ICU4XDataProvider): ICU4XCodePointSetData | never; diff --git a/ffi/capi/bindings/js/ICU4XCodePointSetData.mjs b/ffi/capi/bindings/js/ICU4XCodePointSetData.mjs index 34bb8afc8e2..532385920d2 100644 --- a/ffi/capi/bindings/js/ICU4XCodePointSetData.mjs +++ b/ffi/capi/bindings/js/ICU4XCodePointSetData.mjs @@ -1,6 +1,7 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" import { ICU4XCodePointRangeIterator } from "./ICU4XCodePointRangeIterator.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" const ICU4XCodePointSetData_box_destroy_registry = new FinalizationRegistry(underlying => { @@ -43,7 +44,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -60,7 +61,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -77,7 +78,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -94,7 +95,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -111,7 +112,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -128,7 +129,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -145,7 +146,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -162,7 +163,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -179,7 +180,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -196,7 +197,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -213,7 +214,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -230,7 +231,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -247,7 +248,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -264,7 +265,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -281,7 +282,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -298,7 +299,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -315,7 +316,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -332,7 +333,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -349,7 +350,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -366,7 +367,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -383,7 +384,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -400,7 +401,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -417,7 +418,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -434,7 +435,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -451,7 +452,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -468,7 +469,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -485,7 +486,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -502,7 +503,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -519,7 +520,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -536,7 +537,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -553,7 +554,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -570,7 +571,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -587,7 +588,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -604,7 +605,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -621,7 +622,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -638,7 +639,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -655,7 +656,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -672,7 +673,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -689,7 +690,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -706,7 +707,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -723,7 +724,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -740,7 +741,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -757,7 +758,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -774,7 +775,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -791,7 +792,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -808,7 +809,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -825,7 +826,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -842,7 +843,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -859,7 +860,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -876,7 +877,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -893,7 +894,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -910,7 +911,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -927,7 +928,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -944,7 +945,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -961,7 +962,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -978,7 +979,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -995,7 +996,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -1012,7 +1013,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -1029,7 +1030,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -1046,7 +1047,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -1063,7 +1064,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -1080,7 +1081,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -1097,7 +1098,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -1114,7 +1115,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -1131,7 +1132,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -1148,7 +1149,7 @@ export class ICU4XCodePointSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XCollator.d.ts b/ffi/capi/bindings/js/ICU4XCollator.d.ts index e03643596b8..0b82900e92c 100644 --- a/ffi/capi/bindings/js/ICU4XCollator.d.ts +++ b/ffi/capi/bindings/js/ICU4XCollator.d.ts @@ -1,8 +1,8 @@ import { FFIError } from "./diplomat-runtime" import { ICU4XCollatorOptionsV1 } from "./ICU4XCollatorOptionsV1"; import { ICU4XCollatorResolvedOptionsV1 } from "./ICU4XCollatorResolvedOptionsV1"; +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; -import { ICU4XError } from "./ICU4XError"; import { ICU4XLocale } from "./ICU4XLocale"; import { ICU4XOrdering } from "./ICU4XOrdering"; @@ -17,7 +17,7 @@ export class ICU4XCollator { * Construct a new Collator instance. * See the {@link https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.try_new Rust documentation for `try_new`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create_v1(provider: ICU4XDataProvider, locale: ICU4XLocale, options: ICU4XCollatorOptionsV1): ICU4XCollator | never; diff --git a/ffi/capi/bindings/js/ICU4XCollator.mjs b/ffi/capi/bindings/js/ICU4XCollator.mjs index 429ba9329b5..d7ffca4f5f9 100644 --- a/ffi/capi/bindings/js/ICU4XCollator.mjs +++ b/ffi/capi/bindings/js/ICU4XCollator.mjs @@ -8,7 +8,7 @@ import { ICU4XCollatorMaxVariable_js_to_rust, ICU4XCollatorMaxVariable_rust_to_j import { ICU4XCollatorNumeric_js_to_rust, ICU4XCollatorNumeric_rust_to_js } from "./ICU4XCollatorNumeric.mjs" import { ICU4XCollatorResolvedOptionsV1 } from "./ICU4XCollatorResolvedOptionsV1.mjs" import { ICU4XCollatorStrength_js_to_rust, ICU4XCollatorStrength_rust_to_js } from "./ICU4XCollatorStrength.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" import { ICU4XOrdering_js_to_rust, ICU4XOrdering_rust_to_js } from "./ICU4XOrdering.mjs" const ICU4XCollator_box_destroy_registry = new FinalizationRegistry(underlying => { @@ -42,7 +42,7 @@ export class ICU4XCollator { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XComposingNormalizer.d.ts b/ffi/capi/bindings/js/ICU4XComposingNormalizer.d.ts index 6a09ec40d60..d6bc6a0783a 100644 --- a/ffi/capi/bindings/js/ICU4XComposingNormalizer.d.ts +++ b/ffi/capi/bindings/js/ICU4XComposingNormalizer.d.ts @@ -1,6 +1,6 @@ import { FFIError } from "./diplomat-runtime" +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; -import { ICU4XError } from "./ICU4XError"; /** @@ -13,7 +13,7 @@ export class ICU4XComposingNormalizer { * Construct a new ICU4XComposingNormalizer instance for NFC * See the {@link https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.new_nfc Rust documentation for `new_nfc`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create_nfc(provider: ICU4XDataProvider): ICU4XComposingNormalizer | never; @@ -22,7 +22,7 @@ export class ICU4XComposingNormalizer { * Construct a new ICU4XComposingNormalizer instance for NFKC * See the {@link https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.new_nfkc Rust documentation for `new_nfkc`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create_nfkc(provider: ICU4XDataProvider): ICU4XComposingNormalizer | never; diff --git a/ffi/capi/bindings/js/ICU4XComposingNormalizer.mjs b/ffi/capi/bindings/js/ICU4XComposingNormalizer.mjs index 2d4794044ed..ecd5bb50a89 100644 --- a/ffi/capi/bindings/js/ICU4XComposingNormalizer.mjs +++ b/ffi/capi/bindings/js/ICU4XComposingNormalizer.mjs @@ -1,6 +1,6 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" const ICU4XComposingNormalizer_box_destroy_registry = new FinalizationRegistry(underlying => { wasm.ICU4XComposingNormalizer_destroy(underlying); @@ -26,7 +26,7 @@ export class ICU4XComposingNormalizer { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -43,7 +43,7 @@ export class ICU4XComposingNormalizer { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XCustomTimeZone.d.ts b/ffi/capi/bindings/js/ICU4XCustomTimeZone.d.ts index 5f5b2785fdb..18299a23316 100644 --- a/ffi/capi/bindings/js/ICU4XCustomTimeZone.d.ts +++ b/ffi/capi/bindings/js/ICU4XCustomTimeZone.d.ts @@ -1,9 +1,10 @@ import { i32 } from "./diplomat-runtime" import { FFIError } from "./diplomat-runtime" -import { ICU4XError } from "./ICU4XError"; import { ICU4XIsoDateTime } from "./ICU4XIsoDateTime"; import { ICU4XMetazoneCalculator } from "./ICU4XMetazoneCalculator"; import { ICU4XTimeZoneIdMapper } from "./ICU4XTimeZoneIdMapper"; +import { ICU4XTimeZoneInvalidIdError } from "./ICU4XTimeZoneInvalidIdError"; +import { ICU4XTimeZoneInvalidOffsetError } from "./ICU4XTimeZoneInvalidOffsetError"; /** @@ -16,7 +17,7 @@ export class ICU4XCustomTimeZone { * Creates a time zone from an offset string. * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#method.from_str Rust documentation for `from_str`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XTimeZoneInvalidOffsetError}> */ static create_from_string(s: string): ICU4XCustomTimeZone | never; @@ -61,7 +62,7 @@ export class ICU4XCustomTimeZone { * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.try_from_offset_seconds Rust documentation for `try_from_offset_seconds`} for more information. * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html 1} - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XTimeZoneInvalidOffsetError}> */ try_set_gmt_offset_seconds(offset_seconds: i32): void | never; @@ -136,7 +137,7 @@ export class ICU4XCustomTimeZone { * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.time_zone_id Rust documentation for `time_zone_id`} for more information. * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneBcp47Id.html 1} - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XTimeZoneInvalidIdError}> */ try_set_time_zone_id(id: string): void | never; @@ -145,7 +146,7 @@ export class ICU4XCustomTimeZone { * Sets the `time_zone_id` field from an IANA string by looking up the corresponding BCP-47 string. * Errors if the string is not a valid BCP-47 time zone ID. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XTimeZoneInvalidIdError}> */ try_set_iana_time_zone_id(mapper: ICU4XTimeZoneIdMapper, id: string): void | never; @@ -180,7 +181,7 @@ export class ICU4XCustomTimeZone { * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.metazone_id Rust documentation for `metazone_id`} for more information. * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.MetazoneId.html 1} - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XTimeZoneInvalidIdError}> */ try_set_metazone_id(id: string): void | never; diff --git a/ffi/capi/bindings/js/ICU4XCustomTimeZone.mjs b/ffi/capi/bindings/js/ICU4XCustomTimeZone.mjs index 73f803c6c9b..939b81975a0 100644 --- a/ffi/capi/bindings/js/ICU4XCustomTimeZone.mjs +++ b/ffi/capi/bindings/js/ICU4XCustomTimeZone.mjs @@ -1,6 +1,7 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XTimeZoneInvalidIdError_js_to_rust, ICU4XTimeZoneInvalidIdError_rust_to_js } from "./ICU4XTimeZoneInvalidIdError.mjs" +import { ICU4XTimeZoneInvalidOffsetError_js_to_rust, ICU4XTimeZoneInvalidOffsetError_rust_to_js } from "./ICU4XTimeZoneInvalidOffsetError.mjs" const ICU4XCustomTimeZone_box_destroy_registry = new FinalizationRegistry(underlying => { wasm.ICU4XCustomTimeZone_destroy(underlying); @@ -27,7 +28,7 @@ export class ICU4XCustomTimeZone { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XTimeZoneInvalidOffsetError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -62,7 +63,7 @@ export class ICU4XCustomTimeZone { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XTimeZoneInvalidOffsetError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -159,7 +160,7 @@ export class ICU4XCustomTimeZone { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XTimeZoneInvalidIdError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -179,7 +180,7 @@ export class ICU4XCustomTimeZone { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XTimeZoneInvalidIdError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -212,7 +213,7 @@ export class ICU4XCustomTimeZone { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XTimeZoneInvalidIdError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XDataError.d.ts b/ffi/capi/bindings/js/ICU4XDataError.d.ts new file mode 100644 index 00000000000..8f95f9bd3b9 --- /dev/null +++ b/ffi/capi/bindings/js/ICU4XDataError.d.ts @@ -0,0 +1,55 @@ + +/** + + * Additional information: {@link https://docs.rs/icu/latest/icu/provider/struct.DataError.html 1}, {@link https://docs.rs/icu/latest/icu/provider/enum.DataErrorKind.html 2} + */ +export enum ICU4XDataError { + /** + */ + Unknown = 'Unknown', + /** + */ + MissingDataMarker = 'MissingDataMarker', + /** + */ + MissingVariant = 'MissingVariant', + /** + */ + MissingLocale = 'MissingLocale', + /** + */ + NeedsVariant = 'NeedsVariant', + /** + */ + NeedsLocale = 'NeedsLocale', + /** + */ + ExtraneousLocale = 'ExtraneousLocale', + /** + */ + FilteredResource = 'FilteredResource', + /** + */ + MismatchedType = 'MismatchedType', + /** + */ + MissingPayload = 'MissingPayload', + /** + */ + InvalidState = 'InvalidState', + /** + */ + Custom = 'Custom', + /** + */ + Io = 'Io', + /** + */ + UnavailableBufferFormat = 'UnavailableBufferFormat', + /** + */ + MismatchedAnyBuffer = 'MismatchedAnyBuffer', + /** + */ + DataStructValidityError = 'DataStructValidityError', +} \ No newline at end of file diff --git a/ffi/capi/bindings/js/ICU4XDataError.mjs b/ffi/capi/bindings/js/ICU4XDataError.mjs new file mode 100644 index 00000000000..c0444b0e81b --- /dev/null +++ b/ffi/capi/bindings/js/ICU4XDataError.mjs @@ -0,0 +1,59 @@ +import wasm from "./diplomat-wasm.mjs" +import * as diplomatRuntime from "./diplomat-runtime.mjs" + +export const ICU4XDataError_js_to_rust = { + "Unknown": 0, + "MissingDataMarker": 1, + "MissingVariant": 2, + "MissingLocale": 3, + "NeedsVariant": 4, + "NeedsLocale": 5, + "ExtraneousLocale": 6, + "FilteredResource": 7, + "MismatchedType": 8, + "MissingPayload": 9, + "InvalidState": 10, + "Custom": 11, + "Io": 12, + "UnavailableBufferFormat": 13, + "MismatchedAnyBuffer": 14, + "DataStructValidityError": 15, +}; + +export const ICU4XDataError_rust_to_js = { + [0]: "Unknown", + [1]: "MissingDataMarker", + [2]: "MissingVariant", + [3]: "MissingLocale", + [4]: "NeedsVariant", + [5]: "NeedsLocale", + [6]: "ExtraneousLocale", + [7]: "FilteredResource", + [8]: "MismatchedType", + [9]: "MissingPayload", + [10]: "InvalidState", + [11]: "Custom", + [12]: "Io", + [13]: "UnavailableBufferFormat", + [14]: "MismatchedAnyBuffer", + [15]: "DataStructValidityError", +}; + +export const ICU4XDataError = { + "Unknown": "Unknown", + "MissingDataMarker": "MissingDataMarker", + "MissingVariant": "MissingVariant", + "MissingLocale": "MissingLocale", + "NeedsVariant": "NeedsVariant", + "NeedsLocale": "NeedsLocale", + "ExtraneousLocale": "ExtraneousLocale", + "FilteredResource": "FilteredResource", + "MismatchedType": "MismatchedType", + "MissingPayload": "MissingPayload", + "InvalidState": "InvalidState", + "Custom": "Custom", + "Io": "Io", + "UnavailableBufferFormat": "UnavailableBufferFormat", + "MismatchedAnyBuffer": "MismatchedAnyBuffer", + "DataStructValidityError": "DataStructValidityError", +}; diff --git a/ffi/capi/bindings/js/ICU4XDataProvider.d.ts b/ffi/capi/bindings/js/ICU4XDataProvider.d.ts index 6824f308cf7..7c6b35e7433 100644 --- a/ffi/capi/bindings/js/ICU4XDataProvider.d.ts +++ b/ffi/capi/bindings/js/ICU4XDataProvider.d.ts @@ -1,5 +1,5 @@ import { FFIError } from "./diplomat-runtime" -import { ICU4XError } from "./ICU4XError"; +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XLocaleFallbacker } from "./ICU4XLocaleFallbacker"; /** @@ -25,7 +25,7 @@ export class ICU4XDataProvider { * Constructs an `FsDataProvider` and returns it as an {@link ICU4XDataProvider `ICU4XDataProvider`}. Requires the `provider_fs` Cargo feature. Not supported in WASM. * See the {@link https://docs.rs/icu_provider_fs/latest/icu_provider_fs/struct.FsDataProvider.html Rust documentation for `FsDataProvider`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create_fs(path: string): ICU4XDataProvider | never; @@ -34,7 +34,7 @@ export class ICU4XDataProvider { * Constructs a `BlobDataProvider` and returns it as an {@link ICU4XDataProvider `ICU4XDataProvider`}. * See the {@link https://docs.rs/icu_provider_blob/latest/icu_provider_blob/struct.BlobDataProvider.html Rust documentation for `BlobDataProvider`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create_from_byte_slice(blob: Uint8Array): ICU4XDataProvider | never; @@ -55,7 +55,7 @@ export class ICU4XDataProvider { * The providers must be the same type (Any or Buffer). This condition is satisfied if both providers originate from the same constructor, such as `create_from_byte_slice` or `create_fs`. If the condition is not upheld, a runtime error occurs. * See the {@link https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fork/type.ForkByMarkerProvider.html Rust documentation for `ForkByMarkerProvider`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ fork_by_key(other: ICU4XDataProvider): void | never; @@ -64,7 +64,7 @@ export class ICU4XDataProvider { * Same as `fork_by_key` but forks by locale instead of key. * See the {@link https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fork/predicates/struct.MissingLocalePredicate.html Rust documentation for `MissingLocalePredicate`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ fork_by_locale(other: ICU4XDataProvider): void | never; @@ -77,7 +77,7 @@ export class ICU4XDataProvider { * See the {@link https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html#method.try_new Rust documentation for `try_new`} for more information. * Additional information: {@link https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html 1} - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ enable_locale_fallback(): void | never; @@ -86,7 +86,7 @@ export class ICU4XDataProvider { * See the {@link https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html#method.new_with_fallbacker Rust documentation for `new_with_fallbacker`} for more information. * Additional information: {@link https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html 1} - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ enable_locale_fallback_with(fallbacker: ICU4XLocaleFallbacker): void | never; } diff --git a/ffi/capi/bindings/js/ICU4XDataProvider.mjs b/ffi/capi/bindings/js/ICU4XDataProvider.mjs index 830d681d43b..5d4aa1a8a22 100644 --- a/ffi/capi/bindings/js/ICU4XDataProvider.mjs +++ b/ffi/capi/bindings/js/ICU4XDataProvider.mjs @@ -1,6 +1,6 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" const ICU4XDataProvider_box_destroy_registry = new FinalizationRegistry(underlying => { wasm.ICU4XDataProvider_destroy(underlying); @@ -31,7 +31,7 @@ export class ICU4XDataProvider { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -51,7 +51,7 @@ export class ICU4XDataProvider { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -74,7 +74,7 @@ export class ICU4XDataProvider { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -91,7 +91,7 @@ export class ICU4XDataProvider { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -108,7 +108,7 @@ export class ICU4XDataProvider { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -125,7 +125,7 @@ export class ICU4XDataProvider { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XDataStruct.d.ts b/ffi/capi/bindings/js/ICU4XDataStruct.d.ts index 69f41fac8bd..e9863917d38 100644 --- a/ffi/capi/bindings/js/ICU4XDataStruct.d.ts +++ b/ffi/capi/bindings/js/ICU4XDataStruct.d.ts @@ -1,6 +1,6 @@ import { u8 } from "./diplomat-runtime" import { FFIError } from "./diplomat-runtime" -import { ICU4XError } from "./ICU4XError"; +import { ICU4XDataError } from "./ICU4XDataError"; /** @@ -17,7 +17,7 @@ export class ICU4XDataStruct { * Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according to the WHATWG Encoding Standard. * See the {@link https://docs.rs/icu/latest/icu/decimal/provider/struct.DecimalSymbolsV1.html Rust documentation for `DecimalSymbolsV1`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create_decimal_symbols_v1(plus_sign_prefix: string, plus_sign_suffix: string, minus_sign_prefix: string, minus_sign_suffix: string, decimal_separator: string, grouping_separator: string, primary_group_size: u8, secondary_group_size: u8, min_group_size: u8, digits: Uint32Array): ICU4XDataStruct | never; } diff --git a/ffi/capi/bindings/js/ICU4XDataStruct.mjs b/ffi/capi/bindings/js/ICU4XDataStruct.mjs index bcfc4df4be4..acd02db015e 100644 --- a/ffi/capi/bindings/js/ICU4XDataStruct.mjs +++ b/ffi/capi/bindings/js/ICU4XDataStruct.mjs @@ -1,6 +1,6 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" const ICU4XDataStruct_box_destroy_registry = new FinalizationRegistry(underlying => { wasm.ICU4XDataStruct_destroy(underlying); @@ -33,7 +33,7 @@ export class ICU4XDataStruct { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XDate.d.ts b/ffi/capi/bindings/js/ICU4XDate.d.ts index 218cfc8785f..98f78a3ce79 100644 --- a/ffi/capi/bindings/js/ICU4XDate.d.ts +++ b/ffi/capi/bindings/js/ICU4XDate.d.ts @@ -1,7 +1,7 @@ import { u8, u16, i32, u32 } from "./diplomat-runtime" import { FFIError } from "./diplomat-runtime" import { ICU4XCalendar } from "./ICU4XCalendar"; -import { ICU4XError } from "./ICU4XError"; +import { ICU4XCalendarError } from "./ICU4XCalendarError"; import { ICU4XIsoDate } from "./ICU4XIsoDate"; import { ICU4XIsoWeekday } from "./ICU4XIsoWeekday"; import { ICU4XWeekCalculator } from "./ICU4XWeekCalculator"; @@ -20,7 +20,7 @@ export class ICU4XDate { * Creates a new {@link ICU4XDate `ICU4XDate`} representing the ISO date and time given but in a given calendar * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.new_from_iso Rust documentation for `new_from_iso`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XCalendarError}> */ static create_from_iso_in_calendar(year: i32, month: u8, day: u8, calendar: ICU4XCalendar): ICU4XDate | never; @@ -29,7 +29,7 @@ export class ICU4XDate { * Creates a new {@link ICU4XDate `ICU4XDate`} from the given codes, which are interpreted in the given calendar system * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.try_new_from_codes Rust documentation for `try_new_from_codes`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XCalendarError}> */ static create_from_codes_in_calendar(era_code: string, year: i32, month_code: string, day: u8, calendar: ICU4XCalendar): ICU4XDate | never; diff --git a/ffi/capi/bindings/js/ICU4XDate.mjs b/ffi/capi/bindings/js/ICU4XDate.mjs index 20065bdf5d2..4b9c4e5de81 100644 --- a/ffi/capi/bindings/js/ICU4XDate.mjs +++ b/ffi/capi/bindings/js/ICU4XDate.mjs @@ -1,7 +1,7 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" import { ICU4XCalendar } from "./ICU4XCalendar.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XCalendarError_js_to_rust, ICU4XCalendarError_rust_to_js } from "./ICU4XCalendarError.mjs" import { ICU4XIsoDate } from "./ICU4XIsoDate.mjs" import { ICU4XIsoWeekday_js_to_rust, ICU4XIsoWeekday_rust_to_js } from "./ICU4XIsoWeekday.mjs" import { ICU4XWeekOf } from "./ICU4XWeekOf.mjs" @@ -31,7 +31,7 @@ export class ICU4XDate { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XCalendarError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -50,7 +50,7 @@ export class ICU4XDate { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XCalendarError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XDateTime.d.ts b/ffi/capi/bindings/js/ICU4XDateTime.d.ts index 8c5c372f74c..9c2313fc8c5 100644 --- a/ffi/capi/bindings/js/ICU4XDateTime.d.ts +++ b/ffi/capi/bindings/js/ICU4XDateTime.d.ts @@ -1,8 +1,8 @@ import { u8, u16, i32, u32 } from "./diplomat-runtime" import { FFIError } from "./diplomat-runtime" import { ICU4XCalendar } from "./ICU4XCalendar"; +import { ICU4XCalendarError } from "./ICU4XCalendarError"; import { ICU4XDate } from "./ICU4XDate"; -import { ICU4XError } from "./ICU4XError"; import { ICU4XIsoDateTime } from "./ICU4XIsoDateTime"; import { ICU4XIsoWeekday } from "./ICU4XIsoWeekday"; import { ICU4XTime } from "./ICU4XTime"; @@ -22,7 +22,7 @@ export class ICU4XDateTime { * Creates a new {@link ICU4XDateTime `ICU4XDateTime`} representing the ISO date and time given but in a given calendar * See the {@link https://docs.rs/icu/latest/icu/struct.DateTime.html#method.new_from_iso Rust documentation for `new_from_iso`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XCalendarError}> */ static create_from_iso_in_calendar(year: i32, month: u8, day: u8, hour: u8, minute: u8, second: u8, nanosecond: u32, calendar: ICU4XCalendar): ICU4XDateTime | never; @@ -31,7 +31,7 @@ export class ICU4XDateTime { * Creates a new {@link ICU4XDateTime `ICU4XDateTime`} from the given codes, which are interpreted in the given calendar system * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.try_new_from_codes Rust documentation for `try_new_from_codes`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XCalendarError}> */ static create_from_codes_in_calendar(era_code: string, year: i32, month_code: string, day: u8, hour: u8, minute: u8, second: u8, nanosecond: u32, calendar: ICU4XCalendar): ICU4XDateTime | never; diff --git a/ffi/capi/bindings/js/ICU4XDateTime.mjs b/ffi/capi/bindings/js/ICU4XDateTime.mjs index 51a41b0c933..ef0e23fdb68 100644 --- a/ffi/capi/bindings/js/ICU4XDateTime.mjs +++ b/ffi/capi/bindings/js/ICU4XDateTime.mjs @@ -1,8 +1,8 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" import { ICU4XCalendar } from "./ICU4XCalendar.mjs" +import { ICU4XCalendarError_js_to_rust, ICU4XCalendarError_rust_to_js } from "./ICU4XCalendarError.mjs" import { ICU4XDate } from "./ICU4XDate.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" import { ICU4XIsoDateTime } from "./ICU4XIsoDateTime.mjs" import { ICU4XIsoWeekday_js_to_rust, ICU4XIsoWeekday_rust_to_js } from "./ICU4XIsoWeekday.mjs" import { ICU4XTime } from "./ICU4XTime.mjs" @@ -33,7 +33,7 @@ export class ICU4XDateTime { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XCalendarError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -52,7 +52,7 @@ export class ICU4XDateTime { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XCalendarError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XDecomposingNormalizer.d.ts b/ffi/capi/bindings/js/ICU4XDecomposingNormalizer.d.ts index 2e61784eb13..1f2d7942b67 100644 --- a/ffi/capi/bindings/js/ICU4XDecomposingNormalizer.d.ts +++ b/ffi/capi/bindings/js/ICU4XDecomposingNormalizer.d.ts @@ -1,6 +1,6 @@ import { FFIError } from "./diplomat-runtime" +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; -import { ICU4XError } from "./ICU4XError"; /** @@ -13,7 +13,7 @@ export class ICU4XDecomposingNormalizer { * Construct a new ICU4XDecomposingNormalizer instance for NFC * See the {@link https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.new_nfd Rust documentation for `new_nfd`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create_nfd(provider: ICU4XDataProvider): ICU4XDecomposingNormalizer | never; @@ -22,7 +22,7 @@ export class ICU4XDecomposingNormalizer { * Construct a new ICU4XDecomposingNormalizer instance for NFKC * See the {@link https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.new_nfkd Rust documentation for `new_nfkd`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create_nfkd(provider: ICU4XDataProvider): ICU4XDecomposingNormalizer | never; diff --git a/ffi/capi/bindings/js/ICU4XDecomposingNormalizer.mjs b/ffi/capi/bindings/js/ICU4XDecomposingNormalizer.mjs index 15babcf8eb8..210b1000fd9 100644 --- a/ffi/capi/bindings/js/ICU4XDecomposingNormalizer.mjs +++ b/ffi/capi/bindings/js/ICU4XDecomposingNormalizer.mjs @@ -1,6 +1,6 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" const ICU4XDecomposingNormalizer_box_destroy_registry = new FinalizationRegistry(underlying => { wasm.ICU4XDecomposingNormalizer_destroy(underlying); @@ -26,7 +26,7 @@ export class ICU4XDecomposingNormalizer { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -43,7 +43,7 @@ export class ICU4XDecomposingNormalizer { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XError.d.ts b/ffi/capi/bindings/js/ICU4XError.d.ts index a9808749e56..7ac94943ed1 100644 --- a/ffi/capi/bindings/js/ICU4XError.d.ts +++ b/ffi/capi/bindings/js/ICU4XError.d.ts @@ -1,11 +1,9 @@ /** - * A common enum for errors that ICU4X may return, organized by API + * Legacy error - * The error names are stable and can be checked against as strings in the JS API - - * Additional information: {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.ParseError.html 1}, {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.LimitError.html 2}, {@link https://docs.rs/icu/latest/icu/calendar/struct.RangeError.html 3}, {@link https://docs.rs/icu/latest/icu/calendar/enum.DateError.html 4}, {@link https://docs.rs/icu/latest/icu/datetime/enum.DateTimeError.html 5}, {@link https://docs.rs/icu/latest/icu/locale/enum.ParseError.html 6}, {@link https://docs.rs/icu/latest/icu/provider/struct.DataError.html 7}, {@link https://docs.rs/icu/latest/icu/provider/enum.DataErrorKind.html 8}, {@link https://docs.rs/icu/latest/icu/timezone/struct.InvalidOffsetError.html 9}, {@link https://docs.rs/icu_experimental/latest/icu_experimental/units/struct.InvalidUnitError.html 10} + * Additional information: {@link https://docs.rs/icu/latest/icu/datetime/enum.DateTimeError.html 1}, {@link https://docs.rs/icu/latest/icu/provider/struct.DataError.html 2}, {@link https://docs.rs/icu/latest/icu/provider/enum.DataErrorKind.html 3} */ export enum ICU4XError { /** @@ -55,43 +53,9 @@ export enum ICU4XError { /** */ DataMismatchedAnyBufferError = 'DataMismatchedAnyBufferError', - /** - - * The locale or subtag string failed to parse - */ - LocaleParserLanguageError = 'LocaleParserLanguageError', - /** - */ - LocaleParserSubtagError = 'LocaleParserSubtagError', - /** - */ - LocaleParserExtensionError = 'LocaleParserExtensionError', - /** - - * Attempted to construct an invalid data struct - */ - DataStructValidityError = 'DataStructValidityError', /** */ PropertyUnexpectedPropertyNameError = 'PropertyUnexpectedPropertyNameError', - /** - */ - FixedDecimalLimitError = 'FixedDecimalLimitError', - /** - */ - FixedDecimalSyntaxError = 'FixedDecimalSyntaxError', - /** - */ - PluralsParseError = 'PluralsParseError', - /** - */ - CalendarOutOfRangeError = 'CalendarOutOfRangeError', - /** - */ - CalendarUnknownEraError = 'CalendarUnknownEraError', - /** - */ - CalendarUnknownMonthCodeError = 'CalendarUnknownMonthCodeError', /** */ DateTimePatternError = 'DateTimePatternError', @@ -119,10 +83,4 @@ export enum ICU4XError { /** */ DateTimeMismatchedCalendarError = 'DateTimeMismatchedCalendarError', - /** - */ - TimeZoneInvalidOffsetError = 'TimeZoneInvalidOffsetError', - /** - */ - TimeZoneInvalidIdError = 'TimeZoneInvalidIdError', } \ No newline at end of file diff --git a/ffi/capi/bindings/js/ICU4XError.mjs b/ffi/capi/bindings/js/ICU4XError.mjs index ad2afcb4141..f03204bd2ca 100644 --- a/ffi/capi/bindings/js/ICU4XError.mjs +++ b/ffi/capi/bindings/js/ICU4XError.mjs @@ -17,17 +17,7 @@ export const ICU4XError_js_to_rust = { "DataIoError": 267, "DataUnavailableBufferFormatError": 268, "DataMismatchedAnyBufferError": 269, - "LocaleParserLanguageError": 513, - "LocaleParserSubtagError": 514, - "LocaleParserExtensionError": 515, - "DataStructValidityError": 768, "PropertyUnexpectedPropertyNameError": 1026, - "FixedDecimalLimitError": 1280, - "FixedDecimalSyntaxError": 1281, - "PluralsParseError": 1536, - "CalendarOutOfRangeError": 1795, - "CalendarUnknownEraError": 1796, - "CalendarUnknownMonthCodeError": 1797, "DateTimePatternError": 2048, "DateTimeMissingInputFieldError": 2049, "DateTimeSkeletonError": 2050, @@ -37,8 +27,6 @@ export const ICU4XError_js_to_rust = { "DateTimeMissingMonthSymbolError": 2054, "DateTimeFixedDecimalError": 2055, "DateTimeMismatchedCalendarError": 2056, - "TimeZoneInvalidOffsetError": 2561, - "TimeZoneInvalidIdError": 2563, }; export const ICU4XError_rust_to_js = { @@ -57,17 +45,7 @@ export const ICU4XError_rust_to_js = { [267]: "DataIoError", [268]: "DataUnavailableBufferFormatError", [269]: "DataMismatchedAnyBufferError", - [513]: "LocaleParserLanguageError", - [514]: "LocaleParserSubtagError", - [515]: "LocaleParserExtensionError", - [768]: "DataStructValidityError", [1026]: "PropertyUnexpectedPropertyNameError", - [1280]: "FixedDecimalLimitError", - [1281]: "FixedDecimalSyntaxError", - [1536]: "PluralsParseError", - [1795]: "CalendarOutOfRangeError", - [1796]: "CalendarUnknownEraError", - [1797]: "CalendarUnknownMonthCodeError", [2048]: "DateTimePatternError", [2049]: "DateTimeMissingInputFieldError", [2050]: "DateTimeSkeletonError", @@ -77,8 +55,6 @@ export const ICU4XError_rust_to_js = { [2054]: "DateTimeMissingMonthSymbolError", [2055]: "DateTimeFixedDecimalError", [2056]: "DateTimeMismatchedCalendarError", - [2561]: "TimeZoneInvalidOffsetError", - [2563]: "TimeZoneInvalidIdError", }; export const ICU4XError = { @@ -97,17 +73,7 @@ export const ICU4XError = { "DataIoError": "DataIoError", "DataUnavailableBufferFormatError": "DataUnavailableBufferFormatError", "DataMismatchedAnyBufferError": "DataMismatchedAnyBufferError", - "LocaleParserLanguageError": "LocaleParserLanguageError", - "LocaleParserSubtagError": "LocaleParserSubtagError", - "LocaleParserExtensionError": "LocaleParserExtensionError", - "DataStructValidityError": "DataStructValidityError", "PropertyUnexpectedPropertyNameError": "PropertyUnexpectedPropertyNameError", - "FixedDecimalLimitError": "FixedDecimalLimitError", - "FixedDecimalSyntaxError": "FixedDecimalSyntaxError", - "PluralsParseError": "PluralsParseError", - "CalendarOutOfRangeError": "CalendarOutOfRangeError", - "CalendarUnknownEraError": "CalendarUnknownEraError", - "CalendarUnknownMonthCodeError": "CalendarUnknownMonthCodeError", "DateTimePatternError": "DateTimePatternError", "DateTimeMissingInputFieldError": "DateTimeMissingInputFieldError", "DateTimeSkeletonError": "DateTimeSkeletonError", @@ -117,6 +83,4 @@ export const ICU4XError = { "DateTimeMissingMonthSymbolError": "DateTimeMissingMonthSymbolError", "DateTimeFixedDecimalError": "DateTimeFixedDecimalError", "DateTimeMismatchedCalendarError": "DateTimeMismatchedCalendarError", - "TimeZoneInvalidOffsetError": "TimeZoneInvalidOffsetError", - "TimeZoneInvalidIdError": "TimeZoneInvalidIdError", }; diff --git a/ffi/capi/bindings/js/ICU4XFixedDecimal.d.ts b/ffi/capi/bindings/js/ICU4XFixedDecimal.d.ts index 09b561dac25..421aea0d7e4 100644 --- a/ffi/capi/bindings/js/ICU4XFixedDecimal.d.ts +++ b/ffi/capi/bindings/js/ICU4XFixedDecimal.d.ts @@ -1,6 +1,7 @@ import { u8, i16, i32, u32, i64, u64, f64 } from "./diplomat-runtime" import { FFIError } from "./diplomat-runtime" -import { ICU4XError } from "./ICU4XError"; +import { ICU4XFixedDecimalLimitError } from "./ICU4XFixedDecimalLimitError"; +import { ICU4XFixedDecimalParseError } from "./ICU4XFixedDecimalParseError"; import { ICU4XFixedDecimalRoundingIncrement } from "./ICU4XFixedDecimalRoundingIncrement"; import { ICU4XFixedDecimalSign } from "./ICU4XFixedDecimalSign"; import { ICU4XFixedDecimalSignDisplay } from "./ICU4XFixedDecimalSignDisplay"; @@ -50,7 +51,7 @@ export class ICU4XFixedDecimal { * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.try_from_f64 Rust documentation for `try_from_f64`} for more information. * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html Rust documentation for `FloatPrecision`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XFixedDecimalLimitError}> */ static create_from_f64_with_integer_precision(f: f64): ICU4XFixedDecimal | never; @@ -61,7 +62,7 @@ export class ICU4XFixedDecimal { * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.try_from_f64 Rust documentation for `try_from_f64`} for more information. * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html Rust documentation for `FloatPrecision`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XFixedDecimalLimitError}> */ static create_from_f64_with_lower_magnitude(f: f64, magnitude: i16): ICU4XFixedDecimal | never; @@ -72,7 +73,7 @@ export class ICU4XFixedDecimal { * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.try_from_f64 Rust documentation for `try_from_f64`} for more information. * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html Rust documentation for `FloatPrecision`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XFixedDecimalLimitError}> */ static create_from_f64_with_significant_digits(f: f64, digits: u8): ICU4XFixedDecimal | never; @@ -83,7 +84,7 @@ export class ICU4XFixedDecimal { * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.try_from_f64 Rust documentation for `try_from_f64`} for more information. * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html Rust documentation for `FloatPrecision`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XFixedDecimalLimitError}> */ static create_from_f64_with_floating_precision(f: f64): ICU4XFixedDecimal | never; @@ -92,7 +93,7 @@ export class ICU4XFixedDecimal { * Construct an {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} from a string. * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.from_str Rust documentation for `from_str`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XFixedDecimalParseError}> */ static create_from_string(v: string): ICU4XFixedDecimal | never; diff --git a/ffi/capi/bindings/js/ICU4XFixedDecimal.mjs b/ffi/capi/bindings/js/ICU4XFixedDecimal.mjs index 812b085fe5c..400a54f2cde 100644 --- a/ffi/capi/bindings/js/ICU4XFixedDecimal.mjs +++ b/ffi/capi/bindings/js/ICU4XFixedDecimal.mjs @@ -1,6 +1,7 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XFixedDecimalLimitError_js_to_rust, ICU4XFixedDecimalLimitError_rust_to_js } from "./ICU4XFixedDecimalLimitError.mjs" +import { ICU4XFixedDecimalParseError_js_to_rust, ICU4XFixedDecimalParseError_rust_to_js } from "./ICU4XFixedDecimalParseError.mjs" import { ICU4XFixedDecimalRoundingIncrement_js_to_rust, ICU4XFixedDecimalRoundingIncrement_rust_to_js } from "./ICU4XFixedDecimalRoundingIncrement.mjs" import { ICU4XFixedDecimalSign_js_to_rust, ICU4XFixedDecimalSign_rust_to_js } from "./ICU4XFixedDecimalSign.mjs" import { ICU4XFixedDecimalSignDisplay_js_to_rust, ICU4XFixedDecimalSignDisplay_rust_to_js } from "./ICU4XFixedDecimalSignDisplay.mjs" @@ -45,7 +46,7 @@ export class ICU4XFixedDecimal { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XFixedDecimalLimitError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -62,7 +63,7 @@ export class ICU4XFixedDecimal { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XFixedDecimalLimitError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -79,7 +80,7 @@ export class ICU4XFixedDecimal { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XFixedDecimalLimitError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -96,7 +97,7 @@ export class ICU4XFixedDecimal { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XFixedDecimalLimitError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -114,7 +115,7 @@ export class ICU4XFixedDecimal { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XFixedDecimalParseError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XFixedDecimalFormatter.d.ts b/ffi/capi/bindings/js/ICU4XFixedDecimalFormatter.d.ts index 0cddba18f70..f700a759253 100644 --- a/ffi/capi/bindings/js/ICU4XFixedDecimalFormatter.d.ts +++ b/ffi/capi/bindings/js/ICU4XFixedDecimalFormatter.d.ts @@ -1,7 +1,7 @@ import { FFIError } from "./diplomat-runtime" +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; import { ICU4XDataStruct } from "./ICU4XDataStruct"; -import { ICU4XError } from "./ICU4XError"; import { ICU4XFixedDecimal } from "./ICU4XFixedDecimal"; import { ICU4XFixedDecimalGroupingStrategy } from "./ICU4XFixedDecimalGroupingStrategy"; import { ICU4XLocale } from "./ICU4XLocale"; @@ -19,7 +19,7 @@ export class ICU4XFixedDecimalFormatter { * Creates a new {@link ICU4XFixedDecimalFormatter `ICU4XFixedDecimalFormatter`} from locale data. * See the {@link https://docs.rs/icu/latest/icu/decimal/struct.FixedDecimalFormatter.html#method.try_new Rust documentation for `try_new`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create_with_grouping_strategy(provider: ICU4XDataProvider, locale: ICU4XLocale, grouping_strategy: ICU4XFixedDecimalGroupingStrategy): ICU4XFixedDecimalFormatter | never; @@ -28,7 +28,7 @@ export class ICU4XFixedDecimalFormatter { * Creates a new {@link ICU4XFixedDecimalFormatter `ICU4XFixedDecimalFormatter`} from preconstructed locale data in the form of an {@link ICU4XDataStruct `ICU4XDataStruct`} constructed from `ICU4XDataStruct::create_decimal_symbols()`. * The contents of the data struct will be consumed: if you wish to use the struct again it will have to be reconstructed. Passing a consumed struct to this method will return an error. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create_with_decimal_symbols_v1(data_struct: ICU4XDataStruct, grouping_strategy: ICU4XFixedDecimalGroupingStrategy): ICU4XFixedDecimalFormatter | never; diff --git a/ffi/capi/bindings/js/ICU4XFixedDecimalFormatter.mjs b/ffi/capi/bindings/js/ICU4XFixedDecimalFormatter.mjs index a396943c288..475616954e4 100644 --- a/ffi/capi/bindings/js/ICU4XFixedDecimalFormatter.mjs +++ b/ffi/capi/bindings/js/ICU4XFixedDecimalFormatter.mjs @@ -1,6 +1,6 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" import { ICU4XFixedDecimalGroupingStrategy_js_to_rust, ICU4XFixedDecimalGroupingStrategy_rust_to_js } from "./ICU4XFixedDecimalGroupingStrategy.mjs" const ICU4XFixedDecimalFormatter_box_destroy_registry = new FinalizationRegistry(underlying => { @@ -27,7 +27,7 @@ export class ICU4XFixedDecimalFormatter { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -44,7 +44,7 @@ export class ICU4XFixedDecimalFormatter { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XFixedDecimalLimitError.d.ts b/ffi/capi/bindings/js/ICU4XFixedDecimalLimitError.d.ts new file mode 100644 index 00000000000..dcb47795379 --- /dev/null +++ b/ffi/capi/bindings/js/ICU4XFixedDecimalLimitError.d.ts @@ -0,0 +1,10 @@ + +/** + + * Additional information: {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.LimitError.html 1} + */ +export enum ICU4XFixedDecimalLimitError { + /** + */ + TodoZst = 'TodoZst', +} \ No newline at end of file diff --git a/ffi/capi/bindings/js/ICU4XFixedDecimalLimitError.mjs b/ffi/capi/bindings/js/ICU4XFixedDecimalLimitError.mjs new file mode 100644 index 00000000000..f4a23f5aedb --- /dev/null +++ b/ffi/capi/bindings/js/ICU4XFixedDecimalLimitError.mjs @@ -0,0 +1,14 @@ +import wasm from "./diplomat-wasm.mjs" +import * as diplomatRuntime from "./diplomat-runtime.mjs" + +export const ICU4XFixedDecimalLimitError_js_to_rust = { + "TodoZst": 0, +}; + +export const ICU4XFixedDecimalLimitError_rust_to_js = { + [0]: "TodoZst", +}; + +export const ICU4XFixedDecimalLimitError = { + "TodoZst": "TodoZst", +}; diff --git a/ffi/capi/bindings/js/ICU4XFixedDecimalParseError.d.ts b/ffi/capi/bindings/js/ICU4XFixedDecimalParseError.d.ts new file mode 100644 index 00000000000..8a97ac2101e --- /dev/null +++ b/ffi/capi/bindings/js/ICU4XFixedDecimalParseError.d.ts @@ -0,0 +1,16 @@ + +/** + + * Additional information: {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.ParseError.html 1} + */ +export enum ICU4XFixedDecimalParseError { + /** + */ + Unknown = 'Unknown', + /** + */ + Limit = 'Limit', + /** + */ + Syntax = 'Syntax', +} \ No newline at end of file diff --git a/ffi/capi/bindings/js/ICU4XFixedDecimalParseError.mjs b/ffi/capi/bindings/js/ICU4XFixedDecimalParseError.mjs new file mode 100644 index 00000000000..4da34fcb7cd --- /dev/null +++ b/ffi/capi/bindings/js/ICU4XFixedDecimalParseError.mjs @@ -0,0 +1,20 @@ +import wasm from "./diplomat-wasm.mjs" +import * as diplomatRuntime from "./diplomat-runtime.mjs" + +export const ICU4XFixedDecimalParseError_js_to_rust = { + "Unknown": 0, + "Limit": 1, + "Syntax": 2, +}; + +export const ICU4XFixedDecimalParseError_rust_to_js = { + [0]: "Unknown", + [1]: "Limit", + [2]: "Syntax", +}; + +export const ICU4XFixedDecimalParseError = { + "Unknown": "Unknown", + "Limit": "Limit", + "Syntax": "Syntax", +}; diff --git a/ffi/capi/bindings/js/ICU4XGeneralCategoryNameToMaskMapper.d.ts b/ffi/capi/bindings/js/ICU4XGeneralCategoryNameToMaskMapper.d.ts index 8b2b8b914c7..350d7f6d700 100644 --- a/ffi/capi/bindings/js/ICU4XGeneralCategoryNameToMaskMapper.d.ts +++ b/ffi/capi/bindings/js/ICU4XGeneralCategoryNameToMaskMapper.d.ts @@ -1,7 +1,7 @@ import { u32 } from "./diplomat-runtime" import { FFIError } from "./diplomat-runtime" +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; -import { ICU4XError } from "./ICU4XError"; /** @@ -32,7 +32,7 @@ export class ICU4XGeneralCategoryNameToMaskMapper { /** * See the {@link https://docs.rs/icu/latest/icu/properties/struct.GeneralCategoryGroup.html#method.name_to_enum_mapper Rust documentation for `name_to_enum_mapper`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load(provider: ICU4XDataProvider): ICU4XGeneralCategoryNameToMaskMapper | never; } diff --git a/ffi/capi/bindings/js/ICU4XGeneralCategoryNameToMaskMapper.mjs b/ffi/capi/bindings/js/ICU4XGeneralCategoryNameToMaskMapper.mjs index 7b91c0bb10d..fa02c1779c3 100644 --- a/ffi/capi/bindings/js/ICU4XGeneralCategoryNameToMaskMapper.mjs +++ b/ffi/capi/bindings/js/ICU4XGeneralCategoryNameToMaskMapper.mjs @@ -1,6 +1,6 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" const ICU4XGeneralCategoryNameToMaskMapper_box_destroy_registry = new FinalizationRegistry(underlying => { wasm.ICU4XGeneralCategoryNameToMaskMapper_destroy(underlying); @@ -40,7 +40,7 @@ export class ICU4XGeneralCategoryNameToMaskMapper { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XGraphemeClusterSegmenter.d.ts b/ffi/capi/bindings/js/ICU4XGraphemeClusterSegmenter.d.ts index a7ab500fd37..2cac34c8f75 100644 --- a/ffi/capi/bindings/js/ICU4XGraphemeClusterSegmenter.d.ts +++ b/ffi/capi/bindings/js/ICU4XGraphemeClusterSegmenter.d.ts @@ -1,6 +1,6 @@ import { FFIError } from "./diplomat-runtime" +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; -import { ICU4XError } from "./ICU4XError"; import { ICU4XGraphemeClusterBreakIteratorLatin1 } from "./ICU4XGraphemeClusterBreakIteratorLatin1"; import { ICU4XGraphemeClusterBreakIteratorUtf16 } from "./ICU4XGraphemeClusterBreakIteratorUtf16"; import { ICU4XGraphemeClusterBreakIteratorUtf8 } from "./ICU4XGraphemeClusterBreakIteratorUtf8"; @@ -18,7 +18,7 @@ export class ICU4XGraphemeClusterSegmenter { * Construct an {@link ICU4XGraphemeClusterSegmenter `ICU4XGraphemeClusterSegmenter`}. * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.new Rust documentation for `new`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create(provider: ICU4XDataProvider): ICU4XGraphemeClusterSegmenter | never; diff --git a/ffi/capi/bindings/js/ICU4XGraphemeClusterSegmenter.mjs b/ffi/capi/bindings/js/ICU4XGraphemeClusterSegmenter.mjs index 2f204aec3af..74d6e8bf787 100644 --- a/ffi/capi/bindings/js/ICU4XGraphemeClusterSegmenter.mjs +++ b/ffi/capi/bindings/js/ICU4XGraphemeClusterSegmenter.mjs @@ -1,6 +1,6 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" import { ICU4XGraphemeClusterBreakIteratorLatin1 } from "./ICU4XGraphemeClusterBreakIteratorLatin1.mjs" import { ICU4XGraphemeClusterBreakIteratorUtf16 } from "./ICU4XGraphemeClusterBreakIteratorUtf16.mjs" import { ICU4XGraphemeClusterBreakIteratorUtf8 } from "./ICU4XGraphemeClusterBreakIteratorUtf8.mjs" @@ -29,7 +29,7 @@ export class ICU4XGraphemeClusterSegmenter { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XIsoDate.d.ts b/ffi/capi/bindings/js/ICU4XIsoDate.d.ts index adeffe26a6c..c0d2b05a8b4 100644 --- a/ffi/capi/bindings/js/ICU4XIsoDate.d.ts +++ b/ffi/capi/bindings/js/ICU4XIsoDate.d.ts @@ -1,8 +1,8 @@ import { u8, u16, i32, u32 } from "./diplomat-runtime" import { FFIError } from "./diplomat-runtime" import { ICU4XCalendar } from "./ICU4XCalendar"; +import { ICU4XCalendarError } from "./ICU4XCalendarError"; import { ICU4XDate } from "./ICU4XDate"; -import { ICU4XError } from "./ICU4XError"; import { ICU4XIsoWeekday } from "./ICU4XIsoWeekday"; import { ICU4XWeekCalculator } from "./ICU4XWeekCalculator"; import { ICU4XWeekOf } from "./ICU4XWeekOf"; @@ -20,7 +20,7 @@ export class ICU4XIsoDate { * Creates a new {@link ICU4XIsoDate `ICU4XIsoDate`} from the specified date and time. * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.try_new_iso_date Rust documentation for `try_new_iso_date`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XCalendarError}> */ static create(year: i32, month: u8, day: u8): ICU4XIsoDate | never; diff --git a/ffi/capi/bindings/js/ICU4XIsoDate.mjs b/ffi/capi/bindings/js/ICU4XIsoDate.mjs index 3c0d0ac2f55..f4efc0e66c9 100644 --- a/ffi/capi/bindings/js/ICU4XIsoDate.mjs +++ b/ffi/capi/bindings/js/ICU4XIsoDate.mjs @@ -1,7 +1,7 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" +import { ICU4XCalendarError_js_to_rust, ICU4XCalendarError_rust_to_js } from "./ICU4XCalendarError.mjs" import { ICU4XDate } from "./ICU4XDate.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" import { ICU4XIsoWeekday_js_to_rust, ICU4XIsoWeekday_rust_to_js } from "./ICU4XIsoWeekday.mjs" import { ICU4XWeekOf } from "./ICU4XWeekOf.mjs" import { ICU4XWeekRelativeUnit_js_to_rust, ICU4XWeekRelativeUnit_rust_to_js } from "./ICU4XWeekRelativeUnit.mjs" @@ -30,7 +30,7 @@ export class ICU4XIsoDate { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XCalendarError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XIsoDateTime.d.ts b/ffi/capi/bindings/js/ICU4XIsoDateTime.d.ts index 87e005dcfec..ba3ab72d748 100644 --- a/ffi/capi/bindings/js/ICU4XIsoDateTime.d.ts +++ b/ffi/capi/bindings/js/ICU4XIsoDateTime.d.ts @@ -1,8 +1,8 @@ import { u8, u16, i32, u32 } from "./diplomat-runtime" import { FFIError } from "./diplomat-runtime" import { ICU4XCalendar } from "./ICU4XCalendar"; +import { ICU4XCalendarError } from "./ICU4XCalendarError"; import { ICU4XDateTime } from "./ICU4XDateTime"; -import { ICU4XError } from "./ICU4XError"; import { ICU4XIsoDate } from "./ICU4XIsoDate"; import { ICU4XIsoWeekday } from "./ICU4XIsoWeekday"; import { ICU4XTime } from "./ICU4XTime"; @@ -22,7 +22,7 @@ export class ICU4XIsoDateTime { * Creates a new {@link ICU4XIsoDateTime `ICU4XIsoDateTime`} from the specified date and time. * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.try_new_iso_datetime Rust documentation for `try_new_iso_datetime`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XCalendarError}> */ static create(year: i32, month: u8, day: u8, hour: u8, minute: u8, second: u8, nanosecond: u32): ICU4XIsoDateTime | never; diff --git a/ffi/capi/bindings/js/ICU4XIsoDateTime.mjs b/ffi/capi/bindings/js/ICU4XIsoDateTime.mjs index 293ac2f5d17..ea44253267c 100644 --- a/ffi/capi/bindings/js/ICU4XIsoDateTime.mjs +++ b/ffi/capi/bindings/js/ICU4XIsoDateTime.mjs @@ -1,7 +1,7 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" +import { ICU4XCalendarError_js_to_rust, ICU4XCalendarError_rust_to_js } from "./ICU4XCalendarError.mjs" import { ICU4XDateTime } from "./ICU4XDateTime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" import { ICU4XIsoDate } from "./ICU4XIsoDate.mjs" import { ICU4XIsoWeekday_js_to_rust, ICU4XIsoWeekday_rust_to_js } from "./ICU4XIsoWeekday.mjs" import { ICU4XTime } from "./ICU4XTime.mjs" @@ -32,7 +32,7 @@ export class ICU4XIsoDateTime { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XCalendarError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XLineSegmenter.d.ts b/ffi/capi/bindings/js/ICU4XLineSegmenter.d.ts index 83c21fdf818..47ccd656616 100644 --- a/ffi/capi/bindings/js/ICU4XLineSegmenter.d.ts +++ b/ffi/capi/bindings/js/ICU4XLineSegmenter.d.ts @@ -1,6 +1,6 @@ import { FFIError } from "./diplomat-runtime" +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; -import { ICU4XError } from "./ICU4XError"; import { ICU4XLineBreakIteratorLatin1 } from "./ICU4XLineBreakIteratorLatin1"; import { ICU4XLineBreakIteratorUtf16 } from "./ICU4XLineBreakIteratorUtf16"; import { ICU4XLineBreakIteratorUtf8 } from "./ICU4XLineBreakIteratorUtf8"; @@ -19,7 +19,7 @@ export class ICU4XLineSegmenter { * Construct a {@link ICU4XLineSegmenter `ICU4XLineSegmenter`} with default options. It automatically loads the best available payload data for Burmese, Khmer, Lao, and Thai. * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_auto Rust documentation for `new_auto`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create_auto(provider: ICU4XDataProvider): ICU4XLineSegmenter | never; @@ -28,7 +28,7 @@ export class ICU4XLineSegmenter { * Construct a {@link ICU4XLineSegmenter `ICU4XLineSegmenter`} with default options and LSTM payload data for Burmese, Khmer, Lao, and Thai. * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_lstm Rust documentation for `new_lstm`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create_lstm(provider: ICU4XDataProvider): ICU4XLineSegmenter | never; @@ -37,7 +37,7 @@ export class ICU4XLineSegmenter { * Construct a {@link ICU4XLineSegmenter `ICU4XLineSegmenter`} with default options and dictionary payload data for Burmese, Khmer, Lao, and Thai.. * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_dictionary Rust documentation for `new_dictionary`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create_dictionary(provider: ICU4XDataProvider): ICU4XLineSegmenter | never; @@ -46,7 +46,7 @@ export class ICU4XLineSegmenter { * Construct a {@link ICU4XLineSegmenter `ICU4XLineSegmenter`} with custom options. It automatically loads the best available payload data for Burmese, Khmer, Lao, and Thai. * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_auto_with_options Rust documentation for `new_auto_with_options`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create_auto_with_options_v1(provider: ICU4XDataProvider, options: ICU4XLineBreakOptionsV1): ICU4XLineSegmenter | never; @@ -55,7 +55,7 @@ export class ICU4XLineSegmenter { * Construct a {@link ICU4XLineSegmenter `ICU4XLineSegmenter`} with custom options and LSTM payload data for Burmese, Khmer, Lao, and Thai. * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_lstm_with_options Rust documentation for `new_lstm_with_options`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create_lstm_with_options_v1(provider: ICU4XDataProvider, options: ICU4XLineBreakOptionsV1): ICU4XLineSegmenter | never; @@ -64,7 +64,7 @@ export class ICU4XLineSegmenter { * Construct a {@link ICU4XLineSegmenter `ICU4XLineSegmenter`} with custom options and dictionary payload data for Burmese, Khmer, Lao, and Thai. * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_dictionary_with_options Rust documentation for `new_dictionary_with_options`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create_dictionary_with_options_v1(provider: ICU4XDataProvider, options: ICU4XLineBreakOptionsV1): ICU4XLineSegmenter | never; diff --git a/ffi/capi/bindings/js/ICU4XLineSegmenter.mjs b/ffi/capi/bindings/js/ICU4XLineSegmenter.mjs index 3cd6f9c59c6..fbbf5eccaa0 100644 --- a/ffi/capi/bindings/js/ICU4XLineSegmenter.mjs +++ b/ffi/capi/bindings/js/ICU4XLineSegmenter.mjs @@ -1,6 +1,6 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" import { ICU4XLineBreakIteratorLatin1 } from "./ICU4XLineBreakIteratorLatin1.mjs" import { ICU4XLineBreakIteratorUtf16 } from "./ICU4XLineBreakIteratorUtf16.mjs" import { ICU4XLineBreakIteratorUtf8 } from "./ICU4XLineBreakIteratorUtf8.mjs" @@ -31,7 +31,7 @@ export class ICU4XLineSegmenter { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -48,7 +48,7 @@ export class ICU4XLineSegmenter { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -65,7 +65,7 @@ export class ICU4XLineSegmenter { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -85,7 +85,7 @@ export class ICU4XLineSegmenter { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -105,7 +105,7 @@ export class ICU4XLineSegmenter { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -125,7 +125,7 @@ export class ICU4XLineSegmenter { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XListFormatter.d.ts b/ffi/capi/bindings/js/ICU4XListFormatter.d.ts index 1201d5b38b9..a724f023b17 100644 --- a/ffi/capi/bindings/js/ICU4XListFormatter.d.ts +++ b/ffi/capi/bindings/js/ICU4XListFormatter.d.ts @@ -1,6 +1,6 @@ import { FFIError } from "./diplomat-runtime" +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; -import { ICU4XError } from "./ICU4XError"; import { ICU4XList } from "./ICU4XList"; import { ICU4XListLength } from "./ICU4XListLength"; import { ICU4XLocale } from "./ICU4XLocale"; @@ -16,7 +16,7 @@ export class ICU4XListFormatter { * Construct a new ICU4XListFormatter instance for And patterns * See the {@link https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_and_with_length Rust documentation for `try_new_and_with_length`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create_and_with_length(provider: ICU4XDataProvider, locale: ICU4XLocale, length: ICU4XListLength): ICU4XListFormatter | never; @@ -25,7 +25,7 @@ export class ICU4XListFormatter { * Construct a new ICU4XListFormatter instance for And patterns * See the {@link https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_or_with_length Rust documentation for `try_new_or_with_length`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create_or_with_length(provider: ICU4XDataProvider, locale: ICU4XLocale, length: ICU4XListLength): ICU4XListFormatter | never; @@ -34,7 +34,7 @@ export class ICU4XListFormatter { * Construct a new ICU4XListFormatter instance for And patterns * See the {@link https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_unit_with_length Rust documentation for `try_new_unit_with_length`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create_unit_with_length(provider: ICU4XDataProvider, locale: ICU4XLocale, length: ICU4XListLength): ICU4XListFormatter | never; diff --git a/ffi/capi/bindings/js/ICU4XListFormatter.mjs b/ffi/capi/bindings/js/ICU4XListFormatter.mjs index 7afb4890b2b..b990641461b 100644 --- a/ffi/capi/bindings/js/ICU4XListFormatter.mjs +++ b/ffi/capi/bindings/js/ICU4XListFormatter.mjs @@ -1,6 +1,6 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" import { ICU4XListLength_js_to_rust, ICU4XListLength_rust_to_js } from "./ICU4XListLength.mjs" const ICU4XListFormatter_box_destroy_registry = new FinalizationRegistry(underlying => { @@ -27,7 +27,7 @@ export class ICU4XListFormatter { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -44,7 +44,7 @@ export class ICU4XListFormatter { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -61,7 +61,7 @@ export class ICU4XListFormatter { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XLocale.d.ts b/ffi/capi/bindings/js/ICU4XLocale.d.ts index 3ccdab74186..4b175a3ddb1 100644 --- a/ffi/capi/bindings/js/ICU4XLocale.d.ts +++ b/ffi/capi/bindings/js/ICU4XLocale.d.ts @@ -1,5 +1,5 @@ import { FFIError } from "./diplomat-runtime" -import { ICU4XError } from "./ICU4XError"; +import { ICU4XLocaleParseError } from "./ICU4XLocaleParseError"; import { ICU4XOrdering } from "./ICU4XOrdering"; /** @@ -17,7 +17,7 @@ export class ICU4XLocale { * This will run the complete locale parsing algorithm. If code size and performance are critical and the locale is of a known shape (such as `aa-BB`) use `create_und`, `set_language`, `set_script`, and `set_region`. * See the {@link https://docs.rs/icu/latest/icu/locale/struct.Locale.html#method.try_from_bytes Rust documentation for `try_from_bytes`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XLocaleParseError}> */ static create_from_string(name: string): ICU4XLocale | never; @@ -66,7 +66,7 @@ export class ICU4XLocale { * Set the language part of the {@link ICU4XLocale `ICU4XLocale`}. * See the {@link https://docs.rs/icu/latest/icu/locale/struct.Locale.html#method.try_from_bytes Rust documentation for `try_from_bytes`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XLocaleParseError}> */ set_language(bytes: string): void | never; @@ -83,7 +83,7 @@ export class ICU4XLocale { * Set the region part of the {@link ICU4XLocale `ICU4XLocale`}. * See the {@link https://docs.rs/icu/latest/icu/locale/struct.Locale.html#method.try_from_bytes Rust documentation for `try_from_bytes`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XLocaleParseError}> */ set_region(bytes: string): void | never; @@ -100,7 +100,7 @@ export class ICU4XLocale { * Set the script part of the {@link ICU4XLocale `ICU4XLocale`}. Pass an empty string to remove the script. * See the {@link https://docs.rs/icu/latest/icu/locale/struct.Locale.html#method.try_from_bytes Rust documentation for `try_from_bytes`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XLocaleParseError}> */ set_script(bytes: string): void | never; @@ -111,7 +111,7 @@ export class ICU4XLocale { * Use ICU4XLocaleCanonicalizer for better control and functionality * See the {@link https://docs.rs/icu/latest/icu/locale/struct.Locale.html#method.canonicalize Rust documentation for `canonicalize`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XLocaleParseError}> */ static canonicalize(bytes: string): string | never; diff --git a/ffi/capi/bindings/js/ICU4XLocale.mjs b/ffi/capi/bindings/js/ICU4XLocale.mjs index 11dfc9b796c..2b82c6e441e 100644 --- a/ffi/capi/bindings/js/ICU4XLocale.mjs +++ b/ffi/capi/bindings/js/ICU4XLocale.mjs @@ -1,6 +1,6 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XLocaleParseError_js_to_rust, ICU4XLocaleParseError_rust_to_js } from "./ICU4XLocaleParseError.mjs" import { ICU4XOrdering_js_to_rust, ICU4XOrdering_rust_to_js } from "./ICU4XOrdering.mjs" const ICU4XLocale_box_destroy_registry = new FinalizationRegistry(underlying => { @@ -28,7 +28,7 @@ export class ICU4XLocale { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XLocaleParseError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -80,7 +80,7 @@ export class ICU4XLocale { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XLocaleParseError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -109,7 +109,7 @@ export class ICU4XLocale { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XLocaleParseError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -138,7 +138,7 @@ export class ICU4XLocale { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XLocaleParseError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -159,7 +159,7 @@ export class ICU4XLocale { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XLocaleParseError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XLocaleDirectionality.d.ts b/ffi/capi/bindings/js/ICU4XLocaleDirectionality.d.ts index deac92ce794..932af8d9879 100644 --- a/ffi/capi/bindings/js/ICU4XLocaleDirectionality.d.ts +++ b/ffi/capi/bindings/js/ICU4XLocaleDirectionality.d.ts @@ -1,6 +1,6 @@ import { FFIError } from "./diplomat-runtime" +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; -import { ICU4XError } from "./ICU4XError"; import { ICU4XLocale } from "./ICU4XLocale"; import { ICU4XLocaleDirection } from "./ICU4XLocaleDirection"; import { ICU4XLocaleExpander } from "./ICU4XLocaleExpander"; @@ -16,7 +16,7 @@ export class ICU4XLocaleDirectionality { * Construct a new ICU4XLocaleDirectionality instance * See the {@link https://docs.rs/icu/latest/icu/locale/struct.LocaleDirectionality.html#method.new Rust documentation for `new`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create(provider: ICU4XDataProvider): ICU4XLocaleDirectionality | never; @@ -25,7 +25,7 @@ export class ICU4XLocaleDirectionality { * Construct a new ICU4XLocaleDirectionality instance with a custom expander * See the {@link https://docs.rs/icu/latest/icu/locale/struct.LocaleDirectionality.html#method.new_with_expander Rust documentation for `new_with_expander`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create_with_expander(provider: ICU4XDataProvider, expander: ICU4XLocaleExpander): ICU4XLocaleDirectionality | never; diff --git a/ffi/capi/bindings/js/ICU4XLocaleDirectionality.mjs b/ffi/capi/bindings/js/ICU4XLocaleDirectionality.mjs index 5c75ce89720..b6970a8d2de 100644 --- a/ffi/capi/bindings/js/ICU4XLocaleDirectionality.mjs +++ b/ffi/capi/bindings/js/ICU4XLocaleDirectionality.mjs @@ -1,6 +1,6 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" import { ICU4XLocaleDirection_js_to_rust, ICU4XLocaleDirection_rust_to_js } from "./ICU4XLocaleDirection.mjs" const ICU4XLocaleDirectionality_box_destroy_registry = new FinalizationRegistry(underlying => { @@ -27,7 +27,7 @@ export class ICU4XLocaleDirectionality { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -44,7 +44,7 @@ export class ICU4XLocaleDirectionality { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XLocaleDisplayNamesFormatter.d.ts b/ffi/capi/bindings/js/ICU4XLocaleDisplayNamesFormatter.d.ts index cfc2e8384b4..8ae597d0db0 100644 --- a/ffi/capi/bindings/js/ICU4XLocaleDisplayNamesFormatter.d.ts +++ b/ffi/capi/bindings/js/ICU4XLocaleDisplayNamesFormatter.d.ts @@ -1,7 +1,7 @@ import { FFIError } from "./diplomat-runtime" +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; import { ICU4XDisplayNamesOptionsV1 } from "./ICU4XDisplayNamesOptionsV1"; -import { ICU4XError } from "./ICU4XError"; import { ICU4XLocale } from "./ICU4XLocale"; /** @@ -15,7 +15,7 @@ export class ICU4XLocaleDisplayNamesFormatter { * Creates a new `LocaleDisplayNamesFormatter` from locale data and an options bag. * See the {@link https://docs.rs/icu/latest/icu/displaynames/struct.LocaleDisplayNamesFormatter.html#method.try_new Rust documentation for `try_new`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create(provider: ICU4XDataProvider, locale: ICU4XLocale, options: ICU4XDisplayNamesOptionsV1): ICU4XLocaleDisplayNamesFormatter | never; diff --git a/ffi/capi/bindings/js/ICU4XLocaleDisplayNamesFormatter.mjs b/ffi/capi/bindings/js/ICU4XLocaleDisplayNamesFormatter.mjs index 13672e15ca0..7d4a6cf9e86 100644 --- a/ffi/capi/bindings/js/ICU4XLocaleDisplayNamesFormatter.mjs +++ b/ffi/capi/bindings/js/ICU4XLocaleDisplayNamesFormatter.mjs @@ -1,8 +1,8 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" import { ICU4XDisplayNamesFallback_js_to_rust, ICU4XDisplayNamesFallback_rust_to_js } from "./ICU4XDisplayNamesFallback.mjs" import { ICU4XDisplayNamesStyle_js_to_rust, ICU4XDisplayNamesStyle_rust_to_js } from "./ICU4XDisplayNamesStyle.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" import { ICU4XLanguageDisplay_js_to_rust, ICU4XLanguageDisplay_rust_to_js } from "./ICU4XLanguageDisplay.mjs" const ICU4XLocaleDisplayNamesFormatter_box_destroy_registry = new FinalizationRegistry(underlying => { @@ -32,7 +32,7 @@ export class ICU4XLocaleDisplayNamesFormatter { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XLocaleFallbacker.d.ts b/ffi/capi/bindings/js/ICU4XLocaleFallbacker.d.ts index 2a2e745050d..15b6389de84 100644 --- a/ffi/capi/bindings/js/ICU4XLocaleFallbacker.d.ts +++ b/ffi/capi/bindings/js/ICU4XLocaleFallbacker.d.ts @@ -1,8 +1,9 @@ import { FFIError } from "./diplomat-runtime" +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; -import { ICU4XError } from "./ICU4XError"; import { ICU4XLocaleFallbackConfig } from "./ICU4XLocaleFallbackConfig"; import { ICU4XLocaleFallbackerWithConfig } from "./ICU4XLocaleFallbackerWithConfig"; +import { ICU4XLocaleParseError } from "./ICU4XLocaleParseError"; /** @@ -17,7 +18,7 @@ export class ICU4XLocaleFallbacker { * Creates a new `ICU4XLocaleFallbacker` from a data provider. * See the {@link https://docs.rs/icu/latest/icu/locale/fallback/struct.LocaleFallbacker.html#method.new Rust documentation for `new`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create(provider: ICU4XDataProvider): ICU4XLocaleFallbacker | never; @@ -34,7 +35,7 @@ export class ICU4XLocaleFallbacker { * Associates this `ICU4XLocaleFallbacker` with configuration options. * See the {@link https://docs.rs/icu/latest/icu/locale/fallback/struct.LocaleFallbacker.html#method.for_config Rust documentation for `for_config`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XLocaleParseError}> */ for_config(config: ICU4XLocaleFallbackConfig): ICU4XLocaleFallbackerWithConfig | never; } diff --git a/ffi/capi/bindings/js/ICU4XLocaleFallbacker.mjs b/ffi/capi/bindings/js/ICU4XLocaleFallbacker.mjs index 79e8c780fb7..c79c156ac11 100644 --- a/ffi/capi/bindings/js/ICU4XLocaleFallbacker.mjs +++ b/ffi/capi/bindings/js/ICU4XLocaleFallbacker.mjs @@ -1,9 +1,10 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" import { ICU4XLocaleFallbackPriority_js_to_rust, ICU4XLocaleFallbackPriority_rust_to_js } from "./ICU4XLocaleFallbackPriority.mjs" import { ICU4XLocaleFallbackSupplement_js_to_rust, ICU4XLocaleFallbackSupplement_rust_to_js } from "./ICU4XLocaleFallbackSupplement.mjs" import { ICU4XLocaleFallbackerWithConfig } from "./ICU4XLocaleFallbackerWithConfig.mjs" +import { ICU4XLocaleParseError_js_to_rust, ICU4XLocaleParseError_rust_to_js } from "./ICU4XLocaleParseError.mjs" const ICU4XLocaleFallbacker_box_destroy_registry = new FinalizationRegistry(underlying => { wasm.ICU4XLocaleFallbacker_destroy(underlying); @@ -29,7 +30,7 @@ export class ICU4XLocaleFallbacker { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -54,7 +55,7 @@ export class ICU4XLocaleFallbacker { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XLocaleParseError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XLocaleParseError.d.ts b/ffi/capi/bindings/js/ICU4XLocaleParseError.d.ts new file mode 100644 index 00000000000..ca35cf6df99 --- /dev/null +++ b/ffi/capi/bindings/js/ICU4XLocaleParseError.d.ts @@ -0,0 +1,19 @@ + +/** + + * Additional information: {@link https://docs.rs/icu/latest/icu/locale/enum.ParseError.html 1} + */ +export enum ICU4XLocaleParseError { + /** + */ + Unknown = 'Unknown', + /** + */ + Language = 'Language', + /** + */ + Subtag = 'Subtag', + /** + */ + Extension = 'Extension', +} \ No newline at end of file diff --git a/ffi/capi/bindings/js/ICU4XLocaleParseError.mjs b/ffi/capi/bindings/js/ICU4XLocaleParseError.mjs new file mode 100644 index 00000000000..7d0b4d01313 --- /dev/null +++ b/ffi/capi/bindings/js/ICU4XLocaleParseError.mjs @@ -0,0 +1,23 @@ +import wasm from "./diplomat-wasm.mjs" +import * as diplomatRuntime from "./diplomat-runtime.mjs" + +export const ICU4XLocaleParseError_js_to_rust = { + "Unknown": 0, + "Language": 1, + "Subtag": 2, + "Extension": 3, +}; + +export const ICU4XLocaleParseError_rust_to_js = { + [0]: "Unknown", + [1]: "Language", + [2]: "Subtag", + [3]: "Extension", +}; + +export const ICU4XLocaleParseError = { + "Unknown": "Unknown", + "Language": "Language", + "Subtag": "Subtag", + "Extension": "Extension", +}; diff --git a/ffi/capi/bindings/js/ICU4XMetazoneCalculator.d.ts b/ffi/capi/bindings/js/ICU4XMetazoneCalculator.d.ts index 73b263c21fa..51609a1ad5a 100644 --- a/ffi/capi/bindings/js/ICU4XMetazoneCalculator.d.ts +++ b/ffi/capi/bindings/js/ICU4XMetazoneCalculator.d.ts @@ -1,6 +1,6 @@ import { FFIError } from "./diplomat-runtime" +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; -import { ICU4XError } from "./ICU4XError"; /** @@ -15,7 +15,7 @@ export class ICU4XMetazoneCalculator { /** * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.MetazoneCalculator.html#method.new Rust documentation for `new`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create(provider: ICU4XDataProvider): ICU4XMetazoneCalculator | never; } diff --git a/ffi/capi/bindings/js/ICU4XMetazoneCalculator.mjs b/ffi/capi/bindings/js/ICU4XMetazoneCalculator.mjs index faf0329e50d..de0ad004a07 100644 --- a/ffi/capi/bindings/js/ICU4XMetazoneCalculator.mjs +++ b/ffi/capi/bindings/js/ICU4XMetazoneCalculator.mjs @@ -1,6 +1,6 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" const ICU4XMetazoneCalculator_box_destroy_registry = new FinalizationRegistry(underlying => { wasm.ICU4XMetazoneCalculator_destroy(underlying); @@ -26,7 +26,7 @@ export class ICU4XMetazoneCalculator { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XPluralOperands.d.ts b/ffi/capi/bindings/js/ICU4XPluralOperands.d.ts index 5e545cc5793..74755fcdd13 100644 --- a/ffi/capi/bindings/js/ICU4XPluralOperands.d.ts +++ b/ffi/capi/bindings/js/ICU4XPluralOperands.d.ts @@ -1,6 +1,6 @@ import { FFIError } from "./diplomat-runtime" -import { ICU4XError } from "./ICU4XError"; import { ICU4XFixedDecimal } from "./ICU4XFixedDecimal"; +import { ICU4XFixedDecimalParseError } from "./ICU4XFixedDecimalParseError"; /** @@ -13,7 +13,7 @@ export class ICU4XPluralOperands { * Construct for a given string representing a number * See the {@link https://docs.rs/icu/latest/icu/plurals/struct.PluralOperands.html#method.from_str Rust documentation for `from_str`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XFixedDecimalParseError}> */ static create_from_string(s: string): ICU4XPluralOperands | never; diff --git a/ffi/capi/bindings/js/ICU4XPluralOperands.mjs b/ffi/capi/bindings/js/ICU4XPluralOperands.mjs index f0cb201eac7..74e764c994d 100644 --- a/ffi/capi/bindings/js/ICU4XPluralOperands.mjs +++ b/ffi/capi/bindings/js/ICU4XPluralOperands.mjs @@ -1,6 +1,6 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XFixedDecimalParseError_js_to_rust, ICU4XFixedDecimalParseError_rust_to_js } from "./ICU4XFixedDecimalParseError.mjs" const ICU4XPluralOperands_box_destroy_registry = new FinalizationRegistry(underlying => { wasm.ICU4XPluralOperands_destroy(underlying); @@ -27,7 +27,7 @@ export class ICU4XPluralOperands { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XFixedDecimalParseError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XPluralRules.d.ts b/ffi/capi/bindings/js/ICU4XPluralRules.d.ts index cae8b340151..e193ef31eff 100644 --- a/ffi/capi/bindings/js/ICU4XPluralRules.d.ts +++ b/ffi/capi/bindings/js/ICU4XPluralRules.d.ts @@ -1,6 +1,6 @@ import { FFIError } from "./diplomat-runtime" +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; -import { ICU4XError } from "./ICU4XError"; import { ICU4XLocale } from "./ICU4XLocale"; import { ICU4XPluralCategories } from "./ICU4XPluralCategories"; import { ICU4XPluralCategory } from "./ICU4XPluralCategory"; @@ -17,7 +17,7 @@ export class ICU4XPluralRules { * Construct an {@link ICU4XPluralRules `ICU4XPluralRules`} for the given locale, for cardinal numbers * See the {@link https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html#method.try_new_cardinal Rust documentation for `try_new_cardinal`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create_cardinal(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XPluralRules | never; @@ -26,7 +26,7 @@ export class ICU4XPluralRules { * Construct an {@link ICU4XPluralRules `ICU4XPluralRules`} for the given locale, for ordinal numbers * See the {@link https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html#method.try_new_ordinal Rust documentation for `try_new_ordinal`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create_ordinal(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XPluralRules | never; diff --git a/ffi/capi/bindings/js/ICU4XPluralRules.mjs b/ffi/capi/bindings/js/ICU4XPluralRules.mjs index e6702f1bc75..8ae97fa71a4 100644 --- a/ffi/capi/bindings/js/ICU4XPluralRules.mjs +++ b/ffi/capi/bindings/js/ICU4XPluralRules.mjs @@ -1,6 +1,6 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" import { ICU4XPluralCategories } from "./ICU4XPluralCategories.mjs" import { ICU4XPluralCategory_js_to_rust, ICU4XPluralCategory_rust_to_js } from "./ICU4XPluralCategory.mjs" @@ -28,7 +28,7 @@ export class ICU4XPluralRules { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -45,7 +45,7 @@ export class ICU4XPluralRules { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XPropertyValueNameToEnumMapper.d.ts b/ffi/capi/bindings/js/ICU4XPropertyValueNameToEnumMapper.d.ts index 403f3b583c8..bbe298b9706 100644 --- a/ffi/capi/bindings/js/ICU4XPropertyValueNameToEnumMapper.d.ts +++ b/ffi/capi/bindings/js/ICU4XPropertyValueNameToEnumMapper.d.ts @@ -1,7 +1,7 @@ import { i16 } from "./diplomat-runtime" import { FFIError } from "./diplomat-runtime" +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; -import { ICU4XError } from "./ICU4XError"; /** @@ -36,70 +36,70 @@ export class ICU4XPropertyValueNameToEnumMapper { /** * See the {@link https://docs.rs/icu/latest/icu/properties/struct.GeneralCategory.html#method.name_to_enum_mapper Rust documentation for `name_to_enum_mapper`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_general_category(provider: ICU4XDataProvider): ICU4XPropertyValueNameToEnumMapper | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/struct.HangulSyllableType.html#method.name_to_enum_mapper Rust documentation for `name_to_enum_mapper`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_hangul_syllable_type(provider: ICU4XDataProvider): ICU4XPropertyValueNameToEnumMapper | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/struct.EastAsianWidth.html#method.name_to_enum_mapper Rust documentation for `name_to_enum_mapper`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_east_asian_width(provider: ICU4XDataProvider): ICU4XPropertyValueNameToEnumMapper | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/struct.BidiClass.html#method.name_to_enum_mapper Rust documentation for `name_to_enum_mapper`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_bidi_class(provider: ICU4XDataProvider): ICU4XPropertyValueNameToEnumMapper | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/struct.IndicSyllabicCategory.html#method.name_to_enum_mapper Rust documentation for `name_to_enum_mapper`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_indic_syllabic_category(provider: ICU4XDataProvider): ICU4XPropertyValueNameToEnumMapper | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/struct.LineBreak.html#method.name_to_enum_mapper Rust documentation for `name_to_enum_mapper`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_line_break(provider: ICU4XDataProvider): ICU4XPropertyValueNameToEnumMapper | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/struct.GraphemeClusterBreak.html#method.name_to_enum_mapper Rust documentation for `name_to_enum_mapper`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_grapheme_cluster_break(provider: ICU4XDataProvider): ICU4XPropertyValueNameToEnumMapper | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/struct.WordBreak.html#method.name_to_enum_mapper Rust documentation for `name_to_enum_mapper`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_word_break(provider: ICU4XDataProvider): ICU4XPropertyValueNameToEnumMapper | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/struct.SentenceBreak.html#method.name_to_enum_mapper Rust documentation for `name_to_enum_mapper`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_sentence_break(provider: ICU4XDataProvider): ICU4XPropertyValueNameToEnumMapper | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/struct.Script.html#method.name_to_enum_mapper Rust documentation for `name_to_enum_mapper`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_script(provider: ICU4XDataProvider): ICU4XPropertyValueNameToEnumMapper | never; } diff --git a/ffi/capi/bindings/js/ICU4XPropertyValueNameToEnumMapper.mjs b/ffi/capi/bindings/js/ICU4XPropertyValueNameToEnumMapper.mjs index 6c652d81f1b..36a817885e1 100644 --- a/ffi/capi/bindings/js/ICU4XPropertyValueNameToEnumMapper.mjs +++ b/ffi/capi/bindings/js/ICU4XPropertyValueNameToEnumMapper.mjs @@ -1,6 +1,6 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" const ICU4XPropertyValueNameToEnumMapper_box_destroy_registry = new FinalizationRegistry(underlying => { wasm.ICU4XPropertyValueNameToEnumMapper_destroy(underlying); @@ -40,7 +40,7 @@ export class ICU4XPropertyValueNameToEnumMapper { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -57,7 +57,7 @@ export class ICU4XPropertyValueNameToEnumMapper { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -74,7 +74,7 @@ export class ICU4XPropertyValueNameToEnumMapper { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -91,7 +91,7 @@ export class ICU4XPropertyValueNameToEnumMapper { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -108,7 +108,7 @@ export class ICU4XPropertyValueNameToEnumMapper { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -125,7 +125,7 @@ export class ICU4XPropertyValueNameToEnumMapper { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -142,7 +142,7 @@ export class ICU4XPropertyValueNameToEnumMapper { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -159,7 +159,7 @@ export class ICU4XPropertyValueNameToEnumMapper { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -176,7 +176,7 @@ export class ICU4XPropertyValueNameToEnumMapper { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -193,7 +193,7 @@ export class ICU4XPropertyValueNameToEnumMapper { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XRegionDisplayNames.d.ts b/ffi/capi/bindings/js/ICU4XRegionDisplayNames.d.ts index 0540eb6db74..9b9616e8c5d 100644 --- a/ffi/capi/bindings/js/ICU4XRegionDisplayNames.d.ts +++ b/ffi/capi/bindings/js/ICU4XRegionDisplayNames.d.ts @@ -1,7 +1,8 @@ import { FFIError } from "./diplomat-runtime" +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; -import { ICU4XError } from "./ICU4XError"; import { ICU4XLocale } from "./ICU4XLocale"; +import { ICU4XLocaleParseError } from "./ICU4XLocaleParseError"; /** @@ -14,7 +15,7 @@ export class ICU4XRegionDisplayNames { * Creates a new `RegionDisplayNames` from locale data and an options bag. * See the {@link https://docs.rs/icu/latest/icu/displaynames/struct.RegionDisplayNames.html#method.try_new Rust documentation for `try_new`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XRegionDisplayNames | never; @@ -23,7 +24,7 @@ export class ICU4XRegionDisplayNames { * Returns the locale specific display name of a region. Note that the function returns an empty string in case the display name for a given region code is not found. * See the {@link https://docs.rs/icu/latest/icu/displaynames/struct.RegionDisplayNames.html#method.of Rust documentation for `of`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XLocaleParseError}> */ of(region: string): string | never; } diff --git a/ffi/capi/bindings/js/ICU4XRegionDisplayNames.mjs b/ffi/capi/bindings/js/ICU4XRegionDisplayNames.mjs index 1ca6ca02401..8d225f8c884 100644 --- a/ffi/capi/bindings/js/ICU4XRegionDisplayNames.mjs +++ b/ffi/capi/bindings/js/ICU4XRegionDisplayNames.mjs @@ -1,6 +1,7 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" +import { ICU4XLocaleParseError_js_to_rust, ICU4XLocaleParseError_rust_to_js } from "./ICU4XLocaleParseError.mjs" const ICU4XRegionDisplayNames_box_destroy_registry = new FinalizationRegistry(underlying => { wasm.ICU4XRegionDisplayNames_destroy(underlying); @@ -26,7 +27,7 @@ export class ICU4XRegionDisplayNames { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -45,7 +46,7 @@ export class ICU4XRegionDisplayNames { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XLocaleParseError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XScriptWithExtensions.d.ts b/ffi/capi/bindings/js/ICU4XScriptWithExtensions.d.ts index 7f138e571c4..3955940e66f 100644 --- a/ffi/capi/bindings/js/ICU4XScriptWithExtensions.d.ts +++ b/ffi/capi/bindings/js/ICU4XScriptWithExtensions.d.ts @@ -1,8 +1,8 @@ import { u16, u32 } from "./diplomat-runtime" import { FFIError } from "./diplomat-runtime" import { ICU4XCodePointRangeIterator } from "./ICU4XCodePointRangeIterator"; +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; -import { ICU4XError } from "./ICU4XError"; import { ICU4XScriptWithExtensionsBorrowed } from "./ICU4XScriptWithExtensionsBorrowed"; /** @@ -16,7 +16,7 @@ export class ICU4XScriptWithExtensions { /** * See the {@link https://docs.rs/icu/latest/icu/properties/script/fn.script_with_extensions.html Rust documentation for `script_with_extensions`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create(provider: ICU4XDataProvider): ICU4XScriptWithExtensions | never; diff --git a/ffi/capi/bindings/js/ICU4XScriptWithExtensions.mjs b/ffi/capi/bindings/js/ICU4XScriptWithExtensions.mjs index 5a6fbb49c64..abb6743aefd 100644 --- a/ffi/capi/bindings/js/ICU4XScriptWithExtensions.mjs +++ b/ffi/capi/bindings/js/ICU4XScriptWithExtensions.mjs @@ -1,7 +1,7 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" import { ICU4XCodePointRangeIterator } from "./ICU4XCodePointRangeIterator.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" import { ICU4XScriptWithExtensionsBorrowed } from "./ICU4XScriptWithExtensionsBorrowed.mjs" const ICU4XScriptWithExtensions_box_destroy_registry = new FinalizationRegistry(underlying => { @@ -28,7 +28,7 @@ export class ICU4XScriptWithExtensions { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XSentenceSegmenter.d.ts b/ffi/capi/bindings/js/ICU4XSentenceSegmenter.d.ts index fc3ae7d232b..0d7ee78230e 100644 --- a/ffi/capi/bindings/js/ICU4XSentenceSegmenter.d.ts +++ b/ffi/capi/bindings/js/ICU4XSentenceSegmenter.d.ts @@ -1,6 +1,6 @@ import { FFIError } from "./diplomat-runtime" +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; -import { ICU4XError } from "./ICU4XError"; import { ICU4XSentenceBreakIteratorLatin1 } from "./ICU4XSentenceBreakIteratorLatin1"; import { ICU4XSentenceBreakIteratorUtf16 } from "./ICU4XSentenceBreakIteratorUtf16"; import { ICU4XSentenceBreakIteratorUtf8 } from "./ICU4XSentenceBreakIteratorUtf8"; @@ -18,7 +18,7 @@ export class ICU4XSentenceSegmenter { * Construct an {@link ICU4XSentenceSegmenter `ICU4XSentenceSegmenter`}. * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html#method.new Rust documentation for `new`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create(provider: ICU4XDataProvider): ICU4XSentenceSegmenter | never; diff --git a/ffi/capi/bindings/js/ICU4XSentenceSegmenter.mjs b/ffi/capi/bindings/js/ICU4XSentenceSegmenter.mjs index 61a97a39f9c..57f824703d8 100644 --- a/ffi/capi/bindings/js/ICU4XSentenceSegmenter.mjs +++ b/ffi/capi/bindings/js/ICU4XSentenceSegmenter.mjs @@ -1,6 +1,6 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" import { ICU4XSentenceBreakIteratorLatin1 } from "./ICU4XSentenceBreakIteratorLatin1.mjs" import { ICU4XSentenceBreakIteratorUtf16 } from "./ICU4XSentenceBreakIteratorUtf16.mjs" import { ICU4XSentenceBreakIteratorUtf8 } from "./ICU4XSentenceBreakIteratorUtf8.mjs" @@ -29,7 +29,7 @@ export class ICU4XSentenceSegmenter { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XTime.d.ts b/ffi/capi/bindings/js/ICU4XTime.d.ts index c891eb9bd41..a2244b84728 100644 --- a/ffi/capi/bindings/js/ICU4XTime.d.ts +++ b/ffi/capi/bindings/js/ICU4XTime.d.ts @@ -1,6 +1,6 @@ import { u8, u32 } from "./diplomat-runtime" import { FFIError } from "./diplomat-runtime" -import { ICU4XError } from "./ICU4XError"; +import { ICU4XCalendarError } from "./ICU4XCalendarError"; /** @@ -15,7 +15,7 @@ export class ICU4XTime { * Creates a new {@link ICU4XTime `ICU4XTime`} given field values * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Time.html#method.try_new Rust documentation for `try_new`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XCalendarError}> */ static create(hour: u8, minute: u8, second: u8, nanosecond: u32): ICU4XTime | never; @@ -24,7 +24,7 @@ export class ICU4XTime { * Creates a new {@link ICU4XTime `ICU4XTime`} representing midnight (00:00.000). * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Time.html#method.midnight Rust documentation for `midnight`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XCalendarError}> */ static create_midnight(): ICU4XTime | never; diff --git a/ffi/capi/bindings/js/ICU4XTime.mjs b/ffi/capi/bindings/js/ICU4XTime.mjs index c5530817d02..fafb9d48daa 100644 --- a/ffi/capi/bindings/js/ICU4XTime.mjs +++ b/ffi/capi/bindings/js/ICU4XTime.mjs @@ -1,6 +1,6 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XCalendarError_js_to_rust, ICU4XCalendarError_rust_to_js } from "./ICU4XCalendarError.mjs" const ICU4XTime_box_destroy_registry = new FinalizationRegistry(underlying => { wasm.ICU4XTime_destroy(underlying); @@ -26,7 +26,7 @@ export class ICU4XTime { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XCalendarError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -43,7 +43,7 @@ export class ICU4XTime { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XCalendarError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XTimeZoneIdMapper.d.ts b/ffi/capi/bindings/js/ICU4XTimeZoneIdMapper.d.ts index 3424fcd61cc..c9f94407e31 100644 --- a/ffi/capi/bindings/js/ICU4XTimeZoneIdMapper.d.ts +++ b/ffi/capi/bindings/js/ICU4XTimeZoneIdMapper.d.ts @@ -1,6 +1,7 @@ import { FFIError } from "./diplomat-runtime" +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; -import { ICU4XError } from "./ICU4XError"; +import { ICU4XTimeZoneInvalidIdError } from "./ICU4XTimeZoneInvalidIdError"; /** @@ -15,35 +16,35 @@ export class ICU4XTimeZoneIdMapper { /** * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapper.html#method.new Rust documentation for `new`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create(provider: ICU4XDataProvider): ICU4XTimeZoneIdMapper | never; /** * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapperBorrowed.html#method.iana_to_bcp47 Rust documentation for `iana_to_bcp47`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XTimeZoneInvalidIdError}> */ iana_to_bcp47(value: string): string | never; /** * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapperBorrowed.html#method.normalize_iana Rust documentation for `normalize_iana`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XTimeZoneInvalidIdError}> */ normalize_iana(value: string): string | never; /** * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapperBorrowed.html#method.canonicalize_iana Rust documentation for `canonicalize_iana`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XTimeZoneInvalidIdError}> */ canonicalize_iana(value: string): string | never; /** * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapperBorrowed.html#method.find_canonical_iana_from_bcp47 Rust documentation for `find_canonical_iana_from_bcp47`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XTimeZoneInvalidIdError}> */ find_canonical_iana_from_bcp47(value: string): string | never; } diff --git a/ffi/capi/bindings/js/ICU4XTimeZoneIdMapper.mjs b/ffi/capi/bindings/js/ICU4XTimeZoneIdMapper.mjs index d334d03f51c..7086a9a47a7 100644 --- a/ffi/capi/bindings/js/ICU4XTimeZoneIdMapper.mjs +++ b/ffi/capi/bindings/js/ICU4XTimeZoneIdMapper.mjs @@ -1,6 +1,7 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" +import { ICU4XTimeZoneInvalidIdError_js_to_rust, ICU4XTimeZoneInvalidIdError_rust_to_js } from "./ICU4XTimeZoneInvalidIdError.mjs" const ICU4XTimeZoneIdMapper_box_destroy_registry = new FinalizationRegistry(underlying => { wasm.ICU4XTimeZoneIdMapper_destroy(underlying); @@ -26,7 +27,7 @@ export class ICU4XTimeZoneIdMapper { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -45,7 +46,7 @@ export class ICU4XTimeZoneIdMapper { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XTimeZoneInvalidIdError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -67,7 +68,7 @@ export class ICU4XTimeZoneIdMapper { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XTimeZoneInvalidIdError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -89,7 +90,7 @@ export class ICU4XTimeZoneIdMapper { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XTimeZoneInvalidIdError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -111,7 +112,7 @@ export class ICU4XTimeZoneIdMapper { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XTimeZoneInvalidIdError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XTimeZoneIdMapperWithFastCanonicalization.d.ts b/ffi/capi/bindings/js/ICU4XTimeZoneIdMapperWithFastCanonicalization.d.ts index b6cadd9a0f1..1626f513e25 100644 --- a/ffi/capi/bindings/js/ICU4XTimeZoneIdMapperWithFastCanonicalization.d.ts +++ b/ffi/capi/bindings/js/ICU4XTimeZoneIdMapperWithFastCanonicalization.d.ts @@ -1,6 +1,7 @@ import { FFIError } from "./diplomat-runtime" +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; -import { ICU4XError } from "./ICU4XError"; +import { ICU4XTimeZoneInvalidIdError } from "./ICU4XTimeZoneInvalidIdError"; /** @@ -15,21 +16,21 @@ export class ICU4XTimeZoneIdMapperWithFastCanonicalization { /** * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapperWithFastCanonicalization.html#method.new Rust documentation for `new`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create(provider: ICU4XDataProvider): ICU4XTimeZoneIdMapperWithFastCanonicalization | never; /** * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapperWithFastCanonicalizationBorrowed.html#method.canonicalize_iana Rust documentation for `canonicalize_iana`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XTimeZoneInvalidIdError}> */ canonicalize_iana(value: string): string | never; /** * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapperWithFastCanonicalizationBorrowed.html#method.canonical_iana_from_bcp47 Rust documentation for `canonical_iana_from_bcp47`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XTimeZoneInvalidIdError}> */ canonical_iana_from_bcp47(value: string): string | never; } diff --git a/ffi/capi/bindings/js/ICU4XTimeZoneIdMapperWithFastCanonicalization.mjs b/ffi/capi/bindings/js/ICU4XTimeZoneIdMapperWithFastCanonicalization.mjs index c37f2d8388d..ba60d646a49 100644 --- a/ffi/capi/bindings/js/ICU4XTimeZoneIdMapperWithFastCanonicalization.mjs +++ b/ffi/capi/bindings/js/ICU4XTimeZoneIdMapperWithFastCanonicalization.mjs @@ -1,6 +1,7 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" +import { ICU4XTimeZoneInvalidIdError_js_to_rust, ICU4XTimeZoneInvalidIdError_rust_to_js } from "./ICU4XTimeZoneInvalidIdError.mjs" const ICU4XTimeZoneIdMapperWithFastCanonicalization_box_destroy_registry = new FinalizationRegistry(underlying => { wasm.ICU4XTimeZoneIdMapperWithFastCanonicalization_destroy(underlying); @@ -26,7 +27,7 @@ export class ICU4XTimeZoneIdMapperWithFastCanonicalization { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -45,7 +46,7 @@ export class ICU4XTimeZoneIdMapperWithFastCanonicalization { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XTimeZoneInvalidIdError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -67,7 +68,7 @@ export class ICU4XTimeZoneIdMapperWithFastCanonicalization { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XTimeZoneInvalidIdError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XTimeZoneInvalidIdError.d.ts b/ffi/capi/bindings/js/ICU4XTimeZoneInvalidIdError.d.ts new file mode 100644 index 00000000000..5f8d8d24ba1 --- /dev/null +++ b/ffi/capi/bindings/js/ICU4XTimeZoneInvalidIdError.d.ts @@ -0,0 +1,8 @@ + +/** + */ +export enum ICU4XTimeZoneInvalidIdError { + /** + */ + TodoZst = 'TodoZst', +} \ No newline at end of file diff --git a/ffi/capi/bindings/js/ICU4XTimeZoneInvalidIdError.mjs b/ffi/capi/bindings/js/ICU4XTimeZoneInvalidIdError.mjs new file mode 100644 index 00000000000..55e6eb3078b --- /dev/null +++ b/ffi/capi/bindings/js/ICU4XTimeZoneInvalidIdError.mjs @@ -0,0 +1,14 @@ +import wasm from "./diplomat-wasm.mjs" +import * as diplomatRuntime from "./diplomat-runtime.mjs" + +export const ICU4XTimeZoneInvalidIdError_js_to_rust = { + "TodoZst": 0, +}; + +export const ICU4XTimeZoneInvalidIdError_rust_to_js = { + [0]: "TodoZst", +}; + +export const ICU4XTimeZoneInvalidIdError = { + "TodoZst": "TodoZst", +}; diff --git a/ffi/capi/bindings/js/ICU4XTimeZoneInvalidOffsetError.d.ts b/ffi/capi/bindings/js/ICU4XTimeZoneInvalidOffsetError.d.ts new file mode 100644 index 00000000000..06c27b7ea88 --- /dev/null +++ b/ffi/capi/bindings/js/ICU4XTimeZoneInvalidOffsetError.d.ts @@ -0,0 +1,10 @@ + +/** + + * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.InvalidOffsetError.html 1} + */ +export enum ICU4XTimeZoneInvalidOffsetError { + /** + */ + TodoZst = 'TodoZst', +} \ No newline at end of file diff --git a/ffi/capi/bindings/js/ICU4XTimeZoneInvalidOffsetError.mjs b/ffi/capi/bindings/js/ICU4XTimeZoneInvalidOffsetError.mjs new file mode 100644 index 00000000000..d432d4f742c --- /dev/null +++ b/ffi/capi/bindings/js/ICU4XTimeZoneInvalidOffsetError.mjs @@ -0,0 +1,14 @@ +import wasm from "./diplomat-wasm.mjs" +import * as diplomatRuntime from "./diplomat-runtime.mjs" + +export const ICU4XTimeZoneInvalidOffsetError_js_to_rust = { + "TodoZst": 0, +}; + +export const ICU4XTimeZoneInvalidOffsetError_rust_to_js = { + [0]: "TodoZst", +}; + +export const ICU4XTimeZoneInvalidOffsetError = { + "TodoZst": "TodoZst", +}; diff --git a/ffi/capi/bindings/js/ICU4XTitlecaseMapper.d.ts b/ffi/capi/bindings/js/ICU4XTitlecaseMapper.d.ts index 9e138c6b0f5..6b319257d76 100644 --- a/ffi/capi/bindings/js/ICU4XTitlecaseMapper.d.ts +++ b/ffi/capi/bindings/js/ICU4XTitlecaseMapper.d.ts @@ -1,6 +1,6 @@ import { FFIError } from "./diplomat-runtime" +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; -import { ICU4XError } from "./ICU4XError"; import { ICU4XLocale } from "./ICU4XLocale"; import { ICU4XTitlecaseOptionsV1 } from "./ICU4XTitlecaseOptionsV1"; @@ -15,7 +15,7 @@ export class ICU4XTitlecaseMapper { * Construct a new `ICU4XTitlecaseMapper` instance * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.TitlecaseMapper.html#method.new Rust documentation for `new`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create(provider: ICU4XDataProvider): ICU4XTitlecaseMapper | never; diff --git a/ffi/capi/bindings/js/ICU4XTitlecaseMapper.mjs b/ffi/capi/bindings/js/ICU4XTitlecaseMapper.mjs index ab67a918c25..93b9951858b 100644 --- a/ffi/capi/bindings/js/ICU4XTitlecaseMapper.mjs +++ b/ffi/capi/bindings/js/ICU4XTitlecaseMapper.mjs @@ -1,6 +1,6 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" import { ICU4XLeadingAdjustment_js_to_rust, ICU4XLeadingAdjustment_rust_to_js } from "./ICU4XLeadingAdjustment.mjs" import { ICU4XTrailingCase_js_to_rust, ICU4XTrailingCase_rust_to_js } from "./ICU4XTrailingCase.mjs" @@ -28,7 +28,7 @@ export class ICU4XTitlecaseMapper { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XUnicodeSetData.d.ts b/ffi/capi/bindings/js/ICU4XUnicodeSetData.d.ts index 117ae86f2cd..edd225e5c30 100644 --- a/ffi/capi/bindings/js/ICU4XUnicodeSetData.d.ts +++ b/ffi/capi/bindings/js/ICU4XUnicodeSetData.d.ts @@ -1,7 +1,7 @@ import { u32, char } from "./diplomat-runtime" import { FFIError } from "./diplomat-runtime" +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; -import { ICU4XError } from "./ICU4XError"; import { ICU4XLocale } from "./ICU4XLocale"; /** @@ -41,42 +41,42 @@ export class ICU4XUnicodeSetData { /** * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.basic_emoji.html Rust documentation for `basic_emoji`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_basic_emoji(provider: ICU4XDataProvider): ICU4XUnicodeSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_main.html Rust documentation for `exemplars_main`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_exemplars_main(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XUnicodeSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_auxiliary.html Rust documentation for `exemplars_auxiliary`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_exemplars_auxiliary(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XUnicodeSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_punctuation.html Rust documentation for `exemplars_punctuation`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_exemplars_punctuation(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XUnicodeSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_numbers.html Rust documentation for `exemplars_numbers`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_exemplars_numbers(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XUnicodeSetData | never; /** * See the {@link https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_index.html Rust documentation for `exemplars_index`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static load_exemplars_index(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XUnicodeSetData | never; } diff --git a/ffi/capi/bindings/js/ICU4XUnicodeSetData.mjs b/ffi/capi/bindings/js/ICU4XUnicodeSetData.mjs index f9c2cbf622e..386a5598a89 100644 --- a/ffi/capi/bindings/js/ICU4XUnicodeSetData.mjs +++ b/ffi/capi/bindings/js/ICU4XUnicodeSetData.mjs @@ -1,6 +1,6 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" const ICU4XUnicodeSetData_box_destroy_registry = new FinalizationRegistry(underlying => { wasm.ICU4XUnicodeSetData_destroy(underlying); @@ -41,7 +41,7 @@ export class ICU4XUnicodeSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -58,7 +58,7 @@ export class ICU4XUnicodeSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -75,7 +75,7 @@ export class ICU4XUnicodeSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -92,7 +92,7 @@ export class ICU4XUnicodeSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -109,7 +109,7 @@ export class ICU4XUnicodeSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -126,7 +126,7 @@ export class ICU4XUnicodeSetData { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XUnitsConverterFactory.d.ts b/ffi/capi/bindings/js/ICU4XUnitsConverterFactory.d.ts index 58a682a2456..9a2e6008b7d 100644 --- a/ffi/capi/bindings/js/ICU4XUnitsConverterFactory.d.ts +++ b/ffi/capi/bindings/js/ICU4XUnitsConverterFactory.d.ts @@ -1,6 +1,6 @@ import { FFIError } from "./diplomat-runtime" +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; -import { ICU4XError } from "./ICU4XError"; import { ICU4XMeasureUnit } from "./ICU4XMeasureUnit"; import { ICU4XMeasureUnitParser } from "./ICU4XMeasureUnitParser"; import { ICU4XUnitsConverter } from "./ICU4XUnitsConverter"; @@ -18,7 +18,7 @@ export class ICU4XUnitsConverterFactory { * Construct a new {@link ICU4XUnitsConverterFactory `ICU4XUnitsConverterFactory`} instance. * See the {@link https://docs.rs/icu/latest/icu/experimental/units/converter_factory/struct.ConverterFactory.html#method.new Rust documentation for `new`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create(provider: ICU4XDataProvider): ICU4XUnitsConverterFactory | never; diff --git a/ffi/capi/bindings/js/ICU4XUnitsConverterFactory.mjs b/ffi/capi/bindings/js/ICU4XUnitsConverterFactory.mjs index e06a7e96690..b5769ab990a 100644 --- a/ffi/capi/bindings/js/ICU4XUnitsConverterFactory.mjs +++ b/ffi/capi/bindings/js/ICU4XUnitsConverterFactory.mjs @@ -1,6 +1,6 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" import { ICU4XMeasureUnitParser } from "./ICU4XMeasureUnitParser.mjs" import { ICU4XUnitsConverter } from "./ICU4XUnitsConverter.mjs" @@ -28,7 +28,7 @@ export class ICU4XUnitsConverterFactory { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XWeekCalculator.d.ts b/ffi/capi/bindings/js/ICU4XWeekCalculator.d.ts index 96146b931ae..15e7f5feb5c 100644 --- a/ffi/capi/bindings/js/ICU4XWeekCalculator.d.ts +++ b/ffi/capi/bindings/js/ICU4XWeekCalculator.d.ts @@ -1,7 +1,7 @@ import { u8 } from "./diplomat-runtime" import { FFIError } from "./diplomat-runtime" +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; -import { ICU4XError } from "./ICU4XError"; import { ICU4XIsoWeekday } from "./ICU4XIsoWeekday"; import { ICU4XLocale } from "./ICU4XLocale"; import { ICU4XWeekendContainsDay } from "./ICU4XWeekendContainsDay"; @@ -19,7 +19,7 @@ export class ICU4XWeekCalculator { * Creates a new {@link ICU4XWeekCalculator `ICU4XWeekCalculator`} from locale data. * See the {@link https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#method.try_new Rust documentation for `try_new`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XWeekCalculator | never; diff --git a/ffi/capi/bindings/js/ICU4XWeekCalculator.mjs b/ffi/capi/bindings/js/ICU4XWeekCalculator.mjs index 9b86b8f2cb9..502c88e493c 100644 --- a/ffi/capi/bindings/js/ICU4XWeekCalculator.mjs +++ b/ffi/capi/bindings/js/ICU4XWeekCalculator.mjs @@ -1,6 +1,6 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" import { ICU4XIsoWeekday_js_to_rust, ICU4XIsoWeekday_rust_to_js } from "./ICU4XIsoWeekday.mjs" import { ICU4XWeekendContainsDay } from "./ICU4XWeekendContainsDay.mjs" @@ -28,7 +28,7 @@ export class ICU4XWeekCalculator { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/ICU4XWordSegmenter.d.ts b/ffi/capi/bindings/js/ICU4XWordSegmenter.d.ts index 6275d43847b..ac6e4c7544a 100644 --- a/ffi/capi/bindings/js/ICU4XWordSegmenter.d.ts +++ b/ffi/capi/bindings/js/ICU4XWordSegmenter.d.ts @@ -1,6 +1,6 @@ import { FFIError } from "./diplomat-runtime" +import { ICU4XDataError } from "./ICU4XDataError"; import { ICU4XDataProvider } from "./ICU4XDataProvider"; -import { ICU4XError } from "./ICU4XError"; import { ICU4XWordBreakIteratorLatin1 } from "./ICU4XWordBreakIteratorLatin1"; import { ICU4XWordBreakIteratorUtf16 } from "./ICU4XWordBreakIteratorUtf16"; import { ICU4XWordBreakIteratorUtf8 } from "./ICU4XWordBreakIteratorUtf8"; @@ -20,7 +20,7 @@ export class ICU4XWordSegmenter { * Note: currently, it uses dictionary for Chinese and Japanese, and LSTM for Burmese, Khmer, Lao, and Thai. * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.new_auto Rust documentation for `new_auto`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create_auto(provider: ICU4XDataProvider): ICU4XWordSegmenter | never; @@ -31,7 +31,7 @@ export class ICU4XWordSegmenter { * Warning: {@link ICU4XWordSegmenter `ICU4XWordSegmenter`} created by this function doesn't handle Chinese or Japanese. * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.new_lstm Rust documentation for `new_lstm`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create_lstm(provider: ICU4XDataProvider): ICU4XWordSegmenter | never; @@ -40,7 +40,7 @@ export class ICU4XWordSegmenter { * Construct an {@link ICU4XWordSegmenter `ICU4XWordSegmenter`} with dictionary payload data for Chinese, Japanese, Burmese, Khmer, Lao, and Thai. * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.new_dictionary Rust documentation for `new_dictionary`} for more information. - * @throws {@link FFIError}<{@link ICU4XError}> + * @throws {@link FFIError}<{@link ICU4XDataError}> */ static create_dictionary(provider: ICU4XDataProvider): ICU4XWordSegmenter | never; diff --git a/ffi/capi/bindings/js/ICU4XWordSegmenter.mjs b/ffi/capi/bindings/js/ICU4XWordSegmenter.mjs index ad24648ab5c..795ea5e2d43 100644 --- a/ffi/capi/bindings/js/ICU4XWordSegmenter.mjs +++ b/ffi/capi/bindings/js/ICU4XWordSegmenter.mjs @@ -1,6 +1,6 @@ import wasm from "./diplomat-wasm.mjs" import * as diplomatRuntime from "./diplomat-runtime.mjs" -import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.mjs" +import { ICU4XDataError_js_to_rust, ICU4XDataError_rust_to_js } from "./ICU4XDataError.mjs" import { ICU4XWordBreakIteratorLatin1 } from "./ICU4XWordBreakIteratorLatin1.mjs" import { ICU4XWordBreakIteratorUtf16 } from "./ICU4XWordBreakIteratorUtf16.mjs" import { ICU4XWordBreakIteratorUtf8 } from "./ICU4XWordBreakIteratorUtf8.mjs" @@ -29,7 +29,7 @@ export class ICU4XWordSegmenter { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -46,7 +46,7 @@ export class ICU4XWordSegmenter { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } @@ -63,7 +63,7 @@ export class ICU4XWordSegmenter { wasm.diplomat_free(diplomat_receive_buffer, 5, 4); return ok_value; } else { - const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; + const throw_value = ICU4XDataError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)]; wasm.diplomat_free(diplomat_receive_buffer, 5, 4); throw new diplomatRuntime.FFIError(throw_value); } diff --git a/ffi/capi/bindings/js/index.d.ts b/ffi/capi/bindings/js/index.d.ts index d4620c5b971..19bff00916f 100644 --- a/ffi/capi/bindings/js/index.d.ts +++ b/ffi/capi/bindings/js/index.d.ts @@ -5,6 +5,7 @@ export { ICU4XBidiDirection } from './ICU4XBidiDirection'; export { ICU4XBidiInfo } from './ICU4XBidiInfo'; export { ICU4XBidiParagraph } from './ICU4XBidiParagraph'; export { ICU4XCalendar } from './ICU4XCalendar'; +export { ICU4XCalendarError } from './ICU4XCalendarError'; export { ICU4XCanonicalCombiningClassMap } from './ICU4XCanonicalCombiningClassMap'; export { ICU4XCanonicalComposition } from './ICU4XCanonicalComposition'; export { ICU4XCanonicalDecomposition } from './ICU4XCanonicalDecomposition'; @@ -28,6 +29,7 @@ export { ICU4XCollatorResolvedOptionsV1 } from './ICU4XCollatorResolvedOptionsV1 export { ICU4XCollatorStrength } from './ICU4XCollatorStrength'; export { ICU4XComposingNormalizer } from './ICU4XComposingNormalizer'; export { ICU4XCustomTimeZone } from './ICU4XCustomTimeZone'; +export { ICU4XDataError } from './ICU4XDataError'; export { ICU4XDataProvider } from './ICU4XDataProvider'; export { ICU4XDataStruct } from './ICU4XDataStruct'; export { ICU4XDate } from './ICU4XDate'; @@ -44,6 +46,8 @@ export { ICU4XError } from './ICU4XError'; export { ICU4XFixedDecimal } from './ICU4XFixedDecimal'; export { ICU4XFixedDecimalFormatter } from './ICU4XFixedDecimalFormatter'; export { ICU4XFixedDecimalGroupingStrategy } from './ICU4XFixedDecimalGroupingStrategy'; +export { ICU4XFixedDecimalLimitError } from './ICU4XFixedDecimalLimitError'; +export { ICU4XFixedDecimalParseError } from './ICU4XFixedDecimalParseError'; export { ICU4XFixedDecimalRoundingIncrement } from './ICU4XFixedDecimalRoundingIncrement'; export { ICU4XFixedDecimalSign } from './ICU4XFixedDecimalSign'; export { ICU4XFixedDecimalSignDisplay } from './ICU4XFixedDecimalSignDisplay'; @@ -86,6 +90,7 @@ export { ICU4XLocaleFallbackPriority } from './ICU4XLocaleFallbackPriority'; export { ICU4XLocaleFallbackSupplement } from './ICU4XLocaleFallbackSupplement'; export { ICU4XLocaleFallbacker } from './ICU4XLocaleFallbacker'; export { ICU4XLocaleFallbackerWithConfig } from './ICU4XLocaleFallbackerWithConfig'; +export { ICU4XLocaleParseError } from './ICU4XLocaleParseError'; export { ICU4XLogger } from './ICU4XLogger'; export { ICU4XMeasureUnit } from './ICU4XMeasureUnit'; export { ICU4XMeasureUnitParser } from './ICU4XMeasureUnitParser'; @@ -112,6 +117,8 @@ export { ICU4XTimeLength } from './ICU4XTimeLength'; export { ICU4XTimeZoneFormatter } from './ICU4XTimeZoneFormatter'; export { ICU4XTimeZoneIdMapper } from './ICU4XTimeZoneIdMapper'; export { ICU4XTimeZoneIdMapperWithFastCanonicalization } from './ICU4XTimeZoneIdMapperWithFastCanonicalization'; +export { ICU4XTimeZoneInvalidIdError } from './ICU4XTimeZoneInvalidIdError'; +export { ICU4XTimeZoneInvalidOffsetError } from './ICU4XTimeZoneInvalidOffsetError'; export { ICU4XTitlecaseMapper } from './ICU4XTitlecaseMapper'; export { ICU4XTitlecaseOptionsV1 } from './ICU4XTitlecaseOptionsV1'; export { ICU4XTrailingCase } from './ICU4XTrailingCase'; diff --git a/ffi/capi/bindings/js/index.mjs b/ffi/capi/bindings/js/index.mjs index db5a5dee895..82c3a6204cc 100644 --- a/ffi/capi/bindings/js/index.mjs +++ b/ffi/capi/bindings/js/index.mjs @@ -5,6 +5,7 @@ export { ICU4XBidiDirection } from './ICU4XBidiDirection.mjs'; export { ICU4XBidiInfo } from './ICU4XBidiInfo.mjs'; export { ICU4XBidiParagraph } from './ICU4XBidiParagraph.mjs'; export { ICU4XCalendar } from './ICU4XCalendar.mjs'; +export { ICU4XCalendarError } from './ICU4XCalendarError.mjs'; export { ICU4XCanonicalCombiningClassMap } from './ICU4XCanonicalCombiningClassMap.mjs'; export { ICU4XCanonicalComposition } from './ICU4XCanonicalComposition.mjs'; export { ICU4XCanonicalDecomposition } from './ICU4XCanonicalDecomposition.mjs'; @@ -28,6 +29,7 @@ export { ICU4XCollatorResolvedOptionsV1 } from './ICU4XCollatorResolvedOptionsV1 export { ICU4XCollatorStrength } from './ICU4XCollatorStrength.mjs'; export { ICU4XComposingNormalizer } from './ICU4XComposingNormalizer.mjs'; export { ICU4XCustomTimeZone } from './ICU4XCustomTimeZone.mjs'; +export { ICU4XDataError } from './ICU4XDataError.mjs'; export { ICU4XDataProvider } from './ICU4XDataProvider.mjs'; export { ICU4XDataStruct } from './ICU4XDataStruct.mjs'; export { ICU4XDate } from './ICU4XDate.mjs'; @@ -44,6 +46,8 @@ export { ICU4XError } from './ICU4XError.mjs'; export { ICU4XFixedDecimal } from './ICU4XFixedDecimal.mjs'; export { ICU4XFixedDecimalFormatter } from './ICU4XFixedDecimalFormatter.mjs'; export { ICU4XFixedDecimalGroupingStrategy } from './ICU4XFixedDecimalGroupingStrategy.mjs'; +export { ICU4XFixedDecimalLimitError } from './ICU4XFixedDecimalLimitError.mjs'; +export { ICU4XFixedDecimalParseError } from './ICU4XFixedDecimalParseError.mjs'; export { ICU4XFixedDecimalRoundingIncrement } from './ICU4XFixedDecimalRoundingIncrement.mjs'; export { ICU4XFixedDecimalSign } from './ICU4XFixedDecimalSign.mjs'; export { ICU4XFixedDecimalSignDisplay } from './ICU4XFixedDecimalSignDisplay.mjs'; @@ -86,6 +90,7 @@ export { ICU4XLocaleFallbackPriority } from './ICU4XLocaleFallbackPriority.mjs'; export { ICU4XLocaleFallbackSupplement } from './ICU4XLocaleFallbackSupplement.mjs'; export { ICU4XLocaleFallbacker } from './ICU4XLocaleFallbacker.mjs'; export { ICU4XLocaleFallbackerWithConfig } from './ICU4XLocaleFallbackerWithConfig.mjs'; +export { ICU4XLocaleParseError } from './ICU4XLocaleParseError.mjs'; export { ICU4XLogger } from './ICU4XLogger.mjs'; export { ICU4XMeasureUnit } from './ICU4XMeasureUnit.mjs'; export { ICU4XMeasureUnitParser } from './ICU4XMeasureUnitParser.mjs'; @@ -112,6 +117,8 @@ export { ICU4XTimeLength } from './ICU4XTimeLength.mjs'; export { ICU4XTimeZoneFormatter } from './ICU4XTimeZoneFormatter.mjs'; export { ICU4XTimeZoneIdMapper } from './ICU4XTimeZoneIdMapper.mjs'; export { ICU4XTimeZoneIdMapperWithFastCanonicalization } from './ICU4XTimeZoneIdMapperWithFastCanonicalization.mjs'; +export { ICU4XTimeZoneInvalidIdError } from './ICU4XTimeZoneInvalidIdError.mjs'; +export { ICU4XTimeZoneInvalidOffsetError } from './ICU4XTimeZoneInvalidOffsetError.mjs'; export { ICU4XTitlecaseMapper } from './ICU4XTitlecaseMapper.mjs'; export { ICU4XTitlecaseOptionsV1 } from './ICU4XTitlecaseOptionsV1.mjs'; export { ICU4XTrailingCase } from './ICU4XTrailingCase.mjs'; diff --git a/ffi/capi/src/bidi.rs b/ffi/capi/src/bidi.rs index dc1cadfe49a..696c3efdbde 100644 --- a/ffi/capi/src/bidi.rs +++ b/ffi/capi/src/bidi.rs @@ -15,7 +15,7 @@ pub mod ffi { use unicode_bidi::Level; use unicode_bidi::Paragraph; - use crate::errors::ffi::ICU4XError; + use crate::errors::ffi::ICU4XDataError; use crate::provider::ffi::ICU4XDataProvider; pub enum ICU4XBidiDirection { @@ -34,7 +34,7 @@ pub mod ffi { /// Creates a new [`ICU4XBidi`] from locale data. #[diplomat::rust_link(icu::properties::bidi::BidiClassAdapter::new, FnInStruct)] #[diplomat::attr(all(supports = constructors, supports = fallible_constructors), constructor)] - pub fn create(provider: &ICU4XDataProvider) -> Result, ICU4XError> { + pub fn create(provider: &ICU4XDataProvider) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XBidi(call_constructor_unstable!( maps::bidi_class [m => Ok(m.static_to_owned())], maps::load_bidi_class, @@ -223,7 +223,7 @@ pub mod ffi { impl<'info> ICU4XBidiParagraph<'info> { /// Given a paragraph index `n` within the surrounding text, this sets this - /// object to the paragraph at that index. Returns `ICU4XError::OutOfBoundsError` when out of bounds. + /// object to the paragraph at that index. Returns nothing when out of bounds. /// /// This is equivalent to calling `paragraph_at()` on `ICU4XBidiInfo` but doesn't /// create a new object diff --git a/ffi/capi/src/calendar.rs b/ffi/capi/src/calendar.rs index dcdf9167133..726017e1f67 100644 --- a/ffi/capi/src/calendar.rs +++ b/ffi/capi/src/calendar.rs @@ -10,7 +10,7 @@ pub mod ffi { use core::fmt::Write; use icu_calendar::{AnyCalendar, AnyCalendarKind}; - use crate::errors::ffi::ICU4XError; + use crate::errors::ffi::ICU4XDataError; use crate::locale_core::ffi::ICU4XLocale; use crate::provider::ffi::ICU4XDataProvider; @@ -106,7 +106,7 @@ pub mod ffi { pub fn create_for_locale( provider: &ICU4XDataProvider, locale: &ICU4XLocale, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { let locale = locale.to_datalocale(); Ok(Box::new(ICU4XCalendar(Arc::new(call_constructor!( @@ -124,7 +124,7 @@ pub mod ffi { pub fn create_for_kind( provider: &ICU4XDataProvider, kind: ICU4XAnyCalendarKind, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCalendar(Arc::new(call_constructor!( AnyCalendar::new [r => Ok(r)], AnyCalendar::try_new_with_any_provider, diff --git a/ffi/capi/src/casemap.rs b/ffi/capi/src/casemap.rs index 9eaff9c0d7d..7a95c9246fc 100644 --- a/ffi/capi/src/casemap.rs +++ b/ffi/capi/src/casemap.rs @@ -7,7 +7,8 @@ use icu_casemap::titlecase::TitlecaseOptions; #[diplomat::bridge] pub mod ffi { use crate::{ - errors::ffi::ICU4XError, locale_core::ffi::ICU4XLocale, provider::ffi::ICU4XDataProvider, + errors::ffi::ICU4XDataError, locale_core::ffi::ICU4XLocale, + provider::ffi::ICU4XDataProvider, }; use alloc::boxed::Box; use icu_casemap::titlecase::{LeadingAdjustment, TrailingCase}; @@ -56,7 +57,9 @@ pub mod ffi { /// Construct a new ICU4XCaseMapper instance #[diplomat::rust_link(icu::casemap::CaseMapper::new, FnInStruct)] #[diplomat::attr(all(supports = constructors, supports = fallible_constructors), constructor)] - pub fn create(provider: &ICU4XDataProvider) -> Result, ICU4XError> { + pub fn create( + provider: &ICU4XDataProvider, + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCaseMapper(call_constructor!( CaseMapper::new [r => Ok(r)], CaseMapper::try_new_with_any_provider, @@ -214,7 +217,9 @@ pub mod ffi { #[diplomat::rust_link(icu::casemap::CaseMapCloser::new, FnInStruct)] #[diplomat::rust_link(icu::casemap::CaseMapCloser::new_with_mapper, FnInStruct, hidden)] #[diplomat::attr(all(supports = constructors, supports = fallible_constructors), constructor)] - pub fn create(provider: &ICU4XDataProvider) -> Result, ICU4XError> { + pub fn create( + provider: &ICU4XDataProvider, + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCaseMapCloser(call_constructor!( CaseMapCloser::new [r => Ok(r)], CaseMapCloser::try_new_with_any_provider, @@ -264,7 +269,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors), constructor)] pub fn create( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XTitlecaseMapper(call_constructor!( TitlecaseMapper::new [r => Ok(r)], TitlecaseMapper::try_new_with_any_provider, diff --git a/ffi/capi/src/collator.rs b/ffi/capi/src/collator.rs index cf743d178e7..d4fdb43a70c 100644 --- a/ffi/capi/src/collator.rs +++ b/ffi/capi/src/collator.rs @@ -8,7 +8,7 @@ pub mod ffi { use icu_collator::{Collator, CollatorOptions}; use crate::{ - common::ffi::ICU4XOrdering, errors::ffi::ICU4XError, locale_core::ffi::ICU4XLocale, + common::ffi::ICU4XOrdering, errors::ffi::ICU4XDataError, locale_core::ffi::ICU4XLocale, provider::ffi::ICU4XDataProvider, }; @@ -115,7 +115,7 @@ pub mod ffi { provider: &ICU4XDataProvider, locale: &ICU4XLocale, options: ICU4XCollatorOptionsV1, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { let locale = locale.to_datalocale(); let options = CollatorOptions::from(options); diff --git a/ffi/capi/src/data_struct.rs b/ffi/capi/src/data_struct.rs index a9045181bb4..3b3c47a0421 100644 --- a/ffi/capi/src/data_struct.rs +++ b/ffi/capi/src/data_struct.rs @@ -10,7 +10,7 @@ use alloc::borrow::Cow; pub mod ffi { #[cfg(feature = "icu_decimal")] - use crate::errors::ffi::ICU4XError; + use crate::errors::ffi::ICU4XDataError; use alloc::boxed::Box; use icu_provider::AnyPayload; #[cfg(feature = "icu_decimal")] @@ -41,7 +41,7 @@ pub mod ffi { secondary_group_size: u8, min_group_size: u8, digits: &[DiplomatChar], - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { use super::str_to_cow; use icu_decimal::provider::{ AffixesV1, DecimalSymbolsV1, DecimalSymbolsV1Marker, GroupingSizesV1, @@ -49,11 +49,11 @@ pub mod ffi { let digits = if digits.len() == 10 { let mut new_digits = ['\0'; 10]; for (old, new) in digits.iter().zip(new_digits.iter_mut()) { - *new = char::from_u32(*old).ok_or(ICU4XError::DataStructValidityError)?; + *new = char::from_u32(*old).ok_or(ICU4XDataError::DataStructValidityError)?; } new_digits } else { - return Err(ICU4XError::DataStructValidityError); + return Err(ICU4XDataError::DataStructValidityError); }; let plus_sign_affixes = AffixesV1 { prefix: str_to_cow(plus_sign_prefix), diff --git a/ffi/capi/src/date.rs b/ffi/capi/src/date.rs index 4a7c69119fb..34f22307765 100644 --- a/ffi/capi/src/date.rs +++ b/ffi/capi/src/date.rs @@ -13,7 +13,7 @@ pub mod ffi { use tinystr::TinyAsciiStr; use crate::calendar::ffi::ICU4XCalendar; - use crate::errors::ffi::ICU4XError; + use crate::errors::ffi::ICU4XCalendarError; #[cfg(feature = "icu_calendar")] use crate::week::ffi::ICU4XWeekCalculator; @@ -38,7 +38,11 @@ pub mod ffi { /// Creates a new [`ICU4XIsoDate`] from the specified date and time. #[diplomat::rust_link(icu::calendar::Date::try_new_iso_date, FnInStruct)] #[diplomat::attr(all(supports = constructors, supports = fallible_constructors), constructor)] - pub fn create(year: i32, month: u8, day: u8) -> Result, ICU4XError> { + pub fn create( + year: i32, + month: u8, + day: u8, + ) -> Result, ICU4XCalendarError> { Ok(Box::new(ICU4XIsoDate(Date::try_new_iso_date( year, month, day, )?))) @@ -171,7 +175,7 @@ pub mod ffi { month: u8, day: u8, calendar: &ICU4XCalendar, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XCalendarError> { let cal = calendar.0.clone(); Ok(Box::new(ICU4XDate( Date::try_new_iso_date(year, month, day)?.to_calendar(cal), @@ -187,12 +191,12 @@ pub mod ffi { month_code: &DiplomatStr, day: u8, calendar: &ICU4XCalendar, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XCalendarError> { let era = TinyAsciiStr::try_from_utf8(era_code) - .map_err(|_| ICU4XError::CalendarUnknownEraError)? + .map_err(|_| ICU4XCalendarError::UnknownEra)? .into(); let month = TinyAsciiStr::try_from_utf8(month_code) - .map_err(|_| ICU4XError::CalendarUnknownMonthCodeError)? + .map_err(|_| ICU4XCalendarError::UnknownMonthCode)? .into(); let cal = calendar.0.clone(); Ok(Box::new(ICU4XDate(Date::try_new_from_codes( diff --git a/ffi/capi/src/datetime.rs b/ffi/capi/src/datetime.rs index c27dabd9795..cf204feb57f 100644 --- a/ffi/capi/src/datetime.rs +++ b/ffi/capi/src/datetime.rs @@ -14,7 +14,7 @@ pub mod ffi { use crate::calendar::ffi::ICU4XCalendar; use crate::date::ffi::{ICU4XDate, ICU4XIsoDate, ICU4XIsoWeekday}; - use crate::errors::ffi::ICU4XError; + use crate::errors::ffi::ICU4XCalendarError; use crate::time::ffi::ICU4XTime; #[cfg(feature = "icu_calendar")] @@ -37,7 +37,7 @@ pub mod ffi { minute: u8, second: u8, nanosecond: u32, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XCalendarError> { let mut dt = DateTime::try_new_iso_datetime(year, month, day, hour, minute, second)?; dt.time.nanosecond = nanosecond.try_into()?; Ok(Box::new(ICU4XIsoDateTime(dt))) @@ -247,7 +247,7 @@ pub mod ffi { second: u8, nanosecond: u32, calendar: &ICU4XCalendar, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XCalendarError> { let cal = calendar.0.clone(); let mut dt = DateTime::try_new_iso_datetime(year, month, day, hour, minute, second)?; dt.time.nanosecond = nanosecond.try_into()?; @@ -267,12 +267,12 @@ pub mod ffi { second: u8, nanosecond: u32, calendar: &ICU4XCalendar, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XCalendarError> { let era = TinyAsciiStr::try_from_utf8(era_code) - .map_err(|_| ICU4XError::CalendarUnknownEraError)? + .map_err(|_| ICU4XCalendarError::UnknownEra)? .into(); let month = TinyAsciiStr::try_from_utf8(month_code) - .map_err(|_| ICU4XError::CalendarUnknownMonthCodeError)? + .map_err(|_| ICU4XCalendarError::UnknownMonthCode)? .into(); let cal = calendar.0.clone(); let hour = hour.try_into()?; diff --git a/ffi/capi/src/datetime_formatter.rs b/ffi/capi/src/datetime_formatter.rs index f29cbc92dd1..7d2c0daae20 100644 --- a/ffi/capi/src/datetime_formatter.rs +++ b/ffi/capi/src/datetime_formatter.rs @@ -13,8 +13,7 @@ pub mod ffi { use crate::{ date::ffi::{ICU4XDate, ICU4XIsoDate}, - datetime::ffi::ICU4XDateTime, - datetime::ffi::ICU4XIsoDateTime, + datetime::ffi::{ICU4XDateTime, ICU4XIsoDateTime}, errors::ffi::ICU4XError, locale_core::ffi::ICU4XLocale, provider::ffi::ICU4XDataProvider, diff --git a/ffi/capi/src/decimal.rs b/ffi/capi/src/decimal.rs index 8284ad78e72..87cd9cb441c 100644 --- a/ffi/capi/src/decimal.rs +++ b/ffi/capi/src/decimal.rs @@ -14,7 +14,7 @@ pub mod ffi { use writeable::Writeable; use crate::{ - data_struct::ffi::ICU4XDataStruct, errors::ffi::ICU4XError, + data_struct::ffi::ICU4XDataStruct, errors::ffi::ICU4XDataError, fixed_decimal::ffi::ICU4XFixedDecimal, locale_core::ffi::ICU4XLocale, provider::ffi::ICU4XDataProvider, }; @@ -41,7 +41,7 @@ pub mod ffi { provider: &ICU4XDataProvider, locale: &ICU4XLocale, grouping_strategy: ICU4XFixedDecimalGroupingStrategy, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { let locale = locale.to_datalocale(); let grouping_strategy = match grouping_strategy { @@ -71,7 +71,7 @@ pub mod ffi { pub fn create_with_decimal_symbols_v1( data_struct: &ICU4XDataStruct, grouping_strategy: ICU4XFixedDecimalGroupingStrategy, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { let grouping_strategy = match grouping_strategy { ICU4XFixedDecimalGroupingStrategy::Auto => GroupingStrategy::Auto, ICU4XFixedDecimalGroupingStrategy::Never => GroupingStrategy::Never, diff --git a/ffi/capi/src/displaynames.rs b/ffi/capi/src/displaynames.rs index 8454cda8d75..847ba0dd775 100644 --- a/ffi/capi/src/displaynames.rs +++ b/ffi/capi/src/displaynames.rs @@ -4,7 +4,7 @@ #[diplomat::bridge] pub mod ffi { - use crate::errors::ffi::ICU4XError; + use crate::errors::ffi::{ICU4XDataError, ICU4XLocaleParseError}; use crate::locale_core::ffi::ICU4XLocale; use crate::provider::ffi::ICU4XDataProvider; use alloc::boxed::Box; @@ -65,7 +65,7 @@ pub mod ffi { provider: &ICU4XDataProvider, locale: &ICU4XLocale, options: ICU4XDisplayNamesOptionsV1, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { let locale = locale.to_datalocale(); let options = DisplayNamesOptions::from(options); @@ -95,7 +95,7 @@ pub mod ffi { pub fn create( provider: &ICU4XDataProvider, locale: &ICU4XLocale, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { let locale = locale.to_datalocale(); Ok(Box::new(ICU4XRegionDisplayNames(call_constructor!( RegionDisplayNames::try_new, @@ -115,7 +115,7 @@ pub mod ffi { &self, region: &DiplomatStr, write: &mut DiplomatWrite, - ) -> Result<(), ICU4XError> { + ) -> Result<(), ICU4XLocaleParseError> { let _infallible = self .0 .of(Region::try_from_bytes(region)?) diff --git a/ffi/capi/src/errors.rs b/ffi/capi/src/errors.rs index c9c727bec92..e0f2d603432 100644 --- a/ffi/capi/src/errors.rs +++ b/ffi/capi/src/errors.rs @@ -3,6 +3,7 @@ // (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). use self::ffi::ICU4XError; +use ffi::*; use icu_provider::{DataError, DataErrorKind}; #[diplomat::bridge] @@ -11,20 +12,94 @@ pub mod ffi { #[derive(Debug, PartialEq, Eq)] #[repr(C)] - /// A common enum for errors that ICU4X may return, organized by API - /// - /// The error names are stable and can be checked against as strings in the JS API + #[diplomat::rust_link(icu::provider::DataError, Struct, compact)] + #[diplomat::rust_link(icu::provider::DataErrorKind, Enum, compact)] + pub enum ICU4XDataError { + Unknown = 0x00, + MissingDataMarker = 0x01, + MissingVariant = 0x02, + MissingLocale = 0x03, + NeedsVariant = 0x04, + NeedsLocale = 0x05, + ExtraneousLocale = 0x06, + FilteredResource = 0x07, + MismatchedType = 0x08, + MissingPayload = 0x09, + InvalidState = 0x0A, + Custom = 0x0B, + Io = 0x0C, + UnavailableBufferFormat = 0x0D, + MismatchedAnyBuffer = 0x0E, + DataStructValidityError = 0x0F, + } + + #[derive(Debug, PartialEq, Eq)] + #[repr(C)] + #[diplomat::rust_link(icu::locale::ParseError, Enum, compact)] + pub enum ICU4XLocaleParseError { + Unknown = 0x00, + Language = 0x01, + Subtag = 0x02, + Extension = 0x03, + } + + #[derive(Debug, PartialEq, Eq)] + #[repr(C)] #[diplomat::rust_link(fixed_decimal::ParseError, Enum, compact)] + #[cfg(any(feature = "icu_decimal", feature = "icu_plurals"))] + pub enum ICU4XFixedDecimalParseError { + Unknown = 0x00, + Limit = 0x01, + Syntax = 0x02, + } + + #[derive(Debug, PartialEq, Eq)] + #[repr(C)] #[diplomat::rust_link(fixed_decimal::LimitError, Struct, compact)] + #[cfg(feature = "icu_decimal")] + pub enum ICU4XFixedDecimalLimitError { + TodoZst, + } + + #[derive(Debug, PartialEq, Eq)] + #[repr(C)] #[diplomat::rust_link(icu::calendar::RangeError, Struct, compact)] #[diplomat::rust_link(icu::calendar::DateError, Enum, compact)] + #[cfg(any( + feature = "icu_datetime", + feature = "icu_timezone", + feature = "icu_calendar" + ))] + pub enum ICU4XCalendarError { + Unknown = 0x00, + OutOfRange = 0x01, + UnknownEra = 0x02, + UnknownMonthCode = 0x03, + } + + #[derive(Debug, PartialEq, Eq)] + #[repr(C)] + #[diplomat::rust_link(icu::timezone::InvalidOffsetError, Struct, compact)] + #[cfg(any(feature = "icu_datetime", feature = "icu_timezone"))] + pub enum ICU4XTimeZoneInvalidOffsetError { + TodoZst, + } + + #[derive(Debug, PartialEq, Eq)] + #[repr(C)] + #[cfg(any(feature = "icu_datetime", feature = "icu_timezone"))] + pub enum ICU4XTimeZoneInvalidIdError { + TodoZst, + } + + #[derive(Debug, PartialEq, Eq)] + #[repr(C)] + /// Legacy error + // TODO(2.0): remove #[diplomat::rust_link(icu::datetime::DateTimeError, Enum, compact)] #[diplomat::rust_link(icu::datetime::MismatchedCalendarError, Struct, hidden)] - #[diplomat::rust_link(icu::locale::ParseError, Enum, compact)] #[diplomat::rust_link(icu::provider::DataError, Struct, compact)] #[diplomat::rust_link(icu::provider::DataErrorKind, Enum, compact)] - #[diplomat::rust_link(icu::timezone::InvalidOffsetError, Struct, compact)] - #[diplomat::rust_link(icu_experimental::units::InvalidUnitError, Struct, compact)] pub enum ICU4XError { /// The error is not currently categorized as ICU4XError. /// Please file a bug @@ -47,31 +122,9 @@ pub mod ffi { DataUnavailableBufferFormatError = 0x1_0C, DataMismatchedAnyBufferError = 0x1_0D, - // locale errors - /// The locale or subtag string failed to parse - LocaleParserLanguageError = 0x2_01, - LocaleParserSubtagError = 0x2_02, - LocaleParserExtensionError = 0x2_03, - - // data struct errors - /// Attempted to construct an invalid data struct - DataStructValidityError = 0x3_00, - // property errors PropertyUnexpectedPropertyNameError = 0x4_02, - // fixed_decimal errors - FixedDecimalLimitError = 0x5_00, - FixedDecimalSyntaxError = 0x5_01, - - // plural errors - PluralsParseError = 0x6_00, - - // datetime errors - CalendarOutOfRangeError = 0x7_03, - CalendarUnknownEraError = 0x7_04, - CalendarUnknownMonthCodeError = 0x7_05, - // datetime format errors DateTimePatternError = 0x8_00, DateTimeMissingInputFieldError = 0x8_01, @@ -82,31 +135,6 @@ pub mod ffi { DateTimeMissingMonthSymbolError = 0x8_06, DateTimeFixedDecimalError = 0x8_07, DateTimeMismatchedCalendarError = 0x8_08, - - // timezone errors - TimeZoneInvalidOffsetError = 0xA_01, - TimeZoneInvalidIdError = 0xA_03, - } -} - -impl ICU4XError { - #[cfg(feature = "logging")] - #[inline] - pub(crate) fn log_original(self, e: &T) -> Self { - use core::any; - log::warn!( - "Returning ICU4XError::{:?} based on original {}: {}", - self, - any::type_name::(), - e - ); - self - } - - #[cfg(not(feature = "logging"))] - #[inline] - pub(crate) fn log_original(self, _e: &T) -> Self { - self } } @@ -134,7 +162,31 @@ impl From for ICU4XError { } _ => ICU4XError::UnknownError, } - .log_original(&e) + } +} + +impl From for ICU4XDataError { + fn from(e: DataError) -> Self { + match e.kind { + DataErrorKind::MissingDataMarker => Self::MissingDataMarker, + DataErrorKind::MissingLocale => Self::MissingLocale, + DataErrorKind::NeedsLocale => Self::NeedsLocale, + DataErrorKind::ExtraneousLocale => Self::ExtraneousLocale, + DataErrorKind::FilteredResource => Self::FilteredResource, + DataErrorKind::MismatchedType(..) => Self::MismatchedType, + DataErrorKind::MissingPayload => Self::MissingPayload, + DataErrorKind::InvalidState => Self::InvalidState, + DataErrorKind::Custom => Self::Custom, + #[cfg(all( + feature = "provider_fs", + not(any(target_arch = "wasm32", target_os = "none")) + ))] + DataErrorKind::Io(..) => Self::Io, + // datagen only + // DataErrorKind::MissingSourceData(..) => .., + DataErrorKind::UnavailableBufferFormat(..) => Self::UnavailableBufferFormat, + _ => Self::Unknown, + } } } @@ -147,7 +199,6 @@ impl From for ICU4XError { ICU4XError::PropertyUnexpectedPropertyNameError } } - .log_original(&e) } } @@ -156,9 +207,9 @@ impl From for ICU4XError { feature = "icu_timezone", feature = "icu_calendar" ))] -impl From for ICU4XError { - fn from(e: icu_calendar::RangeError) -> Self { - ICU4XError::CalendarOutOfRangeError.log_original(&e) +impl From for ICU4XCalendarError { + fn from(_: icu_calendar::RangeError) -> Self { + Self::OutOfRange } } @@ -167,17 +218,14 @@ impl From for ICU4XError { feature = "icu_timezone", feature = "icu_calendar" ))] -impl From for ICU4XError { +impl From for ICU4XCalendarError { fn from(e: icu_calendar::DateError) -> Self { match e { - icu_calendar::DateError::Range { .. } => ICU4XError::CalendarOutOfRangeError, - icu_calendar::DateError::UnknownEra(..) => ICU4XError::CalendarUnknownEraError, - icu_calendar::DateError::UnknownMonthCode(..) => { - ICU4XError::CalendarUnknownMonthCodeError - } - _ => ICU4XError::UnknownError, + icu_calendar::DateError::Range { .. } => Self::OutOfRange, + icu_calendar::DateError::UnknownEra(..) => Self::UnknownEra, + icu_calendar::DateError::UnknownMonthCode(..) => Self::UnknownMonthCode, + _ => Self::Unknown, } - .log_original(&e) } } @@ -210,47 +258,42 @@ impl From for ICU4XError { } _ => ICU4XError::UnknownError, } - .log_original(&e) } } -#[cfg(feature = "icu_decimal")] -impl From for ICU4XError { +#[cfg(any(feature = "icu_decimal", feature = "icu_plurals"))] +impl From for ICU4XFixedDecimalParseError { fn from(e: fixed_decimal::ParseError) -> Self { match e { - fixed_decimal::ParseError::Limit => ICU4XError::FixedDecimalLimitError, - fixed_decimal::ParseError::Syntax => ICU4XError::FixedDecimalSyntaxError, - _ => ICU4XError::UnknownError, + fixed_decimal::ParseError::Limit => Self::Limit, + fixed_decimal::ParseError::Syntax => Self::Syntax, + _ => Self::Unknown, } - .log_original(&e) } } #[cfg(feature = "icu_decimal")] -impl From for ICU4XError { - fn from(e: fixed_decimal::LimitError) -> Self { - ICU4XError::FixedDecimalLimitError.log_original(&e) +impl From for ICU4XFixedDecimalLimitError { + fn from(_: fixed_decimal::LimitError) -> Self { + Self::TodoZst } } -impl From for ICU4XError { +impl From for ICU4XLocaleParseError { fn from(e: icu_locale_core::ParseError) -> Self { match e { - icu_locale_core::ParseError::InvalidLanguage => ICU4XError::LocaleParserLanguageError, - icu_locale_core::ParseError::InvalidSubtag => ICU4XError::LocaleParserSubtagError, - icu_locale_core::ParseError::InvalidExtension => ICU4XError::LocaleParserExtensionError, - icu_locale_core::ParseError::DuplicatedExtension => { - ICU4XError::LocaleParserExtensionError - } - _ => ICU4XError::UnknownError, + icu_locale_core::ParseError::InvalidLanguage => Self::Language, + icu_locale_core::ParseError::InvalidSubtag => Self::Subtag, + icu_locale_core::ParseError::InvalidExtension => Self::Extension, + icu_locale_core::ParseError::DuplicatedExtension => Self::Extension, + _ => Self::Unknown, } - .log_original(&e) } } #[cfg(any(feature = "icu_timezone", feature = "icu_datetime"))] -impl From for ICU4XError { - fn from(e: icu_timezone::InvalidOffsetError) -> Self { - ICU4XError::TimeZoneInvalidOffsetError.log_original(&e) +impl From for ICU4XTimeZoneInvalidOffsetError { + fn from(_: icu_timezone::InvalidOffsetError) -> Self { + Self::TodoZst } } diff --git a/ffi/capi/src/fallbacker.rs b/ffi/capi/src/fallbacker.rs index 8f7b2f700e8..8a294829d72 100644 --- a/ffi/capi/src/fallbacker.rs +++ b/ffi/capi/src/fallbacker.rs @@ -11,8 +11,10 @@ pub mod ffi { use icu_locale::fallback::LocaleFallbackerWithConfig; use icu_locale::LocaleFallbacker; + use crate::errors::ffi::ICU4XLocaleParseError; use crate::{ - errors::ffi::ICU4XError, locale_core::ffi::ICU4XLocale, provider::ffi::ICU4XDataProvider, + errors::ffi::ICU4XDataError, locale_core::ffi::ICU4XLocale, + provider::ffi::ICU4XDataProvider, }; /// An object that runs the ICU4X locale fallback algorithm. @@ -80,7 +82,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors), constructor)] pub fn create( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XLocaleFallbacker(call_constructor!( LocaleFallbacker::new [r => Ok(r.static_to_owned())], LocaleFallbacker::try_new_with_any_provider, @@ -109,7 +111,7 @@ pub mod ffi { pub fn for_config<'a, 'temp>( &'a self, config: ICU4XLocaleFallbackConfig<'temp>, - ) -> Result>, ICU4XError> { + ) -> Result>, ICU4XLocaleParseError> { Ok(Box::new(ICU4XLocaleFallbackerWithConfig( self.0.for_config(LocaleFallbackConfig::try_from(config)?), ))) @@ -176,7 +178,7 @@ pub mod ffi { } impl TryFrom> for icu_locale::fallback::LocaleFallbackConfig { - type Error = crate::errors::ffi::ICU4XError; + type Error = crate::errors::ffi::ICU4XLocaleParseError; fn try_from(other: ffi::ICU4XLocaleFallbackConfig) -> Result { let mut result = Self::default(); result.priority = other.priority.into(); diff --git a/ffi/capi/src/fixed_decimal.rs b/ffi/capi/src/fixed_decimal.rs index 6fb35385662..79ffb679e2d 100644 --- a/ffi/capi/src/fixed_decimal.rs +++ b/ffi/capi/src/fixed_decimal.rs @@ -12,7 +12,7 @@ pub mod ffi { use fixed_decimal::{DoublePrecision, FixedDecimal}; use writeable::Writeable; - use crate::errors::ffi::ICU4XError; + use crate::errors::ffi::{ICU4XFixedDecimalLimitError, ICU4XFixedDecimalParseError}; #[diplomat::opaque] #[diplomat::rust_link(fixed_decimal::FixedDecimal, Struct)] @@ -90,7 +90,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "from_f64_with_integer_precision")] pub fn create_from_f64_with_integer_precision( f: f64, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XFixedDecimalLimitError> { let precision = DoublePrecision::Integer; Ok(Box::new(ICU4XFixedDecimal(FixedDecimal::try_from_f64( f, precision, @@ -106,7 +106,7 @@ pub mod ffi { pub fn create_from_f64_with_lower_magnitude( f: f64, magnitude: i16, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XFixedDecimalLimitError> { let precision = DoublePrecision::Magnitude(magnitude); Ok(Box::new(ICU4XFixedDecimal(FixedDecimal::try_from_f64( f, precision, @@ -122,7 +122,7 @@ pub mod ffi { pub fn create_from_f64_with_significant_digits( f: f64, digits: u8, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XFixedDecimalLimitError> { let precision = DoublePrecision::SignificantDigits(digits); Ok(Box::new(ICU4XFixedDecimal(FixedDecimal::try_from_f64( f, precision, @@ -138,7 +138,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "from_f64_with_floating_precision")] pub fn create_from_f64_with_floating_precision( f: f64, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XFixedDecimalLimitError> { let precision = DoublePrecision::Floating; Ok(Box::new(ICU4XFixedDecimal(FixedDecimal::try_from_f64( f, precision, @@ -148,7 +148,9 @@ pub mod ffi { /// Construct an [`ICU4XFixedDecimal`] from a string. #[diplomat::rust_link(fixed_decimal::FixedDecimal::from_str, FnInStruct)] #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "from_string")] - pub fn create_from_string(v: &DiplomatStr) -> Result, ICU4XError> { + pub fn create_from_string( + v: &DiplomatStr, + ) -> Result, ICU4XFixedDecimalParseError> { Ok(Box::new(ICU4XFixedDecimal(FixedDecimal::try_from(v)?))) } diff --git a/ffi/capi/src/list.rs b/ffi/capi/src/list.rs index bdd1f1796f9..83d6a0573c4 100644 --- a/ffi/capi/src/list.rs +++ b/ffi/capi/src/list.rs @@ -5,7 +5,8 @@ #[diplomat::bridge] pub mod ffi { use crate::{ - errors::ffi::ICU4XError, locale_core::ffi::ICU4XLocale, provider::ffi::ICU4XDataProvider, + errors::ffi::ICU4XDataError, locale_core::ffi::ICU4XLocale, + provider::ffi::ICU4XDataProvider, }; use alloc::boxed::Box; use alloc::string::String; @@ -72,7 +73,7 @@ pub mod ffi { provider: &ICU4XDataProvider, locale: &ICU4XLocale, length: ICU4XListLength, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { let locale = locale.to_datalocale(); Ok(Box::new(ICU4XListFormatter(call_constructor!( ListFormatter::try_new_and_with_length, @@ -90,7 +91,7 @@ pub mod ffi { provider: &ICU4XDataProvider, locale: &ICU4XLocale, length: ICU4XListLength, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { let locale = locale.to_datalocale(); Ok(Box::new(ICU4XListFormatter(call_constructor!( ListFormatter::try_new_or_with_length, @@ -108,7 +109,7 @@ pub mod ffi { provider: &ICU4XDataProvider, locale: &ICU4XLocale, length: ICU4XListLength, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { let locale = locale.to_datalocale(); Ok(Box::new(ICU4XListFormatter(call_constructor!( ListFormatter::try_new_unit_with_length, diff --git a/ffi/capi/src/locale_core.rs b/ffi/capi/src/locale_core.rs index 2669e47323d..07535796061 100644 --- a/ffi/capi/src/locale_core.rs +++ b/ffi/capi/src/locale_core.rs @@ -4,7 +4,7 @@ #[diplomat::bridge] pub mod ffi { - use crate::errors::ffi::ICU4XError; + use crate::errors::ffi::ICU4XLocaleParseError; use alloc::boxed::Box; use core::str; use icu_locale_core::extensions::unicode::Key; @@ -28,7 +28,9 @@ pub mod ffi { #[diplomat::rust_link(icu::locale::Locale::try_from_bytes, FnInStruct)] #[diplomat::rust_link(icu::locale::Locale::from_str, FnInStruct, hidden)] #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "from_string")] - pub fn create_from_string(name: &DiplomatStr) -> Result, ICU4XError> { + pub fn create_from_string( + name: &DiplomatStr, + ) -> Result, ICU4XLocaleParseError> { Ok(Box::new(ICU4XLocale(Locale::try_from_bytes(name)?))) } @@ -78,7 +80,7 @@ pub mod ffi { /// Set the language part of the [`ICU4XLocale`]. #[diplomat::rust_link(icu::locale::Locale::try_from_bytes, FnInStruct)] #[diplomat::attr(supports = accessors, setter = "language")] - pub fn set_language(&mut self, bytes: &DiplomatStr) -> Result<(), ICU4XError> { + pub fn set_language(&mut self, bytes: &DiplomatStr) -> Result<(), ICU4XLocaleParseError> { self.0.id.language = if bytes.is_empty() { Language::UND } else { @@ -99,7 +101,7 @@ pub mod ffi { /// Set the region part of the [`ICU4XLocale`]. #[diplomat::rust_link(icu::locale::Locale::try_from_bytes, FnInStruct)] #[diplomat::attr(all(supports = accessors, not(dart)), setter = "region")] - pub fn set_region(&mut self, bytes: &DiplomatStr) -> Result<(), ICU4XError> { + pub fn set_region(&mut self, bytes: &DiplomatStr) -> Result<(), ICU4XLocaleParseError> { self.0.id.region = if bytes.is_empty() { None } else { @@ -120,7 +122,7 @@ pub mod ffi { /// Set the script part of the [`ICU4XLocale`]. Pass an empty string to remove the script. #[diplomat::rust_link(icu::locale::Locale::try_from_bytes, FnInStruct)] #[diplomat::attr(all(supports = accessors, not(dart)), setter = "script")] - pub fn set_script(&mut self, bytes: &DiplomatStr) -> Result<(), ICU4XError> { + pub fn set_script(&mut self, bytes: &DiplomatStr) -> Result<(), ICU4XLocaleParseError> { self.0.id.script = if bytes.is_empty() { None } else { @@ -136,7 +138,7 @@ pub mod ffi { pub fn canonicalize( bytes: &DiplomatStr, write: &mut DiplomatWrite, - ) -> Result<(), ICU4XError> { + ) -> Result<(), ICU4XLocaleParseError> { let _infallible = Locale::canonicalize(bytes)?.write_to(write); Ok(()) } diff --git a/ffi/capi/src/locale_directionality.rs b/ffi/capi/src/locale_directionality.rs index 02b5e473df3..2cb1bd05253 100644 --- a/ffi/capi/src/locale_directionality.rs +++ b/ffi/capi/src/locale_directionality.rs @@ -5,7 +5,7 @@ #[diplomat::bridge] pub mod ffi { use crate::{ - errors::ffi::ICU4XError, + errors::ffi::ICU4XDataError, locale::ffi::ICU4XLocaleExpander, locale_core::ffi::ICU4XLocale, provider::{ffi::ICU4XDataProvider, ICU4XDataProviderInner}, @@ -30,7 +30,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors), constructor)] pub fn create( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XLocaleDirectionality(call_constructor!( LocaleDirectionality::new [r => Ok(r)], LocaleDirectionality::try_new_with_any_provider, @@ -45,7 +45,7 @@ pub mod ffi { pub fn create_with_expander( provider: &ICU4XDataProvider, expander: &ICU4XLocaleExpander, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { #[allow(unused_imports)] use icu_provider::prelude::*; Ok(Box::new(ICU4XLocaleDirectionality(match &provider.0 { diff --git a/ffi/capi/src/metazone_calculator.rs b/ffi/capi/src/metazone_calculator.rs index 972455fca11..5d2a7c991c2 100644 --- a/ffi/capi/src/metazone_calculator.rs +++ b/ffi/capi/src/metazone_calculator.rs @@ -4,7 +4,7 @@ #[diplomat::bridge] pub mod ffi { - use crate::errors::ffi::ICU4XError; + use crate::errors::ffi::ICU4XDataError; use crate::provider::ffi::ICU4XDataProvider; use alloc::boxed::Box; use icu_timezone::MetazoneCalculator; @@ -23,7 +23,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors), constructor)] pub fn create( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XMetazoneCalculator(call_constructor!( MetazoneCalculator::new [r => Ok(r)], MetazoneCalculator::try_new_with_any_provider, diff --git a/ffi/capi/src/normalizer.rs b/ffi/capi/src/normalizer.rs index 39c78c4beb3..98136b38db2 100644 --- a/ffi/capi/src/normalizer.rs +++ b/ffi/capi/src/normalizer.rs @@ -4,7 +4,7 @@ #[diplomat::bridge] pub mod ffi { - use crate::{errors::ffi::ICU4XError, provider::ffi::ICU4XDataProvider}; + use crate::{errors::ffi::ICU4XDataError, provider::ffi::ICU4XDataProvider}; use alloc::boxed::Box; use icu_normalizer::{ComposingNormalizer, DecomposingNormalizer}; @@ -18,7 +18,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "nfc")] pub fn create_nfc( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XComposingNormalizer(call_constructor!( ComposingNormalizer::new_nfc [r => Ok(r)], ComposingNormalizer::try_new_nfc_with_any_provider, @@ -32,7 +32,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "nfkc")] pub fn create_nfkc( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XComposingNormalizer(call_constructor!( ComposingNormalizer::new_nfkc [r => Ok(r)], ComposingNormalizer::try_new_nfkc_with_any_provider, @@ -86,7 +86,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "nfd")] pub fn create_nfd( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XDecomposingNormalizer(call_constructor!( DecomposingNormalizer::new_nfd [r => Ok(r)], DecomposingNormalizer::try_new_nfd_with_any_provider, @@ -100,7 +100,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "nfkd")] pub fn create_nfkd( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XDecomposingNormalizer(call_constructor!( DecomposingNormalizer::new_nfkd [r => Ok(r)], DecomposingNormalizer::try_new_nfkd_with_any_provider, diff --git a/ffi/capi/src/normalizer_properties.rs b/ffi/capi/src/normalizer_properties.rs index 09dc3ddc7b8..e4f6cf1a2d2 100644 --- a/ffi/capi/src/normalizer_properties.rs +++ b/ffi/capi/src/normalizer_properties.rs @@ -4,7 +4,7 @@ #[diplomat::bridge] pub mod ffi { - use crate::{errors::ffi::ICU4XError, provider::ffi::ICU4XDataProvider}; + use crate::{errors::ffi::ICU4XDataError, provider::ffi::ICU4XDataProvider}; use alloc::boxed::Box; use icu_normalizer::properties::{ CanonicalCombiningClassMap, CanonicalComposition, CanonicalDecomposition, Decomposed, @@ -24,7 +24,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors), constructor)] pub fn create( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCanonicalCombiningClassMap( call_constructor!( CanonicalCombiningClassMap::new [r => Ok(r)], @@ -76,7 +76,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors), constructor)] pub fn create( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCanonicalComposition(call_constructor!( CanonicalComposition::new [r => Ok(r)], CanonicalComposition::try_new_with_any_provider, @@ -123,7 +123,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors), constructor)] pub fn create( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCanonicalDecomposition(call_constructor!( CanonicalDecomposition::new [r => Ok(r)], CanonicalDecomposition::try_new_with_any_provider, diff --git a/ffi/capi/src/pluralrules.rs b/ffi/capi/src/pluralrules.rs index c28afe8c40d..fdbe1fd5449 100644 --- a/ffi/capi/src/pluralrules.rs +++ b/ffi/capi/src/pluralrules.rs @@ -11,7 +11,7 @@ pub mod ffi { use crate::{locale_core::ffi::ICU4XLocale, provider::ffi::ICU4XDataProvider}; - use crate::errors::ffi::ICU4XError; + use crate::errors::ffi::{ICU4XDataError, ICU4XFixedDecimalParseError}; #[diplomat::rust_link(icu::plurals::PluralCategory, Enum)] #[diplomat::enum_convert(PluralCategory)] @@ -47,7 +47,7 @@ pub mod ffi { pub fn create_cardinal( provider: &ICU4XDataProvider, locale: &ICU4XLocale, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { let locale = locale.to_datalocale(); Ok(Box::new(ICU4XPluralRules(call_constructor!( PluralRules::try_new_cardinal, @@ -66,7 +66,7 @@ pub mod ffi { pub fn create_ordinal( provider: &ICU4XDataProvider, locale: &ICU4XLocale, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { let locale = locale.to_datalocale(); Ok(Box::new(ICU4XPluralRules(call_constructor!( PluralRules::try_new_ordinal, @@ -99,10 +99,11 @@ pub mod ffi { /// Construct for a given string representing a number #[diplomat::rust_link(icu::plurals::PluralOperands::from_str, FnInStruct)] #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "from_string")] - pub fn create_from_string(s: &DiplomatStr) -> Result, ICU4XError> { + pub fn create_from_string( + s: &DiplomatStr, + ) -> Result, ICU4XFixedDecimalParseError> { Ok(Box::new(ICU4XPluralOperands(PluralOperands::from( - // XXX should this have its own errors? - &FixedDecimal::try_from(s).map_err(|_| ICU4XError::PluralsParseError)?, + &FixedDecimal::try_from(s)?, )))) } diff --git a/ffi/capi/src/properties_maps.rs b/ffi/capi/src/properties_maps.rs index 9cfbf04efaa..09cfc6c2f9d 100644 --- a/ffi/capi/src/properties_maps.rs +++ b/ffi/capi/src/properties_maps.rs @@ -9,7 +9,7 @@ pub mod ffi { use icu_collections::codepointtrie::TrieValue; use icu_properties::{maps, GeneralCategory, GeneralCategoryGroup}; - use crate::errors::ffi::ICU4XError; + use crate::errors::ffi::ICU4XDataError; use crate::properties_iter::ffi::ICU4XCodePointRangeIterator; use crate::properties_sets::ffi::ICU4XCodePointSetData; @@ -141,7 +141,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "general_category")] pub fn load_general_category( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(convert_8(call_constructor_unstable!( maps::general_category [r => Ok(r.static_to_owned())], maps::load_general_category, @@ -154,7 +154,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "bidi_class")] pub fn load_bidi_class( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(convert_8(call_constructor_unstable!( maps::bidi_class [r => Ok(r.static_to_owned())], maps::load_bidi_class, @@ -167,7 +167,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "east_asian_width")] pub fn load_east_asian_width( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(convert_8(call_constructor_unstable!( maps::east_asian_width [r => Ok(r.static_to_owned())], maps::load_east_asian_width, @@ -180,7 +180,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "hangul_syllable_type")] pub fn load_hangul_syllable_type( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(convert_8(call_constructor_unstable!( maps::hangul_syllable_type [r => Ok(r.static_to_owned())], maps::load_hangul_syllable_type, @@ -193,7 +193,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "indic_syllabic_category")] pub fn load_indic_syllabic_category( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(convert_8(call_constructor_unstable!( maps::indic_syllabic_category [r => Ok(r.static_to_owned())], maps::load_indic_syllabic_category, @@ -206,7 +206,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "line_break")] pub fn load_line_break( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(convert_8(call_constructor_unstable!( maps::line_break [r => Ok(r.static_to_owned())], maps::load_line_break, @@ -218,7 +218,7 @@ pub mod ffi { #[diplomat::rust_link(icu::properties::maps::load_grapheme_cluster_break, Fn, hidden)] pub fn try_grapheme_cluster_break( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(convert_8(call_constructor_unstable!( maps::grapheme_cluster_break [r => Ok(r.static_to_owned())], maps::load_grapheme_cluster_break, @@ -231,7 +231,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "word_break")] pub fn load_word_break( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(convert_8(call_constructor_unstable!( maps::word_break [r => Ok(r.static_to_owned())], maps::load_word_break, @@ -244,7 +244,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "sentence_break")] pub fn load_sentence_break( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(convert_8(call_constructor_unstable!( maps::sentence_break [r => Ok(r.static_to_owned())], maps::load_sentence_break, @@ -257,7 +257,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "joining_type")] pub fn load_joining_type( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(convert_8(call_constructor_unstable!( maps::joining_type [r => Ok(r.static_to_owned())], maps::load_joining_type, @@ -340,7 +340,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "script")] pub fn load_script( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { #[allow(clippy::unwrap_used)] // script is a 16-bit property Ok(Box::new(ICU4XCodePointMapData16( call_constructor_unstable!( diff --git a/ffi/capi/src/properties_names.rs b/ffi/capi/src/properties_names.rs index 31d5ca6bfea..7a1f7379060 100644 --- a/ffi/capi/src/properties_names.rs +++ b/ffi/capi/src/properties_names.rs @@ -12,7 +12,7 @@ pub mod ffi { LineBreak, Script, SentenceBreak, WordBreak, }; - use crate::errors::ffi::ICU4XError; + use crate::errors::ffi::ICU4XDataError; /// A type capable of looking up a property value from a string name. #[diplomat::opaque] @@ -79,7 +79,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "general_category")] pub fn load_general_category( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XPropertyValueNameToEnumMapper( call_constructor_unstable!( GeneralCategory::name_to_enum_mapper [r => Ok(r.static_to_owned())], @@ -99,7 +99,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "hangul_syllable_type")] pub fn load_hangul_syllable_type( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XPropertyValueNameToEnumMapper( call_constructor_unstable!( HangulSyllableType::name_to_enum_mapper [r => Ok(r.static_to_owned())], @@ -119,7 +119,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "east_asian_width")] pub fn load_east_asian_width( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XPropertyValueNameToEnumMapper( call_constructor_unstable!( EastAsianWidth::name_to_enum_mapper [r => Ok(r.static_to_owned())], @@ -139,7 +139,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "bidi_class")] pub fn load_bidi_class( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XPropertyValueNameToEnumMapper( call_constructor_unstable!( BidiClass::name_to_enum_mapper [r => Ok(r.static_to_owned())], @@ -162,7 +162,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "indic_syllabic_category")] pub fn load_indic_syllabic_category( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XPropertyValueNameToEnumMapper( call_constructor_unstable!( IndicSyllabicCategory::name_to_enum_mapper [r => Ok(r.static_to_owned())], @@ -182,7 +182,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "line_break")] pub fn load_line_break( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XPropertyValueNameToEnumMapper( call_constructor_unstable!( LineBreak::name_to_enum_mapper [r => Ok(r.static_to_owned())], @@ -205,7 +205,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "grapheme_cluster_break")] pub fn load_grapheme_cluster_break( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XPropertyValueNameToEnumMapper( call_constructor_unstable!( GraphemeClusterBreak::name_to_enum_mapper [r => Ok(r.static_to_owned())], @@ -225,7 +225,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "word_break")] pub fn load_word_break( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XPropertyValueNameToEnumMapper( call_constructor_unstable!( WordBreak::name_to_enum_mapper [r => Ok(r.static_to_owned())], @@ -245,7 +245,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "sentence_break")] pub fn load_sentence_break( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XPropertyValueNameToEnumMapper( call_constructor_unstable!( SentenceBreak::name_to_enum_mapper [r => Ok(r.static_to_owned())], @@ -261,7 +261,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "script")] pub fn load_script( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XPropertyValueNameToEnumMapper( call_constructor_unstable!( Script::name_to_enum_mapper [r => Ok(r.static_to_owned())], @@ -329,7 +329,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors), constructor)] pub fn load( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XGeneralCategoryNameToMaskMapper( call_constructor_unstable!( GeneralCategoryGroup::name_to_enum_mapper [r => Ok(r.static_to_owned())], diff --git a/ffi/capi/src/properties_sets.rs b/ffi/capi/src/properties_sets.rs index 496502681ad..e7db75c5713 100644 --- a/ffi/capi/src/properties_sets.rs +++ b/ffi/capi/src/properties_sets.rs @@ -9,7 +9,7 @@ pub mod ffi { use core::str; use icu_properties::sets; - use crate::errors::ffi::ICU4XError; + use crate::errors::ffi::{ICU4XDataError, ICU4XError}; use crate::properties_iter::ffi::ICU4XCodePointRangeIterator; #[diplomat::opaque] @@ -69,7 +69,7 @@ pub mod ffi { pub fn load_for_general_category_group( provider: &ICU4XDataProvider, group: u32, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::for_general_category_group [r => Ok(r)], sets::load_for_general_category_group, @@ -83,7 +83,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "ascii_hex_digit")] pub fn load_ascii_hex_digit( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::ascii_hex_digit [r => Ok(r.static_to_owned())], sets::load_ascii_hex_digit, @@ -96,7 +96,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "alnum")] pub fn load_alnum( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::alnum [r => Ok(r.static_to_owned())], sets::load_alnum, @@ -109,7 +109,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "alphabetic")] pub fn load_alphabetic( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::alphabetic [r => Ok(r.static_to_owned())], sets::load_alphabetic, @@ -122,7 +122,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "bidi_control")] pub fn load_bidi_control( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::bidi_control [r => Ok(r.static_to_owned())], sets::load_bidi_control, @@ -135,7 +135,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "bidi_mirrored")] pub fn load_bidi_mirrored( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::bidi_mirrored [r => Ok(r.static_to_owned())], sets::load_bidi_mirrored, @@ -148,7 +148,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "blank")] pub fn load_blank( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::blank [r => Ok(r.static_to_owned())], sets::load_blank, @@ -161,7 +161,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "cased")] pub fn load_cased( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::cased [r => Ok(r.static_to_owned())], sets::load_cased, @@ -174,7 +174,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "case_ignorable")] pub fn load_case_ignorable( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::case_ignorable [r => Ok(r.static_to_owned())], sets::load_case_ignorable, @@ -187,7 +187,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "full_composition_exclusion")] pub fn load_full_composition_exclusion( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::full_composition_exclusion [r => Ok(r.static_to_owned())], sets::load_full_composition_exclusion, @@ -200,7 +200,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "changes_when_casefolded")] pub fn load_changes_when_casefolded( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::changes_when_casefolded [r => Ok(r.static_to_owned())], sets::load_changes_when_casefolded, @@ -213,7 +213,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "changes_when_casemapped")] pub fn load_changes_when_casemapped( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::changes_when_casemapped [r => Ok(r.static_to_owned())], sets::load_changes_when_casemapped, @@ -226,7 +226,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "changes_when_nfkc_casefolded")] pub fn load_changes_when_nfkc_casefolded( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::changes_when_nfkc_casefolded [r => Ok(r.static_to_owned())], sets::load_changes_when_nfkc_casefolded, @@ -239,7 +239,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "changes_when_lowercased")] pub fn load_changes_when_lowercased( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::changes_when_lowercased [r => Ok(r.static_to_owned())], sets::load_changes_when_lowercased, @@ -252,7 +252,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "changes_when_titlecased")] pub fn load_changes_when_titlecased( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::changes_when_titlecased [r => Ok(r.static_to_owned())], sets::load_changes_when_titlecased, @@ -265,7 +265,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "changes_when_uppercased")] pub fn load_changes_when_uppercased( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::changes_when_uppercased [r => Ok(r.static_to_owned())], sets::load_changes_when_uppercased, @@ -278,7 +278,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "dash")] pub fn load_dash( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::dash [r => Ok(r.static_to_owned())], sets::load_dash, @@ -291,7 +291,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "deprecated")] pub fn load_deprecated( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::deprecated [r => Ok(r.static_to_owned())], sets::load_deprecated, @@ -304,7 +304,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "default_ignorable_code_point")] pub fn load_default_ignorable_code_point( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::default_ignorable_code_point [r => Ok(r.static_to_owned())], sets::load_default_ignorable_code_point, @@ -317,7 +317,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "diacritic")] pub fn load_diacritic( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::diacritic [r => Ok(r.static_to_owned())], sets::load_diacritic, @@ -330,7 +330,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "emoji_modifier_base")] pub fn load_emoji_modifier_base( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::emoji_modifier_base [r => Ok(r.static_to_owned())], sets::load_emoji_modifier_base, @@ -343,7 +343,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "emoji_component")] pub fn load_emoji_component( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::emoji_component [r => Ok(r.static_to_owned())], sets::load_emoji_component, @@ -356,7 +356,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "emoji_modifier")] pub fn load_emoji_modifier( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::emoji_modifier [r => Ok(r.static_to_owned())], sets::load_emoji_modifier, @@ -369,7 +369,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "emoji")] pub fn load_emoji( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::emoji [r => Ok(r.static_to_owned())], sets::load_emoji, @@ -382,7 +382,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "emoji_presentation")] pub fn load_emoji_presentation( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::emoji_presentation [r => Ok(r.static_to_owned())], sets::load_emoji_presentation, @@ -395,7 +395,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "extender")] pub fn load_extender( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::extender [r => Ok(r.static_to_owned())], sets::load_extender, @@ -408,7 +408,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "extended_pictographic")] pub fn load_extended_pictographic( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::extended_pictographic [r => Ok(r.static_to_owned())], sets::load_extended_pictographic, @@ -421,7 +421,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "graph")] pub fn load_graph( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::graph [r => Ok(r.static_to_owned())], sets::load_graph, @@ -434,7 +434,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "grapheme_base")] pub fn load_grapheme_base( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::grapheme_base [r => Ok(r.static_to_owned())], sets::load_grapheme_base, @@ -447,7 +447,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "grapheme_extend")] pub fn load_grapheme_extend( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::grapheme_extend [r => Ok(r.static_to_owned())], sets::load_grapheme_extend, @@ -460,7 +460,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "grapheme_link")] pub fn load_grapheme_link( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::grapheme_link [r => Ok(r.static_to_owned())], sets::load_grapheme_link, @@ -473,7 +473,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "hex_digit")] pub fn load_hex_digit( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::hex_digit [r => Ok(r.static_to_owned())], sets::load_hex_digit, @@ -486,7 +486,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "hyphen")] pub fn load_hyphen( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::hyphen [r => Ok(r.static_to_owned())], sets::load_hyphen, @@ -499,7 +499,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "id_continue")] pub fn load_id_continue( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::id_continue [r => Ok(r.static_to_owned())], sets::load_id_continue, @@ -512,7 +512,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "ideographic")] pub fn load_ideographic( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::ideographic [r => Ok(r.static_to_owned())], sets::load_ideographic, @@ -525,7 +525,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "id_start")] pub fn load_id_start( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::id_start [r => Ok(r.static_to_owned())], sets::load_id_start, @@ -538,7 +538,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "ids_binary_operator")] pub fn load_ids_binary_operator( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::ids_binary_operator [r => Ok(r.static_to_owned())], sets::load_ids_binary_operator, @@ -551,7 +551,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "ids_trinary_operator")] pub fn load_ids_trinary_operator( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::ids_trinary_operator [r => Ok(r.static_to_owned())], sets::load_ids_trinary_operator, @@ -564,7 +564,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "join_control")] pub fn load_join_control( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::join_control [r => Ok(r.static_to_owned())], sets::load_join_control, @@ -577,7 +577,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "logical_order_exception")] pub fn load_logical_order_exception( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::logical_order_exception [r => Ok(r.static_to_owned())], sets::load_logical_order_exception, @@ -590,7 +590,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "lowercase")] pub fn load_lowercase( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::lowercase [r => Ok(r.static_to_owned())], sets::load_lowercase, @@ -603,7 +603,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "math")] pub fn load_math( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::math [r => Ok(r.static_to_owned())], sets::load_math, @@ -616,7 +616,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "noncharacter_code_point")] pub fn load_noncharacter_code_point( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::noncharacter_code_point [r => Ok(r.static_to_owned())], sets::load_noncharacter_code_point, @@ -629,7 +629,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "nfc_inert")] pub fn load_nfc_inert( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::nfc_inert [r => Ok(r.static_to_owned())], sets::load_nfc_inert, @@ -642,7 +642,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "nfd_inert")] pub fn load_nfd_inert( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::nfd_inert [r => Ok(r.static_to_owned())], sets::load_nfd_inert, @@ -655,7 +655,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "nfkc_inert")] pub fn load_nfkc_inert( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::nfkc_inert [r => Ok(r.static_to_owned())], sets::load_nfkc_inert, @@ -668,7 +668,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "nfkd_inert")] pub fn load_nfkd_inert( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::nfkd_inert [r => Ok(r.static_to_owned())], sets::load_nfkd_inert, @@ -681,7 +681,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "pattern_syntax")] pub fn load_pattern_syntax( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::pattern_syntax [r => Ok(r.static_to_owned())], sets::load_pattern_syntax, @@ -694,7 +694,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "pattern_white_space")] pub fn load_pattern_white_space( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::pattern_white_space [r => Ok(r.static_to_owned())], sets::load_pattern_white_space, @@ -707,7 +707,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "prepended_concatenation_mark")] pub fn load_prepended_concatenation_mark( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::prepended_concatenation_mark [r => Ok(r.static_to_owned())], sets::load_prepended_concatenation_mark, @@ -720,7 +720,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "print")] pub fn load_print( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::print [r => Ok(r.static_to_owned())], sets::load_print, @@ -733,7 +733,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "quotation_mark")] pub fn load_quotation_mark( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::quotation_mark [r => Ok(r.static_to_owned())], sets::load_quotation_mark, @@ -746,7 +746,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "radical")] pub fn load_radical( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::radical [r => Ok(r.static_to_owned())], sets::load_radical, @@ -759,7 +759,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "regional_indicator")] pub fn load_regional_indicator( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::regional_indicator [r => Ok(r.static_to_owned())], sets::load_regional_indicator, @@ -772,7 +772,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "soft_dotted")] pub fn load_soft_dotted( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::soft_dotted [r => Ok(r.static_to_owned())], sets::load_soft_dotted, @@ -785,7 +785,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "segment_starter")] pub fn load_segment_starter( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::segment_starter [r => Ok(r.static_to_owned())], sets::load_segment_starter, @@ -798,7 +798,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "case_sensitive")] pub fn load_case_sensitive( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::case_sensitive [r => Ok(r.static_to_owned())], sets::load_case_sensitive, @@ -811,7 +811,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "sentence_terminal")] pub fn load_sentence_terminal( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::sentence_terminal [r => Ok(r.static_to_owned())], sets::load_sentence_terminal, @@ -824,7 +824,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "terminal_punctuation")] pub fn load_terminal_punctuation( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::terminal_punctuation [r => Ok(r.static_to_owned())], sets::load_terminal_punctuation, @@ -837,7 +837,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "unified_ideograph")] pub fn load_unified_ideograph( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::unified_ideograph [r => Ok(r.static_to_owned())], sets::load_unified_ideograph, @@ -850,7 +850,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "uppercase")] pub fn load_uppercase( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::uppercase [r => Ok(r.static_to_owned())], sets::load_uppercase, @@ -863,7 +863,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "variation_selector")] pub fn load_variation_selector( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::variation_selector [r => Ok(r.static_to_owned())], sets::load_variation_selector, @@ -876,7 +876,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "white_space")] pub fn load_white_space( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::white_space [r => Ok(r.static_to_owned())], sets::load_white_space, @@ -889,7 +889,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "xdigit")] pub fn load_xdigit( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::xdigit [r => Ok(r.static_to_owned())], sets::load_xdigit, @@ -902,7 +902,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "xid_continue")] pub fn load_xid_continue( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::xid_continue [r => Ok(r.static_to_owned())], sets::load_xid_continue, @@ -915,7 +915,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "xid_start")] pub fn load_xid_start( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!( sets::xid_start [r => Ok(r.static_to_owned())], sets::load_xid_start, diff --git a/ffi/capi/src/properties_unisets.rs b/ffi/capi/src/properties_unisets.rs index 19aca492973..faea1f515cd 100644 --- a/ffi/capi/src/properties_unisets.rs +++ b/ffi/capi/src/properties_unisets.rs @@ -10,7 +10,7 @@ pub mod ffi { use core::str; use icu_properties::{exemplar_chars, sets}; - use crate::errors::ffi::ICU4XError; + use crate::errors::ffi::ICU4XDataError; #[diplomat::opaque] /// An ICU4X Unicode Set Property object, capable of querying whether a code point is contained in a set based on a Unicode property. @@ -53,7 +53,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "basic_emoji")] pub fn load_basic_emoji( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XUnicodeSetData(call_constructor_unstable!( sets::basic_emoji [r => Ok(r.static_to_owned())], sets::load_basic_emoji, @@ -67,7 +67,7 @@ pub mod ffi { pub fn load_exemplars_main( provider: &ICU4XDataProvider, locale: &ICU4XLocale, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { let locale = locale.to_datalocale(); Ok(Box::new(ICU4XUnicodeSetData(call_constructor_unstable!( exemplar_chars::exemplars_main, @@ -87,7 +87,7 @@ pub mod ffi { pub fn load_exemplars_auxiliary( provider: &ICU4XDataProvider, locale: &ICU4XLocale, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { let locale = locale.to_datalocale(); Ok(Box::new(ICU4XUnicodeSetData(call_constructor_unstable!( exemplar_chars::exemplars_auxiliary, @@ -107,7 +107,7 @@ pub mod ffi { pub fn load_exemplars_punctuation( provider: &ICU4XDataProvider, locale: &ICU4XLocale, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { let locale = locale.to_datalocale(); Ok(Box::new(ICU4XUnicodeSetData(call_constructor_unstable!( exemplar_chars::exemplars_punctuation, @@ -123,7 +123,7 @@ pub mod ffi { pub fn load_exemplars_numbers( provider: &ICU4XDataProvider, locale: &ICU4XLocale, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { let locale = locale.to_datalocale(); Ok(Box::new(ICU4XUnicodeSetData(call_constructor_unstable!( exemplar_chars::exemplars_numbers, @@ -139,7 +139,7 @@ pub mod ffi { pub fn load_exemplars_index( provider: &ICU4XDataProvider, locale: &ICU4XLocale, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { let locale = locale.to_datalocale(); Ok(Box::new(ICU4XUnicodeSetData(call_constructor_unstable!( exemplar_chars::exemplars_index, diff --git a/ffi/capi/src/provider.rs b/ffi/capi/src/provider.rs index 377a67bd788..a97c4e0c4f0 100644 --- a/ffi/capi/src/provider.rs +++ b/ffi/capi/src/provider.rs @@ -25,7 +25,7 @@ pub enum ICU4XDataProviderInner { #[diplomat::bridge] pub mod ffi { use super::ICU4XDataProviderInner; - use crate::errors::ffi::ICU4XError; + use crate::errors::ffi::ICU4XDataError; use alloc::boxed::Box; #[allow(unused_imports)] // feature-gated use icu_provider_adapters::fallback::LocaleFallbackProvider; @@ -67,12 +67,11 @@ pub mod ffi { ))] #[diplomat::attr(dart, disable)] #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "fs")] - pub fn create_fs(path: &DiplomatStr) -> Result, ICU4XError> { + pub fn create_fs(path: &DiplomatStr) -> Result, ICU4XDataError> { Ok(Box::new(convert_buffer_provider( icu_provider_fs::FsDataProvider::try_new( // In the future we can start using OsString APIs to support non-utf8 paths - core::str::from_utf8(path) - .map_err(|e| ICU4XError::DataIoError.log_original(&e))?, + core::str::from_utf8(path).map_err(|_| ICU4XDataError::Io)?, )?, ))) } @@ -83,7 +82,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "from_byte_slice")] pub fn create_from_byte_slice( blob: &'static [DiplomatByte], - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(convert_buffer_provider( icu_provider_blob::BlobDataProvider::try_new_from_static_blob(blob)?, ))) @@ -115,7 +114,7 @@ pub mod ffi { Struct, hidden )] - pub fn fork_by_key(&mut self, other: &mut ICU4XDataProvider) -> Result<(), ICU4XError> { + pub fn fork_by_key(&mut self, other: &mut ICU4XDataProvider) -> Result<(), ICU4XDataError> { #[allow(unused_imports)] use ICU4XDataProviderInner::*; *self = match ( @@ -145,7 +144,10 @@ pub mod ffi { icu_provider_adapters::fork::predicates::MissingLocalePredicate, Struct )] - pub fn fork_by_locale(&mut self, other: &mut ICU4XDataProvider) -> Result<(), ICU4XError> { + pub fn fork_by_locale( + &mut self, + other: &mut ICU4XDataProvider, + ) -> Result<(), ICU4XDataError> { #[allow(unused_imports)] use ICU4XDataProviderInner::*; *self = match ( @@ -186,7 +188,7 @@ pub mod ffi { Struct, compact )] - pub fn enable_locale_fallback(&mut self) -> Result<(), ICU4XError> { + pub fn enable_locale_fallback(&mut self) -> Result<(), ICU4XDataError> { use ICU4XDataProviderInner::*; *self = match core::mem::replace(&mut self.0, Destroyed) { Destroyed => Err(icu_provider::DataError::custom( @@ -219,7 +221,7 @@ pub mod ffi { pub fn enable_locale_fallback_with( &mut self, fallbacker: &crate::fallbacker::ffi::ICU4XLocaleFallbacker, - ) -> Result<(), ICU4XError> { + ) -> Result<(), ICU4XDataError> { use ICU4XDataProviderInner::*; *self = match core::mem::replace(&mut self.0, Destroyed) { Destroyed => Err(icu_provider::DataError::custom( diff --git a/ffi/capi/src/script.rs b/ffi/capi/src/script.rs index 901593ecd7f..93104789dbf 100644 --- a/ffi/capi/src/script.rs +++ b/ffi/capi/src/script.rs @@ -8,7 +8,7 @@ pub mod ffi { use alloc::boxed::Box; use icu_properties::{script, sets::CodePointSetData, Script}; - use crate::errors::ffi::ICU4XError; + use crate::errors::ffi::ICU4XDataError; use crate::properties_iter::ffi::ICU4XCodePointRangeIterator; use crate::properties_sets::ffi::ICU4XCodePointSetData; @@ -36,7 +36,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors), constructor)] pub fn create( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XScriptWithExtensions(call_constructor!( script::script_with_extensions [r => Ok(r.static_to_owned())], script::load_script_with_extensions_with_any_provider, diff --git a/ffi/capi/src/segmenter_grapheme.rs b/ffi/capi/src/segmenter_grapheme.rs index b6c8d386f5a..7babbe5a808 100644 --- a/ffi/capi/src/segmenter_grapheme.rs +++ b/ffi/capi/src/segmenter_grapheme.rs @@ -4,7 +4,7 @@ #[diplomat::bridge] pub mod ffi { - use crate::errors::ffi::ICU4XError; + use crate::errors::ffi::ICU4XDataError; use crate::provider::ffi::ICU4XDataProvider; use alloc::boxed::Box; use core::convert::TryFrom; @@ -51,7 +51,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors), constructor)] pub fn create( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XGraphemeClusterSegmenter(call_constructor!( GraphemeClusterSegmenter::new [r => Ok(r)], GraphemeClusterSegmenter::try_new_with_any_provider, diff --git a/ffi/capi/src/segmenter_line.rs b/ffi/capi/src/segmenter_line.rs index f58c76f66d7..5df42bc0ada 100644 --- a/ffi/capi/src/segmenter_line.rs +++ b/ffi/capi/src/segmenter_line.rs @@ -8,7 +8,7 @@ use icu_segmenter::LineBreakWordOption; #[diplomat::bridge] pub mod ffi { - use crate::errors::ffi::ICU4XError; + use crate::errors::ffi::ICU4XDataError; use crate::provider::ffi::ICU4XDataProvider; use alloc::boxed::Box; use core::convert::TryFrom; @@ -72,7 +72,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "auto")] pub fn create_auto( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XLineSegmenter(call_constructor!( LineSegmenter::new_auto [r => Ok(r)], LineSegmenter::try_new_auto_with_any_provider, @@ -87,7 +87,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "lstm")] pub fn create_lstm( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XLineSegmenter(call_constructor!( LineSegmenter::new_lstm [r => Ok(r)], LineSegmenter::try_new_lstm_with_any_provider, @@ -102,7 +102,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "dictionary")] pub fn create_dictionary( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XLineSegmenter(call_constructor!( LineSegmenter::new_dictionary [r => Ok(r)], LineSegmenter::try_new_dictionary_with_any_provider, @@ -119,7 +119,7 @@ pub mod ffi { pub fn create_auto_with_options_v1( provider: &ICU4XDataProvider, options: ICU4XLineBreakOptionsV1, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XLineSegmenter(call_constructor!( LineSegmenter::new_auto_with_options [r => Ok(r)], LineSegmenter::try_new_auto_with_options_with_any_provider, @@ -137,7 +137,7 @@ pub mod ffi { pub fn create_lstm_with_options_v1( provider: &ICU4XDataProvider, options: ICU4XLineBreakOptionsV1, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XLineSegmenter(call_constructor!( LineSegmenter::new_lstm_with_options [r => Ok(r)], LineSegmenter::try_new_lstm_with_options_with_any_provider, @@ -158,7 +158,7 @@ pub mod ffi { pub fn create_dictionary_with_options_v1( provider: &ICU4XDataProvider, options: ICU4XLineBreakOptionsV1, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XLineSegmenter(call_constructor!( LineSegmenter::new_dictionary_with_options [r => Ok(r)], LineSegmenter::try_new_dictionary_with_options_with_any_provider, diff --git a/ffi/capi/src/segmenter_sentence.rs b/ffi/capi/src/segmenter_sentence.rs index 246d31ae29f..bcc24558fbb 100644 --- a/ffi/capi/src/segmenter_sentence.rs +++ b/ffi/capi/src/segmenter_sentence.rs @@ -4,7 +4,7 @@ #[diplomat::bridge] pub mod ffi { - use crate::errors::ffi::ICU4XError; + use crate::errors::ffi::ICU4XDataError; use crate::provider::ffi::ICU4XDataProvider; use alloc::boxed::Box; use core::convert::TryFrom; @@ -46,7 +46,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors), constructor)] pub fn create( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XSentenceSegmenter(call_constructor!( SentenceSegmenter::new [r => Ok(r)], SentenceSegmenter::try_new_with_any_provider, diff --git a/ffi/capi/src/segmenter_word.rs b/ffi/capi/src/segmenter_word.rs index 3cfe413a758..ba853ab4b1a 100644 --- a/ffi/capi/src/segmenter_word.rs +++ b/ffi/capi/src/segmenter_word.rs @@ -4,7 +4,7 @@ #[diplomat::bridge] pub mod ffi { - use crate::errors::ffi::ICU4XError; + use crate::errors::ffi::ICU4XDataError; use crate::provider::ffi::ICU4XDataProvider; use alloc::boxed::Box; use core::convert::TryFrom; @@ -64,7 +64,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "auto")] pub fn create_auto( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XWordSegmenter(call_constructor!( WordSegmenter::new_auto [r => Ok(r)], WordSegmenter::try_new_auto_with_any_provider, @@ -82,7 +82,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "lstm")] pub fn create_lstm( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XWordSegmenter(call_constructor!( WordSegmenter::new_lstm [r => Ok(r)], WordSegmenter::try_new_lstm_with_any_provider, @@ -97,7 +97,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "dictionary")] pub fn create_dictionary( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XWordSegmenter(call_constructor!( WordSegmenter::new_dictionary [r => Ok(r)], WordSegmenter::try_new_dictionary_with_any_provider, diff --git a/ffi/capi/src/time.rs b/ffi/capi/src/time.rs index 32b249eb0d1..f9cf0d48f5f 100644 --- a/ffi/capi/src/time.rs +++ b/ffi/capi/src/time.rs @@ -8,7 +8,7 @@ pub mod ffi { use icu_calendar::Time; - use crate::errors::ffi::ICU4XError; + use crate::errors::ffi::ICU4XCalendarError; #[diplomat::opaque] /// An ICU4X Time object representing a time in terms of hour, minute, second, nanosecond @@ -25,7 +25,7 @@ pub mod ffi { minute: u8, second: u8, nanosecond: u32, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XCalendarError> { let hour = hour.try_into()?; let minute = minute.try_into()?; let second = second.try_into()?; @@ -42,7 +42,7 @@ pub mod ffi { /// Creates a new [`ICU4XTime`] representing midnight (00:00.000). #[diplomat::rust_link(icu::calendar::Time::midnight, FnInStruct)] #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "midnight")] - pub fn create_midnight() -> Result, ICU4XError> { + pub fn create_midnight() -> Result, ICU4XCalendarError> { let time = Time::midnight(); Ok(Box::new(ICU4XTime(time))) } diff --git a/ffi/capi/src/timezone.rs b/ffi/capi/src/timezone.rs index 85ee66b0735..24a63e94a05 100644 --- a/ffi/capi/src/timezone.rs +++ b/ffi/capi/src/timezone.rs @@ -6,7 +6,8 @@ use icu_timezone::CustomTimeZone; #[diplomat::bridge] pub mod ffi { - use crate::errors::ffi::ICU4XError; + use crate::errors::ffi::ICU4XTimeZoneInvalidIdError; + use crate::errors::ffi::ICU4XTimeZoneInvalidOffsetError; use alloc::boxed::Box; use core::fmt::Write; use icu_timezone::CustomTimeZone; @@ -24,7 +25,9 @@ pub mod ffi { #[diplomat::rust_link(icu::timezone::GmtOffset::from_str, FnInStruct, hidden)] #[diplomat::rust_link(icu::timezone::GmtOffset::try_from_bytes, FnInStruct, hidden)] #[diplomat::attr(all(supports = constructors, supports = fallible_constructors, supports = named_constructors), named_constructor = "from_string")] - pub fn create_from_string(s: &DiplomatStr) -> Result, ICU4XError> { + pub fn create_from_string( + s: &DiplomatStr, + ) -> Result, ICU4XTimeZoneInvalidOffsetError> { Ok(Box::new(ICU4XCustomTimeZone::from( CustomTimeZone::try_from_bytes(s)?, ))) @@ -73,7 +76,7 @@ pub mod ffi { pub fn try_set_gmt_offset_seconds( &mut self, offset_seconds: i32, - ) -> Result<(), ICU4XError> { + ) -> Result<(), ICU4XTimeZoneInvalidOffsetError> { self.0.gmt_offset = Some(GmtOffset::try_from_offset_seconds(offset_seconds)?); Ok(()) } @@ -143,10 +146,13 @@ pub mod ffi { AssociatedTypeInStruct, hidden )] - pub fn try_set_time_zone_id(&mut self, id: &DiplomatStr) -> Result<(), ICU4XError> { + pub fn try_set_time_zone_id( + &mut self, + id: &DiplomatStr, + ) -> Result<(), ICU4XTimeZoneInvalidIdError> { self.0.time_zone_id = Some(icu_timezone::TimeZoneBcp47Id( tinystr::TinyAsciiStr::try_from_utf8(id) - .map_err(|_| ICU4XError::TimeZoneInvalidIdError)?, + .map_err(|_| ICU4XTimeZoneInvalidIdError::TodoZst)?, )); Ok(()) } @@ -159,13 +165,13 @@ pub mod ffi { &mut self, mapper: &crate::timezone_mapper::ffi::ICU4XTimeZoneIdMapper, id: &DiplomatStr, - ) -> Result<(), ICU4XError> { + ) -> Result<(), ICU4XTimeZoneInvalidIdError> { self.0.time_zone_id = Some( mapper .0 .as_borrowed() .iana_bytes_to_bcp47(id) - .ok_or(ICU4XError::TimeZoneInvalidIdError)?, + .ok_or(ICU4XTimeZoneInvalidIdError::TodoZst)?, ); Ok(()) } @@ -194,10 +200,13 @@ pub mod ffi { #[diplomat::rust_link(icu::timezone::CustomTimeZone::metazone_id, StructField)] #[diplomat::rust_link(icu::timezone::MetazoneId, Struct, compact)] #[diplomat::rust_link(icu::timezone::MetazoneId::from_str, FnInStruct, hidden)] - pub fn try_set_metazone_id(&mut self, id: &DiplomatStr) -> Result<(), ICU4XError> { + pub fn try_set_metazone_id( + &mut self, + id: &DiplomatStr, + ) -> Result<(), ICU4XTimeZoneInvalidIdError> { self.0.metazone_id = Some(icu_timezone::MetazoneId( tinystr::TinyAsciiStr::try_from_utf8(id) - .map_err(|_| ICU4XError::TimeZoneInvalidIdError)?, + .map_err(|_| ICU4XTimeZoneInvalidIdError::TodoZst)?, )); Ok(()) } diff --git a/ffi/capi/src/timezone_mapper.rs b/ffi/capi/src/timezone_mapper.rs index 5de1c748466..d4eecd524c7 100644 --- a/ffi/capi/src/timezone_mapper.rs +++ b/ffi/capi/src/timezone_mapper.rs @@ -4,7 +4,7 @@ #[diplomat::bridge] pub mod ffi { - use crate::errors::ffi::ICU4XError; + use crate::errors::ffi::{ICU4XDataError, ICU4XTimeZoneInvalidIdError}; use crate::provider::ffi::ICU4XDataProvider; use alloc::boxed::Box; use icu_timezone::{ @@ -29,7 +29,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors), constructor)] pub fn create( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XTimeZoneIdMapper(call_constructor!( TimeZoneIdMapper::new [r => Ok(r)], TimeZoneIdMapper::try_new_with_any_provider, @@ -48,11 +48,11 @@ pub mod ffi { &self, value: &DiplomatStr, write: &mut diplomat_runtime::DiplomatWrite, - ) -> Result<(), ICU4XError> { + ) -> Result<(), ICU4XTimeZoneInvalidIdError> { let handle = self.0.as_borrowed(); let bcp47 = handle .iana_bytes_to_bcp47(value) - .ok_or(ICU4XError::TimeZoneInvalidIdError)?; + .ok_or(ICU4XTimeZoneInvalidIdError::TodoZst)?; let _infallible = bcp47.0.write_to(write); Ok(()) } @@ -62,11 +62,11 @@ pub mod ffi { &self, value: &str, write: &mut diplomat_runtime::DiplomatWrite, - ) -> Result<(), ICU4XError> { + ) -> Result<(), ICU4XTimeZoneInvalidIdError> { let handle = self.0.as_borrowed(); let iana = handle .normalize_iana(value) - .ok_or(ICU4XError::TimeZoneInvalidIdError)?; + .ok_or(ICU4XTimeZoneInvalidIdError::TodoZst)?; let _infallible = iana.0.write_to(write); Ok(()) } @@ -79,11 +79,11 @@ pub mod ffi { &self, value: &str, write: &mut diplomat_runtime::DiplomatWrite, - ) -> Result<(), ICU4XError> { + ) -> Result<(), ICU4XTimeZoneInvalidIdError> { let handle = self.0.as_borrowed(); let iana = handle .canonicalize_iana(value) - .ok_or(ICU4XError::TimeZoneInvalidIdError)?; + .ok_or(ICU4XTimeZoneInvalidIdError::TodoZst)?; let _infallible = iana.0.write_to(write); Ok(()) } @@ -96,12 +96,12 @@ pub mod ffi { &self, value: &DiplomatStr, write: &mut diplomat_runtime::DiplomatWrite, - ) -> Result<(), ICU4XError> { + ) -> Result<(), ICU4XTimeZoneInvalidIdError> { let handle = self.0.as_borrowed(); let iana = TinyAsciiStr::try_from_utf8(value) .ok() .and_then(|s| handle.find_canonical_iana_from_bcp47(TimeZoneBcp47Id(s))) - .ok_or(ICU4XError::TimeZoneInvalidIdError)?; + .ok_or(ICU4XTimeZoneInvalidIdError::TodoZst)?; let _infallible = iana.write_to(write); Ok(()) } @@ -145,7 +145,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors), constructor)] pub fn create( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XTimeZoneIdMapperWithFastCanonicalization( call_constructor!( TimeZoneIdMapperWithFastCanonicalization::new [r => Ok(r)], @@ -164,11 +164,11 @@ pub mod ffi { &self, value: &str, write: &mut diplomat_runtime::DiplomatWrite, - ) -> Result<(), ICU4XError> { + ) -> Result<(), ICU4XTimeZoneInvalidIdError> { let handle = self.0.as_borrowed(); let iana = handle .canonicalize_iana(value) - .ok_or(ICU4XError::TimeZoneInvalidIdError)?; + .ok_or(ICU4XTimeZoneInvalidIdError::TodoZst)?; let _infallible = iana.0.write_to(write); Ok(()) } @@ -181,13 +181,13 @@ pub mod ffi { &self, value: &DiplomatStr, write: &mut diplomat_runtime::DiplomatWrite, - ) -> Result<(), ICU4XError> { + ) -> Result<(), ICU4XTimeZoneInvalidIdError> { let handle = self.0.as_borrowed(); let iana = TinyAsciiStr::try_from_utf8(value) .ok() .map(TimeZoneBcp47Id) .and_then(|t| handle.canonical_iana_from_bcp47(t)) - .ok_or(ICU4XError::TimeZoneInvalidIdError)?; + .ok_or(ICU4XTimeZoneInvalidIdError::TodoZst)?; let _infallible = iana.write_to(write); Ok(()) } diff --git a/ffi/capi/src/units_converter.rs b/ffi/capi/src/units_converter.rs index 037d8781e5b..48110ec91c8 100644 --- a/ffi/capi/src/units_converter.rs +++ b/ffi/capi/src/units_converter.rs @@ -4,7 +4,7 @@ #[diplomat::bridge] pub mod ffi { - use crate::{errors::ffi::ICU4XError, provider::ffi::ICU4XDataProvider}; + use crate::{errors::ffi::ICU4XDataError, provider::ffi::ICU4XDataProvider}; use alloc::boxed::Box; use diplomat_runtime::DiplomatStr; use icu_experimental::units::converter::UnitsConverter; @@ -28,7 +28,7 @@ pub mod ffi { #[diplomat::attr(all(supports = constructors, supports = fallible_constructors), constructor)] pub fn create( provider: &ICU4XDataProvider, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { Ok(Box::new(ICU4XUnitsConverterFactory(call_constructor!( ConverterFactory::new [r => Ok(r)], ConverterFactory::try_new_with_any_provider, diff --git a/ffi/capi/src/week.rs b/ffi/capi/src/week.rs index a424261a550..f071d22ed94 100644 --- a/ffi/capi/src/week.rs +++ b/ffi/capi/src/week.rs @@ -7,7 +7,7 @@ use icu_calendar::week::WeekOf; #[diplomat::bridge] pub mod ffi { use crate::date::ffi::ICU4XIsoWeekday; - use crate::errors::ffi::ICU4XError; + use crate::errors::ffi::ICU4XDataError; use crate::locale_core::ffi::ICU4XLocale; use crate::provider::ffi::ICU4XDataProvider; use alloc::boxed::Box; @@ -40,7 +40,7 @@ pub mod ffi { pub fn create( provider: &ICU4XDataProvider, locale: &ICU4XLocale, - ) -> Result, ICU4XError> { + ) -> Result, ICU4XDataError> { let locale = locale.to_datalocale(); Ok(Box::new(ICU4XWeekCalculator(call_constructor!( diff --git a/tutorials/c-tiny/fixeddecimal/test.c b/tutorials/c-tiny/fixeddecimal/test.c index 61791778b82..11c2dd32356 100644 --- a/tutorials/c-tiny/fixeddecimal/test.c +++ b/tutorials/c-tiny/fixeddecimal/test.c @@ -22,7 +22,7 @@ int main(int argc, char *argv[]) { ICU4XFixedDecimal* decimal = ICU4XFixedDecimal_create_from_u64(1000007); ICU4XFixedDecimal_half_even(decimal, 0); - diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError fdf_result = + diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XDataError fdf_result = ICU4XFixedDecimalFormatter_create_with_grouping_strategy(provider, locale, ICU4XFixedDecimalGroupingStrategy_Auto); if (!fdf_result.is_ok) { printf("Failed to create FixedDecimalFormatter\n"); diff --git a/tutorials/c-tiny/segmenter/test.c b/tutorials/c-tiny/segmenter/test.c index 98ec87bb006..b9e400ccc6c 100644 --- a/tutorials/c-tiny/segmenter/test.c +++ b/tutorials/c-tiny/segmenter/test.c @@ -9,7 +9,7 @@ int main(int argc, char *argv[]) { ICU4XDataProvider* provider = ICU4XDataProvider_create_compiled(); - diplomat_result_box_ICU4XLineSegmenter_ICU4XError segmenter_result = ICU4XLineSegmenter_create_auto(provider); + diplomat_result_box_ICU4XLineSegmenter_ICU4XDataError segmenter_result = ICU4XLineSegmenter_create_auto(provider); if (!segmenter_result.is_ok) { printf("Failed to create ICU4XLineSegmenter\n"); return 1; diff --git a/tutorials/c/Cargo.lock b/tutorials/c/Cargo.lock index 16f0be6f5ba..2ffe39df45f 100644 --- a/tutorials/c/Cargo.lock +++ b/tutorials/c/Cargo.lock @@ -47,7 +47,7 @@ dependencies = [ [[package]] name = "diplomat" version = "0.8.0" -source = "git+https://github.com/rust-diplomat/diplomat?rev=bcf0fc679266bb5ee0c7b25a371398158e81a7e1#bcf0fc679266bb5ee0c7b25a371398158e81a7e1" +source = "git+https://github.com/rust-diplomat/diplomat?rev=dbb32938c2d0176474f44907df057afd1df2dea7#dbb32938c2d0176474f44907df057afd1df2dea7" dependencies = [ "diplomat_core", "proc-macro2", @@ -58,7 +58,7 @@ dependencies = [ [[package]] name = "diplomat-runtime" version = "0.8.0" -source = "git+https://github.com/rust-diplomat/diplomat?rev=bcf0fc679266bb5ee0c7b25a371398158e81a7e1#bcf0fc679266bb5ee0c7b25a371398158e81a7e1" +source = "git+https://github.com/rust-diplomat/diplomat?rev=dbb32938c2d0176474f44907df057afd1df2dea7#dbb32938c2d0176474f44907df057afd1df2dea7" dependencies = [ "log", ] @@ -66,7 +66,7 @@ dependencies = [ [[package]] name = "diplomat_core" version = "0.8.0" -source = "git+https://github.com/rust-diplomat/diplomat?rev=bcf0fc679266bb5ee0c7b25a371398158e81a7e1#bcf0fc679266bb5ee0c7b25a371398158e81a7e1" +source = "git+https://github.com/rust-diplomat/diplomat?rev=dbb32938c2d0176474f44907df057afd1df2dea7#dbb32938c2d0176474f44907df057afd1df2dea7" dependencies = [ "lazy_static", "proc-macro2", @@ -111,8 +111,8 @@ dependencies = [ "calendrical_calculations", "displaydoc", "icu_calendar_data", - "icu_locid", - "icu_locid_transform", + "icu_locale", + "icu_locale_core", "icu_provider", "tinystr", "writeable", @@ -138,8 +138,8 @@ dependencies = [ "icu_decimal", "icu_experimental", "icu_list", - "icu_locid", - "icu_locid_transform", + "icu_locale", + "icu_locale_core", "icu_normalizer", "icu_plurals", "icu_properties", @@ -161,7 +161,7 @@ dependencies = [ "displaydoc", "icu_casemap_data", "icu_collections", - "icu_locid", + "icu_locale_core", "icu_properties", "icu_provider", "writeable", @@ -179,7 +179,7 @@ dependencies = [ "displaydoc", "icu_collator_data", "icu_collections", - "icu_locid_transform", + "icu_locale", "icu_normalizer", "icu_properties", "icu_provider", @@ -213,8 +213,8 @@ dependencies = [ "icu_calendar", "icu_datetime_data", "icu_decimal", - "icu_locid", - "icu_locid_transform", + "icu_locale", + "icu_locale_core", "icu_plurals", "icu_provider", "icu_timezone", @@ -235,7 +235,7 @@ dependencies = [ "displaydoc", "fixed_decimal", "icu_decimal_data", - "icu_locid_transform", + "icu_locale", "icu_provider", "writeable", ] @@ -253,8 +253,8 @@ dependencies = [ "icu_collections", "icu_decimal", "icu_experimental_data", - "icu_locid", - "icu_locid_transform", + "icu_locale", + "icu_locale_core", "icu_normalizer", "icu_pattern", "icu_plurals", @@ -282,7 +282,7 @@ version = "1.5.0" dependencies = [ "displaydoc", "icu_list_data", - "icu_locid_transform", + "icu_locale", "icu_provider", "regex-automata", "writeable", @@ -293,30 +293,30 @@ name = "icu_list_data" version = "1.5.0" [[package]] -name = "icu_locid" +name = "icu_locale" version = "1.5.0" dependencies = [ "displaydoc", - "litemap", + "icu_locale_core", + "icu_locale_data", + "icu_provider", "tinystr", - "writeable", "zerovec", ] [[package]] -name = "icu_locid_transform" +name = "icu_locale_core" version = "1.5.0" dependencies = [ "displaydoc", - "icu_locid", - "icu_locid_transform_data", - "icu_provider", + "litemap", "tinystr", + "writeable", "zerovec", ] [[package]] -name = "icu_locid_transform_data" +name = "icu_locale_data" version = "1.5.0" [[package]] @@ -356,7 +356,7 @@ version = "1.5.0" dependencies = [ "displaydoc", "fixed_decimal", - "icu_locid_transform", + "icu_locale", "icu_plurals_data", "icu_provider", "zerovec", @@ -372,7 +372,7 @@ version = "1.5.0" dependencies = [ "displaydoc", "icu_collections", - "icu_locid_transform", + "icu_locale", "icu_properties_data", "icu_provider", "tinystr", @@ -389,7 +389,7 @@ name = "icu_provider" version = "1.5.0" dependencies = [ "displaydoc", - "icu_locid", + "icu_locale_core", "icu_provider_macros", "log", "stable_deref_trait", @@ -404,8 +404,8 @@ dependencies = [ name = "icu_provider_adapters" version = "1.5.0" dependencies = [ - "icu_locid", - "icu_locid_transform", + "icu_locale", + "icu_locale_core", "icu_provider", "tinystr", "zerovec", @@ -427,7 +427,7 @@ dependencies = [ "core_maths", "displaydoc", "icu_collections", - "icu_locid", + "icu_locale_core", "icu_provider", "icu_segmenter_data", "utf8_iter", @@ -941,6 +941,10 @@ version = "1.5.0" name = "icu_provider_fs" version = "1.5.0" +[[patch.unused]] +name = "icu_registry" +version = "1.5.0" + [[patch.unused]] name = "ixdtf" version = "0.2.0" diff --git a/tutorials/c/fixeddecimal.c b/tutorials/c/fixeddecimal.c index 48798edf330..fafa79e70ff 100644 --- a/tutorials/c/fixeddecimal.c +++ b/tutorials/c/fixeddecimal.c @@ -9,7 +9,7 @@ int main() { ICU4XLogger_init_simple_logger(); - diplomat_result_box_ICU4XLocale_ICU4XError locale_result = ICU4XLocale_create_from_string("bn", 2); + diplomat_result_box_ICU4XLocale_ICU4XLocaleParseError locale_result = ICU4XLocale_create_from_string("bn", 2); if (!locale_result.is_ok) { return 1; } @@ -18,7 +18,7 @@ int main() { ICU4XFixedDecimal* decimal = ICU4XFixedDecimal_create_from_u64(1000007); - diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError fdf_result = + diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XDataError fdf_result = ICU4XFixedDecimalFormatter_create_with_grouping_strategy(provider, locale, ICU4XFixedDecimalGroupingStrategy_Auto); if (!fdf_result.is_ok) { printf("Failed to create FixedDecimalFormatter\n"); @@ -63,7 +63,7 @@ int main() { ICU4XFixedDecimal_destroy(decimal); - diplomat_result_box_ICU4XFixedDecimal_ICU4XError fd_result = ICU4XFixedDecimal_create_from_string("1000007.070", 11); + diplomat_result_box_ICU4XFixedDecimal_ICU4XFixedDecimalParseError fd_result = ICU4XFixedDecimal_create_from_string("1000007.070", 11); if (!fd_result.is_ok) { printf("Failed to create FixedDecimal from string.\n"); return 1; diff --git a/tutorials/c/locale.c b/tutorials/c/locale.c index 4f258a3ddf9..aaffb484d19 100644 --- a/tutorials/c/locale.c +++ b/tutorials/c/locale.c @@ -29,7 +29,7 @@ bool test_locale(ICU4XLocale* locale, const char* message, const char* expected) } ICU4XLocale* get_locale(const char* localeText) { - diplomat_result_box_ICU4XLocale_ICU4XError locale_result = ICU4XLocale_create_from_string(localeText, strlen(localeText)); + diplomat_result_box_ICU4XLocale_ICU4XLocaleParseError locale_result = ICU4XLocale_create_from_string(localeText, strlen(localeText)); if (!locale_result.is_ok) { printf("Could not create locale from: %s", localeText); } @@ -42,8 +42,8 @@ int main() { char output[40]; diplomat_result_void_void void_option; - diplomat_result_box_ICU4XLocale_ICU4XError locale_result; - diplomat_result_void_ICU4XError void_result; + diplomat_result_box_ICU4XLocale_ICU4XLocaleParseError locale_result; + diplomat_result_void_ICU4XLocaleParseError void_result; // Test creating a locale. DiplomatWrite write = diplomat_simple_write(output, 40); diff --git a/tutorials/c/pluralrules.c b/tutorials/c/pluralrules.c index f8f98c31911..d76e31f1e65 100644 --- a/tutorials/c/pluralrules.c +++ b/tutorials/c/pluralrules.c @@ -9,13 +9,13 @@ int main() { ICU4XLogger_init_simple_logger(); - diplomat_result_box_ICU4XLocale_ICU4XError locale_result = ICU4XLocale_create_from_string("ar", 2); + diplomat_result_box_ICU4XLocale_ICU4XLocaleParseError locale_result = ICU4XLocale_create_from_string("ar", 2); if (!locale_result.is_ok) { return 1; } ICU4XLocale* locale = locale_result.ok; ICU4XDataProvider* provider = ICU4XDataProvider_create_compiled(); - diplomat_result_box_ICU4XPluralRules_ICU4XError plural_result = ICU4XPluralRules_create_cardinal(provider, locale); + diplomat_result_box_ICU4XPluralRules_ICU4XDataError plural_result = ICU4XPluralRules_create_cardinal(provider, locale); if (!plural_result.is_ok) { printf("Failed to create PluralRules\n"); return 1; @@ -30,7 +30,7 @@ int main() { printf("Plural Category many (should be true): %s\n", categories.many ? "true" : "false"); printf("Plural Category other (should be true): %s\n", categories.other ? "true" : "false"); - diplomat_result_box_ICU4XPluralOperands_ICU4XError op1_result = ICU4XPluralOperands_create_from_string("3", 1); + diplomat_result_box_ICU4XPluralOperands_ICU4XFixedDecimalParseError op1_result = ICU4XPluralOperands_create_from_string("3", 1); if (!op1_result.is_ok) { printf("Failed to create PluralOperands from string\n"); @@ -41,7 +41,7 @@ int main() { printf("Plural Category %d (should be %d)\n", (int)cat1, (int)ICU4XPluralCategory_Few); - diplomat_result_box_ICU4XPluralOperands_ICU4XError op2_result = ICU4XPluralOperands_create_from_string("1011.0", 6); + diplomat_result_box_ICU4XPluralOperands_ICU4XFixedDecimalParseError op2_result = ICU4XPluralOperands_create_from_string("1011.0", 6); if (!op2_result.is_ok) { printf("Failed to create PluralOperands from string\n");