From 0b8985f029bc2a60d8ab3562ba06f08eff6839ea Mon Sep 17 00:00:00 2001 From: Robert Bastian <4706271+robertbastian@users.noreply.github.com> Date: Fri, 14 Feb 2025 17:46:29 +0100 Subject: [PATCH] Time zone renames (#6123) --- CODEOWNERS | 2 +- Cargo.lock | 12 +- Cargo.toml | 8 +- components/datetime/Cargo.toml | 10 +- components/datetime/README.md | 12 +- components/datetime/benches/datetime.rs | 4 +- .../datetime/examples/timezone_picker.rs | 6 +- components/datetime/examples/work_log.rs | 2 +- components/datetime/src/combo.rs | 18 +- components/datetime/src/fieldsets.rs | 84 +++--- components/datetime/src/format/datetime.rs | 10 +- components/datetime/src/format/time_zone.rs | 79 +++--- components/datetime/src/input.rs | 25 +- components/datetime/src/lib.rs | 12 +- components/datetime/src/options/mod.rs | 2 +- components/datetime/src/parts.rs | 4 +- components/datetime/src/pattern/formatter.rs | 8 +- components/datetime/src/pattern/names.rs | 44 ++-- .../datetime/src/provider/pattern/mod.rs | 8 +- .../datetime/src/provider/time_zones.rs | 16 +- components/datetime/src/scaffold/calendar.rs | 5 +- .../datetime/src/scaffold/dynamic_impls.rs | 8 +- .../datetime/src/scaffold/fieldset_traits.rs | 50 ++-- components/datetime/src/scaffold/get_field.rs | 83 +++--- components/datetime/tests/datetime.rs | 7 +- components/datetime/tests/mock.rs | 15 +- .../datetime/tests/resolved_components.rs | 2 +- components/datetime/tests/simple_test.rs | 2 +- components/icu/Cargo.toml | 10 +- components/icu/examples/jiff.rs | 11 +- components/icu/examples/tui.rs | 4 +- components/icu/src/lib.rs | 2 +- components/{timezone => time}/Cargo.toml | 6 +- components/{timezone => time}/LICENSE | 0 components/time/README.md | 11 + components/{timezone => time}/src/error.rs | 0 components/{timezone => time}/src/ids.rs | 239 +++++++++--------- components/{timezone => time}/src/ixdtf.rs | 106 ++++---- components/time/src/lib.rs | 155 ++++++++++++ components/{timezone => time}/src/provider.rs | 37 ++- .../{timezone => time}/src/provider/names.rs | 10 +- .../src/provider/windows.rs | 6 +- .../src/scaffold/into_option.rs | 17 +- .../{timezone => time}/src/scaffold/mod.rs | 0 .../{timezone => time}/src/time_zone.rs | 61 +++-- components/{timezone => time}/src/types.rs | 47 ++-- .../{timezone => time}/src/windows_tz.rs | 20 +- .../{timezone => time}/src/zone_offset.rs | 36 +-- components/timezone/README.md | 90 ------- components/timezone/src/lib.rs | 132 ---------- ffi/capi/Cargo.toml | 12 +- ffi/capi/bindings/c/IanaParser.d.h | 19 ++ ffi/capi/bindings/c/IanaParser.h | 43 ++++ ffi/capi/bindings/c/IanaParserExtended.d.h | 19 ++ ffi/capi/bindings/c/IanaParserExtended.h | 38 +++ ffi/capi/bindings/c/Time.h | 4 +- ffi/capi/bindings/c/TimeZoneIdMapper.d.h | 19 -- ffi/capi/bindings/c/TimeZoneIdMapper.h | 43 ---- ...meZoneIdMapperWithFastCanonicalization.d.h | 19 -- ...TimeZoneIdMapperWithFastCanonicalization.h | 38 --- ffi/capi/bindings/c/TimeZoneInfo.h | 4 +- ffi/capi/bindings/cpp/icu4x/IanaParser.d.hpp | 59 +++++ ffi/capi/bindings/cpp/icu4x/IanaParser.hpp | 118 +++++++++ .../cpp/icu4x/IanaParserExtended.d.hpp | 55 ++++ .../bindings/cpp/icu4x/IanaParserExtended.hpp | 92 +++++++ ffi/capi/bindings/cpp/icu4x/Time.d.hpp | 4 +- ffi/capi/bindings/cpp/icu4x/Time.hpp | 12 +- .../bindings/cpp/icu4x/TimeZoneIdMapper.d.hpp | 59 ----- .../bindings/cpp/icu4x/TimeZoneIdMapper.hpp | 118 --------- ...ZoneIdMapperWithFastCanonicalization.d.hpp | 55 ---- ...meZoneIdMapperWithFastCanonicalization.hpp | 92 ------- .../bindings/cpp/icu4x/TimeZoneInfo.d.hpp | 6 +- ffi/capi/bindings/cpp/icu4x/TimeZoneInfo.hpp | 6 +- .../bindings/dart/CalendarParseError.g.dart | 2 +- ffi/capi/bindings/dart/DateTime.g.dart | 4 +- ...eZoneIdMapper.g.dart => IanaParser.g.dart} | 72 +++--- .../bindings/dart/IanaParserExtended.g.dart | 101 ++++++++ ffi/capi/bindings/dart/IsoDateTime.g.dart | 4 +- ffi/capi/bindings/dart/Time.g.dart | 32 +-- ...oneIdMapperWithFastCanonicalization.g.dart | 101 -------- ffi/capi/bindings/dart/TimeZoneInfo.g.dart | 76 +++--- .../dart/TimeZoneInvalidOffsetError.g.dart | 2 +- ffi/capi/bindings/dart/ZonedDateTime.g.dart | 2 +- .../bindings/dart/ZonedDateTimeParser.g.dart | 10 +- .../bindings/dart/ZonedIsoDateTime.g.dart | 2 +- ffi/capi/bindings/dart/lib.g.dart | 4 +- .../bindings/demo_gen/DateTimeFormatter.d.ts | 4 +- .../bindings/demo_gen/DateTimeFormatter.mjs | 8 +- .../demo_gen/DateTimeFormatterGregorian.d.ts | 2 +- .../demo_gen/DateTimeFormatterGregorian.mjs | 4 +- .../GregorianZonedDateTimeFormatter.d.ts | 2 +- .../GregorianZonedDateTimeFormatter.mjs | 4 +- ...{TimeZoneIdMapper.d.ts => IanaParser.d.ts} | 2 +- ffi/capi/bindings/demo_gen/IanaParser.mjs | 37 +++ ...alization.d.ts => IanaParserExtended.d.ts} | 2 +- .../bindings/demo_gen/IanaParserExtended.mjs | 19 ++ ffi/capi/bindings/demo_gen/TimeFormatter.d.ts | 2 +- ffi/capi/bindings/demo_gen/TimeFormatter.mjs | 4 +- .../bindings/demo_gen/TimeZoneIdMapper.mjs | 37 --- ...meZoneIdMapperWithFastCanonicalization.mjs | 19 -- .../demo_gen/ZonedDateTimeFormatter.d.ts | 4 +- .../demo_gen/ZonedDateTimeFormatter.mjs | 8 +- ffi/capi/bindings/demo_gen/index.mjs | 58 ++--- ffi/capi/bindings/js/CalendarParseError.d.ts | 2 +- ffi/capi/bindings/js/CalendarParseError.mjs | 2 +- ffi/capi/bindings/js/DateTime.d.ts | 2 +- ffi/capi/bindings/js/DateTime.mjs | 2 +- ...{TimeZoneIdMapper.d.ts => IanaParser.d.ts} | 6 +- .../{TimeZoneIdMapper.mjs => IanaParser.mjs} | 28 +- ...alization.d.ts => IanaParserExtended.d.ts} | 6 +- ...icalization.mjs => IanaParserExtended.mjs} | 24 +- ffi/capi/bindings/js/IsoDateTime.d.ts | 2 +- ffi/capi/bindings/js/IsoDateTime.mjs | 2 +- ffi/capi/bindings/js/Time.d.ts | 6 +- ffi/capi/bindings/js/Time.mjs | 12 +- ffi/capi/bindings/js/TimeZoneInfo.d.ts | 6 +- ffi/capi/bindings/js/TimeZoneInfo.mjs | 4 +- .../js/TimeZoneInvalidOffsetError.d.ts | 2 +- .../js/TimeZoneInvalidOffsetError.mjs | 2 +- ffi/capi/bindings/js/ZonedDateTime.d.ts | 2 +- ffi/capi/bindings/js/ZonedDateTime.mjs | 2 +- ffi/capi/bindings/js/ZonedDateTimeParser.d.ts | 2 +- ffi/capi/bindings/js/ZonedDateTimeParser.mjs | 2 +- ffi/capi/bindings/js/ZonedIsoDateTime.d.ts | 2 +- ffi/capi/bindings/js/ZonedIsoDateTime.mjs | 2 +- ffi/capi/bindings/js/index.d.ts | 4 +- ffi/capi/bindings/js/index.mjs | 4 +- ffi/capi/src/datetime.rs | 23 +- ffi/capi/src/errors.rs | 20 +- ffi/capi/src/neo_datetime.rs | 6 +- ffi/capi/src/time.rs | 42 +-- ffi/capi/src/timezone.rs | 167 ++++++------ ffi/capi/src/timezone_mapper.rs | 123 ++++----- ffi/capi/src/zoned_datetime.rs | 40 +-- ffi/capi/src/zoned_formatter.rs | 6 +- ffi/capi/tests/missing_apis.txt | 56 ++-- provider/data/{timezone => time}/Cargo.toml | 4 +- provider/data/{timezone => time}/LICENSE | 0 provider/data/{timezone => time}/README.md | 4 +- provider/data/{timezone => time}/build.rs | 0 .../time/data/bcp47_to_iana_map_v1.rs.data | 77 ++++++ .../time/data/iana_to_bcp47_map_v3.rs.data | 77 ++++++ provider/data/{timezone => time}/data/mod.rs | 0 .../windows_zones_to_bcp47_map_v1.rs.data | 75 ++++++ .../data/zone_offset_period_v1.rs.data | 20 +- .../data/{timezone => time}/fingerprints.csv | 0 provider/data/{timezone => time}/src/lib.rs | 2 +- .../stubdata/bcp47_to_iana_map_v1.rs.data | 77 ++++++ .../stubdata/iana_to_bcp47_map_v3.rs.data | 77 ++++++ .../data/{timezone => time}/stubdata/mod.rs | 0 .../windows_zones_to_bcp47_map_v1.rs.data | 75 ++++++ .../stubdata/zone_offset_period_v1.rs.data | 20 +- .../data/bcp47_to_iana_map_v1.rs.data | 77 ------ .../data/iana_to_bcp47_map_v3.rs.data | 77 ------ .../windows_zones_to_bcp47_map_v1.rs.data | 75 ------ .../stubdata/bcp47_to_iana_map_v1.rs.data | 77 ------ .../stubdata/iana_to_bcp47_map_v3.rs.data | 77 ------ .../windows_zones_to_bcp47_map_v1.rs.data | 75 ------ provider/registry/src/lib.rs | 8 +- .../{timezone => time}/Bcp47ToIanaMapV1.json | 0 .../Bcp47ToIanaMapV1_checksum | 0 .../{timezone => time}/IanaToBcp47MapV3.json | 0 .../IanaToBcp47MapV3_checksum | 0 .../WindowsZonesToBcp47MapV1.json | 0 .../ZoneOffsetPeriodV1.json | 0 .../src/cldr_serde/time_zones/bcp47_tzid.rs | 6 +- provider/source/src/time_zones/convert.rs | 44 ++-- provider/source/src/time_zones/mod.rs | 48 ++-- provider/source/src/time_zones/names.rs | 60 ++--- provider/source/src/time_zones/windows.rs | 38 +-- tools/graveyard/Cargo.lock | 7 + tools/make/bakeddata/src/main.rs | 2 +- tools/make/depcheck/src/allowlist.rs | 4 +- tools/make/diplomat-coverage/src/allowlist.rs | 25 +- tutorials/.cargo/config.toml | 4 +- tutorials/c-tiny/fixeddecimal/Cargo.lock | 4 +- tutorials/c-tiny/segmenter/Cargo.lock | 4 +- tutorials/c/Cargo.lock | 10 +- tutorials/cpp/Cargo.lock | 10 +- tutorials/cpp/datetime.cpp | 8 +- tutorials/intro_interactive.md | 2 +- tutorials/js-tiny/Cargo.lock | 10 +- tutorials/rust/baked/Cargo.lock | 10 +- tutorials/rust/buffer/Cargo.lock | 10 +- tutorials/rust/buffer/src/main.rs | 2 +- tutorials/rust/custom_compiled/Cargo.lock | 10 +- tutorials/rust/default/Cargo.lock | 10 +- tutorials/rust/experimental/Cargo.lock | 10 +- tutorials/rust/harfbuzz/Cargo.lock | 4 +- tutorials/rust/sync/Cargo.lock | 10 +- utils/env_preferences/README.md | 2 +- utils/env_preferences/src/lib.rs | 2 +- utils/tzif/src/data/posix.rs | 6 +- utils/tzif/src/parse/posix.rs | 34 +-- utils/tzif/src/parse/tzif.rs | 8 +- 195 files changed, 2508 insertions(+), 2581 deletions(-) rename components/{timezone => time}/Cargo.toml (91%) rename components/{timezone => time}/LICENSE (100%) create mode 100644 components/time/README.md rename components/{timezone => time}/src/error.rs (100%) rename components/{timezone => time}/src/ids.rs (78%) rename components/{timezone => time}/src/ixdtf.rs (89%) create mode 100644 components/time/src/lib.rs rename components/{timezone => time}/src/provider.rs (85%) rename components/{timezone => time}/src/provider/names.rs (92%) rename components/{timezone => time}/src/provider/windows.rs (91%) rename components/{timezone => time}/src/scaffold/into_option.rs (86%) rename components/{timezone => time}/src/scaffold/mod.rs (100%) rename components/{timezone => time}/src/time_zone.rs (79%) rename components/{timezone => time}/src/types.rs (93%) rename components/{timezone => time}/src/windows_tz.rs (88%) rename components/{timezone => time}/src/zone_offset.rs (83%) delete mode 100644 components/timezone/README.md delete mode 100644 components/timezone/src/lib.rs create mode 100644 ffi/capi/bindings/c/IanaParser.d.h create mode 100644 ffi/capi/bindings/c/IanaParser.h create mode 100644 ffi/capi/bindings/c/IanaParserExtended.d.h create mode 100644 ffi/capi/bindings/c/IanaParserExtended.h delete mode 100644 ffi/capi/bindings/c/TimeZoneIdMapper.d.h delete mode 100644 ffi/capi/bindings/c/TimeZoneIdMapper.h delete mode 100644 ffi/capi/bindings/c/TimeZoneIdMapperWithFastCanonicalization.d.h delete mode 100644 ffi/capi/bindings/c/TimeZoneIdMapperWithFastCanonicalization.h create mode 100644 ffi/capi/bindings/cpp/icu4x/IanaParser.d.hpp create mode 100644 ffi/capi/bindings/cpp/icu4x/IanaParser.hpp create mode 100644 ffi/capi/bindings/cpp/icu4x/IanaParserExtended.d.hpp create mode 100644 ffi/capi/bindings/cpp/icu4x/IanaParserExtended.hpp delete mode 100644 ffi/capi/bindings/cpp/icu4x/TimeZoneIdMapper.d.hpp delete mode 100644 ffi/capi/bindings/cpp/icu4x/TimeZoneIdMapper.hpp delete mode 100644 ffi/capi/bindings/cpp/icu4x/TimeZoneIdMapperWithFastCanonicalization.d.hpp delete mode 100644 ffi/capi/bindings/cpp/icu4x/TimeZoneIdMapperWithFastCanonicalization.hpp rename ffi/capi/bindings/dart/{TimeZoneIdMapper.g.dart => IanaParser.g.dart} (53%) create mode 100644 ffi/capi/bindings/dart/IanaParserExtended.g.dart delete mode 100644 ffi/capi/bindings/dart/TimeZoneIdMapperWithFastCanonicalization.g.dart rename ffi/capi/bindings/demo_gen/{TimeZoneIdMapper.d.ts => IanaParser.d.ts} (82%) create mode 100644 ffi/capi/bindings/demo_gen/IanaParser.mjs rename ffi/capi/bindings/demo_gen/{TimeZoneIdMapperWithFastCanonicalization.d.ts => IanaParserExtended.d.ts} (61%) create mode 100644 ffi/capi/bindings/demo_gen/IanaParserExtended.mjs delete mode 100644 ffi/capi/bindings/demo_gen/TimeZoneIdMapper.mjs delete mode 100644 ffi/capi/bindings/demo_gen/TimeZoneIdMapperWithFastCanonicalization.mjs rename ffi/capi/bindings/js/{TimeZoneIdMapper.d.ts => IanaParser.d.ts} (72%) rename ffi/capi/bindings/js/{TimeZoneIdMapper.mjs => IanaParser.mjs} (74%) rename ffi/capi/bindings/js/{TimeZoneIdMapperWithFastCanonicalization.d.ts => IanaParserExtended.d.ts} (62%) rename ffi/capi/bindings/js/{TimeZoneIdMapperWithFastCanonicalization.mjs => IanaParserExtended.mjs} (67%) rename provider/data/{timezone => time}/Cargo.toml (90%) rename provider/data/{timezone => time}/LICENSE (100%) rename provider/data/{timezone => time}/README.md (67%) rename provider/data/{timezone => time}/build.rs (100%) create mode 100644 provider/data/time/data/bcp47_to_iana_map_v1.rs.data create mode 100644 provider/data/time/data/iana_to_bcp47_map_v3.rs.data rename provider/data/{timezone => time}/data/mod.rs (100%) create mode 100644 provider/data/time/data/windows_zones_to_bcp47_map_v1.rs.data rename provider/data/{timezone => time}/data/zone_offset_period_v1.rs.data (96%) rename provider/data/{timezone => time}/fingerprints.csv (100%) rename provider/data/{timezone => time}/src/lib.rs (94%) create mode 100644 provider/data/time/stubdata/bcp47_to_iana_map_v1.rs.data create mode 100644 provider/data/time/stubdata/iana_to_bcp47_map_v3.rs.data rename provider/data/{timezone => time}/stubdata/mod.rs (100%) create mode 100644 provider/data/time/stubdata/windows_zones_to_bcp47_map_v1.rs.data rename provider/data/{timezone => time}/stubdata/zone_offset_period_v1.rs.data (96%) delete mode 100644 provider/data/timezone/data/bcp47_to_iana_map_v1.rs.data delete mode 100644 provider/data/timezone/data/iana_to_bcp47_map_v3.rs.data delete mode 100644 provider/data/timezone/data/windows_zones_to_bcp47_map_v1.rs.data delete mode 100644 provider/data/timezone/stubdata/bcp47_to_iana_map_v1.rs.data delete mode 100644 provider/data/timezone/stubdata/iana_to_bcp47_map_v3.rs.data delete mode 100644 provider/data/timezone/stubdata/windows_zones_to_bcp47_map_v1.rs.data rename provider/source/data/debug/{timezone => time}/Bcp47ToIanaMapV1.json (100%) rename provider/source/data/debug/{timezone => time}/Bcp47ToIanaMapV1_checksum (100%) rename provider/source/data/debug/{timezone => time}/IanaToBcp47MapV3.json (100%) rename provider/source/data/debug/{timezone => time}/IanaToBcp47MapV3_checksum (100%) rename provider/source/data/debug/{timezone => time}/WindowsZonesToBcp47MapV1.json (100%) rename provider/source/data/debug/{timezone => time}/ZoneOffsetPeriodV1.json (100%) create mode 100644 tools/graveyard/Cargo.lock diff --git a/CODEOWNERS b/CODEOWNERS index af9133044c3..27d533ddba8 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -24,7 +24,7 @@ components/locale_core/ @zbraniecki @nciric components/normalizer/ @hsivonen @echeran components/plurals/ @zbraniecki @sffc components/segmenter/ @aethanyc @makotokato @sffc -components/timezone/ @nekevss @robertbastian @sffc +components/time/ @nekevss @robertbastian @sffc tutorials/gn/ @sffc ffi/capi/ @Manishearth ffi/ecma402/ @filmil diff --git a/Cargo.lock b/Cargo.lock index 98ee49c57be..17456bdfbed 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -971,7 +971,7 @@ dependencies = [ "icu_provider_blob", "icu_provider_registry", "icu_segmenter", - "icu_timezone", + "icu_time", "jiff", "memchr", "writeable", @@ -1080,7 +1080,7 @@ dependencies = [ "icu_provider_blob", "icu_provider_fs", "icu_segmenter", - "icu_timezone", + "icu_time", "libc_alloc", "log", "potential_utf", @@ -1206,7 +1206,7 @@ dependencies = [ "icu_provider", "icu_provider_adapters", "icu_provider_blob", - "icu_timezone", + "icu_time", "litemap", "potential_utf", "serde", @@ -1709,7 +1709,7 @@ dependencies = [ ] [[package]] -name = "icu_timezone" +name = "icu_time" version = "2.0.0-beta1" dependencies = [ "calendrical_calculations", @@ -1718,7 +1718,7 @@ dependencies = [ "icu", "icu_calendar", "icu_provider", - "icu_timezone_data", + "icu_time_data", "ixdtf", "serde", "tinystr", @@ -1728,7 +1728,7 @@ dependencies = [ ] [[package]] -name = "icu_timezone_data" +name = "icu_time_data" version = "2.0.0-beta1" dependencies = [ "icu_provider_baked", diff --git a/Cargo.toml b/Cargo.toml index 4afc560a8b1..2fd7916c669 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ members = [ "components/plurals", "components/properties", "components/segmenter", - "components/timezone", + "components/time", # FFI "ffi/capi", @@ -59,7 +59,7 @@ members = [ "provider/data/plurals", "provider/data/properties", "provider/data/segmenter", - "provider/data/timezone", + "provider/data/time", # Utils "utils/bies", @@ -151,7 +151,7 @@ icu_normalizer = { version = "~2.0.0-beta1", path = "components/normalizer", def icu_plurals = { version = "~2.0.0-beta1", path = "components/plurals", default-features = false } icu_properties = { version = "~2.0.0-beta1", path = "components/properties", default-features = false } icu_segmenter = { version = "~2.0.0-beta1", path = "components/segmenter", default-features = false } -icu_timezone = { version = "~2.0.0-beta1", path = "components/timezone", default-features = false } +icu_time = { version = "~2.0.0-beta1", path = "components/time", default-features = false } # FFI icu_capi = { version = "~2.0.0-beta1", path = "ffi/capi", default-features = false } @@ -181,7 +181,7 @@ icu_normalizer_data = { version = "~2.0.0-beta1", path = "provider/data/normaliz icu_plurals_data = { version = "~2.0.0-beta1", path = "provider/data/plurals", default-features = false } icu_properties_data = { version = "~2.0.0-beta1", path = "provider/data/properties", default-features = false } icu_segmenter_data = { version = "~2.0.0-beta1", path = "provider/data/segmenter", default-features = false } -icu_timezone_data = { version = "~2.0.0-beta1", path = "provider/data/timezone", default-features = false } +icu_time_data = { version = "~2.0.0-beta1", path = "provider/data/time", default-features = false } icu_experimental_data = { version = "~0.2.0-dev", path = "provider/data/experimental", default-features = false } # Utils diff --git a/components/datetime/Cargo.toml b/components/datetime/Cargo.toml index 9a1d6e7e171..01dd2b6af27 100644 --- a/components/datetime/Cargo.toml +++ b/components/datetime/Cargo.toml @@ -29,7 +29,7 @@ icu_locale_core = { workspace = true } icu_pattern = { workspace = true, features = ["zerovec", "alloc"] } icu_plurals = { workspace = true } icu_provider = { workspace = true, features = ["macros"] } -icu_timezone = { workspace = true } +icu_time = { workspace = true } smallvec = { workspace = true } tinystr = { workspace = true, features = ["alloc", "zerovec"] } potential_utf = { workspace = true, features = ["alloc", "zerovec"] } @@ -50,7 +50,7 @@ icu_benchmark_macros = { path = "../../tools/benchmark/macros" } icu_calendar = { path = "../calendar", features = ["ixdtf"] } icu_provider_adapters = { path = "../../provider/adapters" } icu_provider_blob = { path = "../../provider/blob", features = ["alloc"] } -icu_timezone = { path = "../timezone", features = ["ixdtf"] } +icu_time = { path = "../time", features = ["ixdtf"] } litemap = { path = "../../utils/litemap" } serde = { workspace = true, features = ["derive"] } @@ -71,7 +71,7 @@ serde = [ "icu_plurals/serde", "icu_provider/alloc", "icu_provider/serde", - "icu_timezone/serde", + "icu_time/serde", "litemap?/serde", "smallvec/serde", "tinystr/serde", @@ -84,12 +84,12 @@ datagen = [ "icu_calendar/datagen", "icu_pattern/databake", "icu_plurals/datagen", - "icu_timezone/datagen", + "icu_time/datagen", "serde", ] logging = ["icu_calendar/logging"] experimental = ["dep:litemap"] -compiled_data = ["dep:icu_datetime_data", "icu_calendar/compiled_data", "icu_decimal/compiled_data", "icu_plurals/compiled_data", "icu_timezone/compiled_data"] +compiled_data = ["dep:icu_datetime_data", "icu_calendar/compiled_data", "icu_decimal/compiled_data", "icu_plurals/compiled_data", "icu_time/compiled_data"] [lib] bench = false # This option is required for Benchmark CI diff --git a/components/datetime/README.md b/components/datetime/README.md index 7c75b1b920a..d9fa7b2fc66 100644 --- a/components/datetime/README.md +++ b/components/datetime/README.md @@ -22,14 +22,14 @@ options, and calendar systems. Additional formatter types are available to devel resource-constrained environments. The formatters accept input types from the [`calendar`](icu_calendar) and -[`timezone`](icu_timezone) crates: +[`timezone`](icu_time) crates: 1. [`Date`](icu_calendar::Date) -2. [`DateTime`](icu_timezone::DateTime) -3. [`Time`](icu_timezone::Time) -4. [`UtcOffset`](icu_timezone::UtcOffset) -5. [`TimeZoneInfo`](icu_timezone::TimeZoneInfo) -6. [`ZonedDateTime`](icu_timezone::ZonedDateTime) +2. [`DateTime`](icu_time::DateTime) +3. [`Time`](icu_time::Time) +4. [`UtcOffset`](icu_time::zone::UtcOffset) +5. [`TimeZoneInfo`](icu_time::TimeZoneInfo) +6. [`ZonedDateTime`](icu_time::ZonedDateTime) Not all inputs are valid for all field sets. diff --git a/components/datetime/benches/datetime.rs b/components/datetime/benches/datetime.rs index c6c57ca03f5..a11e926aab2 100644 --- a/components/datetime/benches/datetime.rs +++ b/components/datetime/benches/datetime.rs @@ -9,7 +9,7 @@ use icu_datetime::FixedCalendarDateTimeFormatter; use icu_calendar::{Date, Gregorian}; use icu_locale_core::Locale; -use icu_timezone::{DateTime, Time, TimeZoneInfo, ZoneVariant, ZonedDateTime}; +use icu_time::{zone::TimeZoneVariant, DateTime, Time, TimeZoneInfo, ZonedDateTime}; use writeable::Writeable; #[path = "../tests/mock.rs"] @@ -41,7 +41,7 @@ fn datetime_benches(c: &mut Criterion) { Date::try_new_iso(2024, 1, 1).unwrap(), Time::midnight(), )) - .with_zone_variant(ZoneVariant::Standard), + .with_zone_variant(TimeZoneVariant::Standard), } } }) diff --git a/components/datetime/examples/timezone_picker.rs b/components/datetime/examples/timezone_picker.rs index 2910933ca10..2c05a4a1195 100644 --- a/components/datetime/examples/timezone_picker.rs +++ b/components/datetime/examples/timezone_picker.rs @@ -7,11 +7,11 @@ use std::collections::BTreeMap; use icu::calendar::Date; use icu::datetime::{fieldsets, TimeFormatter}; use icu::locale::locale; -use icu::timezone::Time; +use icu::time::Time; fn main() { - let mapper = icu::timezone::TimeZoneIdMapper::new(); - let offsets = icu::timezone::ZoneOffsetCalculator::new(); + let mapper = icu::time::zone::IanaParser::new(); + let offsets = icu::time::zone::UtcOffsetCalculator::new(); let prefs = locale!("en").into(); diff --git a/components/datetime/examples/work_log.rs b/components/datetime/examples/work_log.rs index 5b9765bd0e4..6e9f0672feb 100644 --- a/components/datetime/examples/work_log.rs +++ b/components/datetime/examples/work_log.rs @@ -12,7 +12,7 @@ use icu_benchmark_macros::println; use icu_calendar::Date; use icu_datetime::{fieldsets::YMDT, FixedCalendarDateTimeFormatter}; use icu_locale_core::locale; -use icu_timezone::{DateTime, Time}; +use icu_time::{DateTime, Time}; const DATES_ISO: &[(i32, u8, u8, u8, u8, u8)] = &[ (2001, 9, 8, 18, 46, 40), diff --git a/components/datetime/src/combo.rs b/components/datetime/src/combo.rs index 4ab6d16b00d..aecdfa10615 100644 --- a/components/datetime/src/combo.rs +++ b/components/datetime/src/combo.rs @@ -26,7 +26,7 @@ use crate::{provider::neo::*, scaffold::*}; /// use icu::datetime::DateTimeFormatter; /// use icu::locale::locale; /// use icu::datetime::input::ZonedDateTime; -/// use icu::timezone::TimeZoneIdMapper; +/// use icu::time::zone::IanaParser; /// use writeable::assert_writeable_eq; /// /// // Note: Combo type can be elided, but it is shown here for demonstration @@ -39,7 +39,7 @@ use crate::{provider::neo::*, scaffold::*}; /// let zdt = ZonedDateTime::try_location_only_from_str( /// "2024-10-18T15:44[America/Los_Angeles]", /// formatter.calendar(), -/// TimeZoneIdMapper::new(), +/// IanaParser::new(), /// ) /// .unwrap(); /// @@ -57,7 +57,7 @@ use crate::{provider::neo::*, scaffold::*}; /// use icu::datetime::FixedCalendarDateTimeFormatter; /// use icu::locale::locale; /// use icu::datetime::input::ZonedDateTime; -/// use icu::timezone::TimeZoneIdMapper; +/// use icu::time::zone::IanaParser; /// use writeable::assert_writeable_eq; /// /// // Note: Combo type can be elided, but it is shown here for demonstration @@ -67,7 +67,7 @@ use crate::{provider::neo::*, scaffold::*}; /// ) /// .unwrap(); /// -/// let zdt = ZonedDateTime::try_location_only_from_str("2024-10-18T15:44[America/Los_Angeles]", Gregorian, TimeZoneIdMapper::new()) +/// let zdt = ZonedDateTime::try_location_only_from_str("2024-10-18T15:44[America/Los_Angeles]", Gregorian, IanaParser::new()) /// .unwrap(); /// /// assert_writeable_eq!( @@ -84,7 +84,7 @@ use crate::{provider::neo::*, scaffold::*}; /// use icu::datetime::DateTimeFormatter; /// use icu::locale::locale; /// use icu::datetime::input::ZonedDateTime; -/// use icu::timezone::TimeZoneIdMapper; +/// use icu::time::zone::IanaParser; /// use writeable::assert_writeable_eq; /// /// // Note: Combo type can be elided, but it is shown here for demonstration @@ -97,7 +97,7 @@ use crate::{provider::neo::*, scaffold::*}; /// let zdt = ZonedDateTime::try_location_only_from_str( /// "2024-10-18T15:44[America/Los_Angeles]", /// formatter.calendar(), -/// TimeZoneIdMapper::new(), +/// IanaParser::new(), /// ) /// .unwrap(); /// @@ -115,7 +115,7 @@ use crate::{provider::neo::*, scaffold::*}; /// use icu::datetime::FixedCalendarDateTimeFormatter; /// use icu::locale::locale; /// use icu::datetime::input::ZonedDateTime; -/// use icu::timezone::{ZoneOffsetCalculator, TimeZoneIdMapper}; +/// use icu::time::zone::{UtcOffsetCalculator, IanaParser}; /// use writeable::assert_writeable_eq; /// /// let formatter = FixedCalendarDateTimeFormatter::try_new( @@ -127,8 +127,8 @@ use crate::{provider::neo::*, scaffold::*}; /// let zdt = ZonedDateTime::try_from_str( /// "2024-10-18T15:44-0700[America/Los_Angeles]", /// Gregorian, -/// TimeZoneIdMapper::new(), -/// &ZoneOffsetCalculator::new(), +/// IanaParser::new(), +/// &UtcOffsetCalculator::new(), /// ) /// .unwrap(); /// diff --git a/components/datetime/src/fieldsets.rs b/components/datetime/src/fieldsets.rs index ba8d200b981..566104afafc 100644 --- a/components/datetime/src/fieldsets.rs +++ b/components/datetime/src/fieldsets.rs @@ -68,13 +68,13 @@ use icu_calendar::{ Date, Iso, }; use icu_provider::marker::NeverMarker; -use icu_timezone::{ - types::{IsoHour, IsoMinute, IsoSecond, NanoSecond}, - Time, TimeZoneBcp47Id, UtcOffset, ZoneVariant, +use icu_time::{ + zone::{TimeZoneVariant, UtcOffset}, + Hour, Minute, Nanosecond, Second, Time, TimeZone, }; #[cfg(doc)] -use icu_timezone::TimeZoneInfo; +use icu_time::TimeZoneInfo; /// Maps the token `yes` to the given ident macro_rules! yes_to { @@ -601,7 +601,7 @@ macro_rules! impl_date_marker { type HourInput = datetime_marker_helper!(@input/hour, yes); type MinuteInput = datetime_marker_helper!(@input/minute, yes); type SecondInput = datetime_marker_helper!(@input/second, yes); - type NanoSecondInput = datetime_marker_helper!(@input/nanosecond, yes); + type NanosecondInput = datetime_marker_helper!(@input/Nanosecond, yes); } impl DateTimeMarkers for $type_time { type D = Self; @@ -689,7 +689,7 @@ macro_rules! impl_time_marker { // Whether the input should contain seconds. $(input_second = $second_yes:ident,)? // Whether the input should contain fractional seconds. - $(input_nanosecond = $nanosecond_yes:ident,)? + $(input_subsecond = $Nanosecond_yes:ident,)? ) => { impl_marker_with_options!( #[doc = concat!("**“", $sample, "**” ⇒ ", $description)] @@ -750,7 +750,7 @@ macro_rules! impl_time_marker { type HourInput = datetime_marker_helper!(@input/hour, $($hour_yes)?); type MinuteInput = datetime_marker_helper!(@input/minute, $($minute_yes)?); type SecondInput = datetime_marker_helper!(@input/second, $($second_yes)?); - type NanoSecondInput = datetime_marker_helper!(@input/nanosecond, $($nanosecond_yes)?); + type NanosecondInput = datetime_marker_helper!(@input/Nanosecond, $($Nanosecond_yes)?); } impl DateTimeMarkers for $type { type D = (); @@ -799,9 +799,9 @@ macro_rules! impl_zone_marker { $(zone_specific_short = $zone_specific_short_yes:ident,)? // Whether metazone periods are needed $(metazone_periods = $metazone_periods_yes:ident,)? - // Whether to require the TimeZoneBcp47Id + // Whether to require the TimeZone $(input_tzid = $tzid_input_yes:ident,)? - // Whether to require the ZoneVariant + // Whether to require the TimeZoneVariant $(input_variant = $variant_input_yes:ident,)? // Whether to require the Local Time $(input_localtime = $localtime_input_yes:ident,)? @@ -812,9 +812,9 @@ macro_rules! impl_zone_marker { /// /// ``` /// use icu::calendar::Date; - /// use icu::datetime::input::{Time, TimeZoneBcp47Id, TimeZoneInfo, UtcOffset}; + /// use icu::datetime::input::{Time, TimeZone, TimeZoneInfo, UtcOffset}; /// use icu::datetime::TimeFormatter; - /// use icu::timezone::ZoneVariant; + /// use icu::time::zone::TimeZoneVariant; #[doc = concat!("use icu::datetime::fieldsets::zone::", stringify!($type), ";")] /// use icu::locale::locale; /// use tinystr::tinystr; @@ -827,10 +827,10 @@ macro_rules! impl_zone_marker { /// .unwrap(); /// /// // Time zone info for America/Chicago in the summer - /// let zone = TimeZoneBcp47Id(tinystr!(8, "uschi")) + /// let zone = TimeZone(tinystr!(8, "uschi")) /// .with_offset("-05".parse().ok()) /// .at_time((Date::try_new_iso(2022, 8, 29).unwrap(), Time::midnight())) - /// .with_zone_variant(ZoneVariant::Daylight); + /// .with_zone_variant(TimeZoneVariant::Daylight); /// /// assert_writeable_eq!( /// fmt.format(&zone), @@ -1125,7 +1125,7 @@ impl_time_marker!( input_hour = yes, input_minute = yes, input_second = yes, - input_nanosecond = yes, + input_subsecond = yes, ); /// Time zone field sets @@ -1137,20 +1137,20 @@ pub mod zone { /// /// ``` /// use icu::calendar::Date; - /// use icu::datetime::input::{Time, TimeZoneBcp47Id, TimeZoneInfo, UtcOffset}; + /// use icu::datetime::input::{Time, TimeZone, TimeZoneInfo, UtcOffset}; /// use icu::calendar::Gregorian; /// use icu::datetime::FixedCalendarDateTimeFormatter; /// use icu::datetime::fieldsets::zone::{SpecificLong, SpecificShort}; /// use icu::locale::locale; - /// use icu::timezone::ZoneVariant; + /// use icu::time::zone::TimeZoneVariant; /// use tinystr::tinystr; /// use writeable::assert_writeable_eq; /// /// // Time zone info for Europe/Istanbul in the winter - /// let zone = TimeZoneBcp47Id(tinystr!(8, "trist")) + /// let zone = TimeZone(tinystr!(8, "trist")) /// .with_offset("+02".parse().ok()) /// .at_time((Date::try_new_iso(2022, 1, 29).unwrap(), Time::midnight())) - /// .with_zone_variant(ZoneVariant::Standard); + /// .with_zone_variant(TimeZoneVariant::Standard); /// /// let fmt = FixedCalendarDateTimeFormatter::::try_new( /// locale!("en").into(), @@ -1175,7 +1175,7 @@ pub mod zone { /// ); /// ``` /// - /// This style requires a [`ZoneVariant`], so + /// This style requires a [`TimeZoneVariant`], so /// only a full time zone info can be formatted with this style. /// For example, [`TimeZoneInfo`] cannot be formatted. /// @@ -1184,13 +1184,13 @@ pub mod zone { /// use icu::datetime::FixedCalendarDateTimeFormatter; /// use icu::datetime::fieldsets::zone::SpecificLong; /// use icu::locale::locale; - /// use icu::datetime::input::{DateTime, Time, TimeZoneBcp47Id, UtcOffset}; - /// use icu::timezone::ZoneVariant; + /// use icu::datetime::input::{DateTime, Time, TimeZone, UtcOffset}; + /// use icu::time::zone::TimeZoneVariant; /// use tinystr::tinystr; /// use writeable::assert_writeable_eq; /// /// let datetime = DateTime { date: Date::try_new_gregorian(2024, 10, 18).unwrap(), time: Time::midnight() }; - /// let time_zone_basic = TimeZoneBcp47Id(tinystr!(8, "uschi")).with_offset("-06".parse().ok()); + /// let time_zone_basic = TimeZone(tinystr!(8, "uschi")).with_offset("-06".parse().ok()); /// let time_zone_at_time = time_zone_basic.at_time((datetime.date.to_iso(), datetime.time)); /// /// let formatter = FixedCalendarDateTimeFormatter::try_new( @@ -1199,7 +1199,7 @@ pub mod zone { /// ) /// .unwrap(); /// - /// // error[E0271]: type mismatch resolving `::ZoneVariant == ZoneVariant` + /// // error[E0271]: type mismatch resolving `::TimeZoneVariant == TimeZoneVariant` /// formatter.format(&time_zone_at_time); /// ``` SpecificLong, @@ -1217,7 +1217,7 @@ pub mod zone { ); impl_zone_marker!( - /// This style requires a [`ZoneVariant`], so + /// This style requires a [`TimeZoneVariant`], so /// only a full time zone info can be formatted with this style. /// For example, [`TimeZoneInfo`] cannot be formatted. /// @@ -1226,13 +1226,13 @@ pub mod zone { /// use icu::datetime::FixedCalendarDateTimeFormatter; /// use icu::datetime::fieldsets::{T, zone::SpecificShort}; /// use icu::locale::locale; - /// use icu::datetime::input::{DateTime, Time, TimeZoneBcp47Id, UtcOffset}; - /// use icu::timezone::ZoneVariant; + /// use icu::datetime::input::{DateTime, Time, TimeZone, UtcOffset}; + /// use icu::time::zone::TimeZoneVariant; /// use tinystr::tinystr; /// use writeable::assert_writeable_eq; /// /// let datetime = DateTime { Date::try_new_gregorian(2024, 10, 18).unwrap(), time: Time::midnight() }; - /// let time_zone_basic = TimeZoneBcp47Id(tinystr!(8, "uschi")).with_offset("-06".parse().ok()); + /// let time_zone_basic = TimeZone(tinystr!(8, "uschi")).with_offset("-06".parse().ok()); /// let time_zone_at_time = time_zone_basic.at_time((datetime.date.to_iso(), datetime.time)); /// /// let formatter = FixedCalendarDateTimeFormatter::try_new( @@ -1241,7 +1241,7 @@ pub mod zone { /// ) /// .unwrap(); /// - /// // error[E0271]: type mismatch resolving `::ZoneVariant == ZoneVariant` + /// // error[E0271]: type mismatch resolving `::TimeZoneVariant == TimeZoneVariant` /// // note: required by a bound in `FixedCalendarDateTimeFormatter::::format` /// formatter.format(&time_zone_at_time); /// ``` @@ -1265,20 +1265,20 @@ pub mod zone { /// use icu::calendar::Date; /// use icu::datetime::TimeFormatter; /// use icu::datetime::fieldsets::zone::LocalizedOffsetLong; - /// use icu::datetime::input::{Time, TimeZoneBcp47Id, UtcOffset}; - /// use icu::timezone::ZoneVariant; + /// use icu::datetime::input::{Time, TimeZone, UtcOffset}; + /// use icu::time::zone::TimeZoneVariant; /// use tinystr::tinystr; /// use icu::locale::locale; /// use writeable::assert_writeable_eq; /// /// let utc_offset = "-06".parse().unwrap(); - /// let time_zone_basic = TimeZoneBcp47Id(tinystr!(8, "uschi")).with_offset(Some(utc_offset)); + /// let time_zone_basic = TimeZone(tinystr!(8, "uschi")).with_offset(Some(utc_offset)); /// /// let date = Date::try_new_iso(2024, 10, 18).unwrap(); /// let time = Time::midnight(); /// let time_zone_at_time = time_zone_basic.at_time((date, time)); /// - /// let time_zone_full = time_zone_at_time.with_zone_variant(ZoneVariant::Standard); + /// let time_zone_full = time_zone_at_time.with_zone_variant(TimeZoneVariant::Standard); /// /// let formatter = TimeFormatter::try_new( /// locale!("en-US").into(), @@ -1330,7 +1330,7 @@ pub mod zone { /// /// ``` /// use icu::calendar::Date; - /// use icu::datetime::input::{Time, TimeZoneBcp47Id}; + /// use icu::datetime::input::{Time, TimeZone}; /// use icu::calendar::Gregorian; /// use icu::datetime::FixedCalendarDateTimeFormatter; /// use icu::datetime::fieldsets::zone::GenericShort; @@ -1339,7 +1339,7 @@ pub mod zone { /// use writeable::assert_writeable_eq; /// /// // Time zone info for Europe/Istanbul - /// let zone = TimeZoneBcp47Id(tinystr!(8, "trist")) + /// let zone = TimeZone(tinystr!(8, "trist")) /// .without_offset() /// .at_time((Date::try_new_iso(2022, 1, 29).unwrap(), Time::midnight())); /// @@ -1364,7 +1364,7 @@ pub mod zone { /// use icu::datetime::fieldsets::zone::GenericShort; /// use icu::datetime::DateTimeWriteError; /// use icu::locale::locale; - /// use icu::timezone::TimeZoneIdMapper; + /// use icu::time::zone::IanaParser; /// use tinystr::tinystr; /// use writeable::assert_writeable_eq; /// @@ -1376,7 +1376,7 @@ pub mod zone { /// .unwrap(); /// /// // "uschi" - has symbol data for short generic non-location - /// let time_zone = TimeZoneIdMapper::new() + /// let time_zone = IanaParser::new() /// .iana_to_bcp47("America/Chicago") /// .with_offset("-05".parse().ok()) /// .at_time((Date::try_new_iso(2022, 8, 29).unwrap(), Time::midnight())); @@ -1386,7 +1386,7 @@ pub mod zone { /// ); /// /// // "ushnl" - has time zone override symbol data for short generic non-location - /// let time_zone = TimeZoneIdMapper::new() + /// let time_zone = IanaParser::new() /// .iana_to_bcp47("Pacific/Honolulu") /// .with_offset("-10".parse().ok()) /// .at_time((Date::try_new_iso(2022, 8, 29).unwrap(), Time::midnight())); @@ -1396,7 +1396,7 @@ pub mod zone { /// ); /// /// // Mis-spelling of "America/Chicago" results in a fallback to offset format - /// let time_zone = TimeZoneIdMapper::new() + /// let time_zone = IanaParser::new() /// .iana_to_bcp47("America/Chigagou") /// .with_offset("-05".parse().ok()) /// .at_time((Date::try_new_iso(2022, 8, 29).unwrap(), Time::midnight())); @@ -1412,12 +1412,12 @@ pub mod zone { /// ```compile_fail,E0271 /// use icu::datetime::TimeFormatter; /// use icu::datetime::fieldsets::zone::GenericLong; - /// use icu::datetime::input::TimeZoneBcp47Id; + /// use icu::datetime::input::TimeZone; /// use tinystr::tinystr; /// use icu::locale::locale; /// use writeable::assert_writeable_eq; /// - /// let time_zone_basic = TimeZoneBcp47Id(tinystr!(8, "uschi")).without_offset(); + /// let time_zone_basic = TimeZone(tinystr!(8, "uschi")).without_offset(); /// /// let formatter = TimeFormatter::try_new( /// locale!("en-US").into(), @@ -1453,12 +1453,12 @@ pub mod zone { /// ```compile_fail,E0271 /// use icu::datetime::FixedCalendarDateTimeFormatter; /// use icu::datetime::fieldsets::zone::GenericShort; - /// use icu::datetime::input::TimeZoneBcp47Id; + /// use icu::datetime::input::TimeZone; /// use tinystr::tinystr; /// use icu::locale::locale; /// use writeable::assert_writeable_eq; /// - /// let time_zone_basic = TimeZoneBcp47Id(tinystr!(8, "uschi")).with_offset("-06".parse().ok()); + /// let time_zone_basic = TimeZone(tinystr!(8, "uschi")).with_offset("-06".parse().ok()); /// /// let formatter = FixedCalendarDateTimeFormatter::try_new( /// locale!("en-US").into(), diff --git a/components/datetime/src/format/datetime.rs b/components/datetime/src/format/datetime.rs index ac68c339cb9..af0ffb9be80 100644 --- a/components/datetime/src/format/datetime.rs +++ b/components/datetime/src/format/datetime.rs @@ -361,23 +361,23 @@ where input!(_, hour = input.hour); input!(_, minute = input.minute); input!(_, second = input.second); - input!(_, nanosecond = input.nanosecond); + input!(_, subsecond = input.subsecond); let milliseconds = (((hour.number() as u32 * 60) + minute.number() as u32) * 60 + second.number() as u32) * 1000 - + nanosecond.number() / 1_000_000; + + subsecond.number() / 1_000_000; try_write_number_without_part(w, fdf, milliseconds.into(), l)? } (FieldSymbol::DecimalSecond(decimal_second), l) => { const PART: Part = parts::SECOND; input!(PART, second = input.second); - input!(PART, nanosecond = input.nanosecond); + input!(PART, subsecond = input.subsecond); // Formatting with fractional seconds let mut s = SignedFixedDecimal::from(second.number()); let _infallible = s.concatenate_end( - SignedFixedDecimal::from(nanosecond.number()) + SignedFixedDecimal::from(subsecond.number()) .absolute .multiplied_pow10(-9), ); @@ -398,7 +398,7 @@ where pattern_metadata.time_granularity().is_top_of_hour( input.minute.unwrap_or_default().number(), input.second.unwrap_or_default().number(), - input.nanosecond.unwrap_or_default().number(), + input.subsecond.unwrap_or_default().number(), ), ) { Err(e) => { diff --git a/components/datetime/src/format/time_zone.rs b/components/datetime/src/format/time_zone.rs index f6b0f0631a9..479cd108b6c 100644 --- a/components/datetime/src/format/time_zone.rs +++ b/components/datetime/src/format/time_zone.rs @@ -11,14 +11,17 @@ use core::fmt; use fixed_decimal::SignedFixedDecimal; use icu_calendar::{Date, Iso}; use icu_decimal::DecimalFormatter; -use icu_timezone::provider::EPOCH; -use icu_timezone::{Time, TimeZoneBcp47Id, UtcOffset, ZoneVariant}; +use icu_time::provider::EPOCH; +use icu_time::{ + zone::{TimeZoneVariant, UtcOffset}, + Time, TimeZone, +}; use writeable::Writeable; impl crate::provider::time_zones::MetazonePeriod<'_> { fn resolve( &self, - time_zone_id: TimeZoneBcp47Id, + time_zone_id: TimeZone, (date, time): (Date, Time), ) -> Option { let cursor = self.list.get0(&time_zone_id)?; @@ -371,9 +374,9 @@ impl FormatTimeZone for SpecificLocationFormat { }; match zone_variant { - ZoneVariant::Standard => &locations.pattern_standard, - ZoneVariant::Daylight => &locations.pattern_daylight, - // Compiles out due to tilde dependency on `icu_timezone` + TimeZoneVariant::Standard => &locations.pattern_standard, + TimeZoneVariant::Daylight => &locations.pattern_daylight, + // Compiles out due to tilde dependency on `icu_time` _ => unreachable!(), } .interpolate([location]) @@ -419,8 +422,8 @@ impl FormatTimeZone for ExemplarCityFormat { .or_else(|| exemplars_root.exemplars.get(&time_zone_id)) .or_else(|| locations.locations.get(&time_zone_id)) .or_else(|| locations_root.locations.get(&time_zone_id)) - .or_else(|| exemplars.exemplars.get(&TimeZoneBcp47Id::unknown())) - .or_else(|| exemplars_root.exemplars.get(&TimeZoneBcp47Id::unknown())) + .or_else(|| exemplars.exemplars.get(&TimeZone::unknown())) + .or_else(|| exemplars_root.exemplars.get(&TimeZone::unknown())) else { return Ok(Err(FormatTimeZoneError::Fallback)); }; @@ -492,7 +495,7 @@ impl FormatTimeZone for GenericPartialLocationFormat { /// Whether the minutes field should be optional or required in ISO-8601 format. #[derive(Debug, Clone, Copy, PartialEq)] -enum IsoMinutes { +enum Minutes { /// Minutes are always displayed. Required, @@ -502,7 +505,7 @@ enum IsoMinutes { /// Whether the seconds field should be optional or excluded in ISO-8601 format. #[derive(Debug, Clone, Copy, PartialEq)] -enum IsoSeconds { +enum Seconds { /// Seconds are displayed only if they are non-zero. Optional, @@ -516,8 +519,8 @@ pub(crate) struct Iso8601Format { extended: bool, // 00:00 vs Z z: bool, - minutes: IsoMinutes, - seconds: IsoSeconds, + minutes: Minutes, + seconds: Seconds, } impl Iso8601Format { @@ -526,32 +529,32 @@ impl Iso8601Format { FieldLength::One => Self { extended: false, z: true, - minutes: IsoMinutes::Optional, - seconds: IsoSeconds::Never, + minutes: Minutes::Optional, + seconds: Seconds::Never, }, FieldLength::Two => Self { extended: false, z: true, - minutes: IsoMinutes::Required, - seconds: IsoSeconds::Never, + minutes: Minutes::Required, + seconds: Seconds::Never, }, FieldLength::Three => Self { extended: true, z: true, - minutes: IsoMinutes::Required, - seconds: IsoSeconds::Never, + minutes: Minutes::Required, + seconds: Seconds::Never, }, FieldLength::Four => Self { extended: false, z: true, - minutes: IsoMinutes::Required, - seconds: IsoSeconds::Optional, + minutes: Minutes::Required, + seconds: Seconds::Optional, }, _ => Self { extended: true, z: true, - minutes: IsoMinutes::Required, - seconds: IsoSeconds::Optional, + minutes: Minutes::Required, + seconds: Seconds::Optional, }, } } @@ -561,32 +564,32 @@ impl Iso8601Format { FieldLength::One => Self { extended: false, z: false, - minutes: IsoMinutes::Optional, - seconds: IsoSeconds::Never, + minutes: Minutes::Optional, + seconds: Seconds::Never, }, FieldLength::Two => Self { extended: false, z: false, - minutes: IsoMinutes::Required, - seconds: IsoSeconds::Never, + minutes: Minutes::Required, + seconds: Seconds::Never, }, FieldLength::Three => Self { extended: true, z: false, - minutes: IsoMinutes::Required, - seconds: IsoSeconds::Never, + minutes: Minutes::Required, + seconds: Seconds::Never, }, FieldLength::Four => Self { extended: false, z: false, - minutes: IsoMinutes::Required, - seconds: IsoSeconds::Optional, + minutes: Minutes::Required, + seconds: Seconds::Optional, }, _ => Self { extended: true, z: false, - minutes: IsoMinutes::Required, - seconds: IsoSeconds::Optional, + minutes: Minutes::Required, + seconds: Seconds::Optional, }, } } @@ -602,8 +605,8 @@ impl FormatTimeZone for Iso8601Format { /// - Basic e.g. +0800 /// - Extended e.g. +08:00 /// - /// [`IsoMinutes`] can be required or optional. - /// [`IsoSeconds`] can be optional or never. + /// [`Minutes`] can be required or optional. + /// [`Seconds`] can be optional or never. fn format( &self, sink: &mut W, @@ -638,8 +641,8 @@ impl Iso8601Format { } .write_to(sink)?; - if self.minutes == IsoMinutes::Required - || (self.minutes == IsoMinutes::Optional && offset.minutes_part() != 0) + if self.minutes == Minutes::Required + || (self.minutes == Minutes::Optional && offset.minutes_part() != 0) { if self.extended { sink.write_char(':')?; @@ -652,7 +655,7 @@ impl Iso8601Format { .write_to(sink)?; } - if self.seconds == IsoSeconds::Optional && offset.seconds_part() != 0 { + if self.seconds == Seconds::Optional && offset.seconds_part() != 0 { if self.extended { sink.write_char(':')?; } @@ -681,7 +684,7 @@ impl FormatTimeZone for Bcp47IdFormat { ) -> Result, fmt::Error> { let time_zone_id = input .time_zone_id - .unwrap_or(TimeZoneBcp47Id(tinystr::tinystr!(8, "unk"))); + .unwrap_or(TimeZone(tinystr::tinystr!(8, "unk"))); sink.write_str(&time_zone_id)?; diff --git a/components/datetime/src/input.rs b/components/datetime/src/input.rs index 504139cb8c0..f74d009beaf 100644 --- a/components/datetime/src/input.rs +++ b/components/datetime/src/input.rs @@ -8,14 +8,11 @@ use crate::scaffold::{DateInputMarkers, GetField, TimeMarkers, ZoneMarkers}; use icu_calendar::types::DayOfYearInfo; use icu_calendar::Iso; -use icu_timezone::scaffold::IntoOption; -use icu_timezone::{ - types::{IsoHour, IsoMinute, IsoSecond, NanoSecond}, - ZoneVariant, -}; +use icu_time::scaffold::IntoOption; +use icu_time::{zone::TimeZoneVariant, Hour, Minute, Nanosecond, Second}; pub use icu_calendar::Date; -pub use icu_timezone::{DateTime, Time, TimeZoneBcp47Id, TimeZoneInfo, UtcOffset, ZonedDateTime}; +pub use icu_time::{zone::UtcOffset, DateTime, Time, TimeZone, TimeZoneInfo, ZonedDateTime}; // TODO(#2630) fix up imports to directly import from icu_calendar pub(crate) use icu_calendar::types::{DayOfMonth, IsoWeekday, MonthInfo, YearInfo}; @@ -27,13 +24,13 @@ pub(crate) struct ExtractedInput { pub(crate) day_of_month: Option, pub(crate) iso_weekday: Option, pub(crate) day_of_year: Option, - pub(crate) hour: Option, - pub(crate) minute: Option, - pub(crate) second: Option, - pub(crate) nanosecond: Option, - pub(crate) time_zone_id: Option, + pub(crate) hour: Option, + pub(crate) minute: Option, + pub(crate) second: Option, + pub(crate) subsecond: Option, + pub(crate) time_zone_id: Option, pub(crate) offset: Option, - pub(crate) zone_variant: Option, + pub(crate) zone_variant: Option, pub(crate) local_time: Option<(Date, Time)>, } @@ -53,7 +50,7 @@ impl ExtractedInput { + GetField + GetField + GetField - + GetField + + GetField + GetField + GetField + GetField @@ -68,7 +65,7 @@ impl ExtractedInput { hour: GetField::::get_field(input).into_option(), minute: GetField::::get_field(input).into_option(), second: GetField::::get_field(input).into_option(), - nanosecond: GetField::::get_field(input).into_option(), + subsecond: GetField::::get_field(input).into_option(), time_zone_id: GetField::::get_field(input).into_option(), offset: GetField::::get_field(input).into_option(), zone_variant: GetField::::get_field(input).into_option(), diff --git a/components/datetime/src/lib.rs b/components/datetime/src/lib.rs index 87d1bac477e..8da2f57230e 100644 --- a/components/datetime/src/lib.rs +++ b/components/datetime/src/lib.rs @@ -22,14 +22,14 @@ //! resource-constrained environments. //! //! The formatters accept input types from the [`calendar`](icu_calendar) and -//! [`timezone`](icu_timezone) crates: +//! [`timezone`](icu_time) crates: //! //! 1. [`Date`](icu_calendar::Date) -//! 2. [`DateTime`](icu_timezone::DateTime) -//! 3. [`Time`](icu_timezone::Time) -//! 4. [`UtcOffset`](icu_timezone::UtcOffset) -//! 5. [`TimeZoneInfo`](icu_timezone::TimeZoneInfo) -//! 6. [`ZonedDateTime`](icu_timezone::ZonedDateTime) +//! 2. [`DateTime`](icu_time::DateTime) +//! 3. [`Time`](icu_time::Time) +//! 4. [`UtcOffset`](icu_time::zone::UtcOffset) +//! 5. [`TimeZoneInfo`](icu_time::TimeZoneInfo) +//! 6. [`ZonedDateTime`](icu_time::ZonedDateTime) //! //! Not all inputs are valid for all field sets. //! diff --git a/components/datetime/src/options/mod.rs b/components/datetime/src/options/mod.rs index f095a23e380..cb73a447279 100644 --- a/components/datetime/src/options/mod.rs +++ b/components/datetime/src/options/mod.rs @@ -4,7 +4,7 @@ //! Options types for date/time formatting. -use icu_timezone::scaffold::IntoOption; +use icu_time::scaffold::IntoOption; /// The length of a formatted date/time string. /// diff --git a/components/datetime/src/parts.rs b/components/datetime/src/parts.rs index 65dfad21e4f..9b999515670 100644 --- a/components/datetime/src/parts.rs +++ b/components/datetime/src/parts.rs @@ -17,7 +17,7 @@ //! use icu::decimal::parts as decimal_parts; //! use icu::locale::locale; //! use icu::datetime::input::{ZonedDateTime, Time}; -//! use icu::timezone::{TimeZoneIdMapper, ZoneOffsetCalculator}; +//! use icu::time::zone::{IanaParser, UtcOffsetCalculator}; //! use writeable::assert_writeable_parts_eq; //! //! let dtf = DateTimeFormatter::try_new( @@ -26,7 +26,7 @@ //! ) //! .unwrap(); //! -//! let dtz = ZonedDateTime::try_from_str("2023-11-20T11:35:03.5+00:00[Europe/London]", dtf.calendar(), TimeZoneIdMapper::new(), &ZoneOffsetCalculator::new()).unwrap(); +//! let dtz = ZonedDateTime::try_from_str("2023-11-20T11:35:03.5+00:00[Europe/London]", dtf.calendar(), IanaParser::new(), &UtcOffsetCalculator::new()).unwrap(); //! //! // Missing data is filled in on a best-effort basis, and an error is signaled. //! assert_writeable_parts_eq!( diff --git a/components/datetime/src/pattern/formatter.rs b/components/datetime/src/pattern/formatter.rs index bfd4e549ae6..55f8dcd4e5d 100644 --- a/components/datetime/src/pattern/formatter.rs +++ b/components/datetime/src/pattern/formatter.rs @@ -158,12 +158,12 @@ where /// use icu::datetime::pattern::TypedDateTimeNames; /// use icu::locale::locale; /// use icu::datetime::input::ZonedDateTime; - /// use icu::timezone::{TimeZoneIdMapper, ZoneOffsetCalculator}; + /// use icu::time::zone::{IanaParser, UtcOffsetCalculator}; /// use writeable::assert_try_writeable_eq; /// - /// let mut london_winter = ZonedDateTime::try_from_str("2024-01-01T00:00:00+00:00[Europe/London]", Gregorian, TimeZoneIdMapper::new(), &ZoneOffsetCalculator::new()) + /// let mut london_winter = ZonedDateTime::try_from_str("2024-01-01T00:00:00+00:00[Europe/London]", Gregorian, IanaParser::new(), &UtcOffsetCalculator::new()) /// .unwrap(); - /// let mut london_summer = ZonedDateTime::try_from_str("2024-07-01T00:00:00+01:00[Europe/London]", Gregorian, TimeZoneIdMapper::new(), &ZoneOffsetCalculator::new()) + /// let mut london_summer = ZonedDateTime::try_from_str("2024-07-01T00:00:00+01:00[Europe/London]", Gregorian, IanaParser::new(), &UtcOffsetCalculator::new()) /// .unwrap(); /// /// let mut names = TypedDateTimeNames::::try_new( @@ -236,7 +236,7 @@ mod tests { use super::super::*; use icu_calendar::{Date, Gregorian}; use icu_locale_core::locale; - use icu_timezone::{DateTime, Time}; + use icu_time::{DateTime, Time}; use writeable::assert_try_writeable_eq; #[test] diff --git a/components/datetime/src/pattern/names.rs b/components/datetime/src/pattern/names.rs index 65b4aa19de8..179f4b8b73c 100644 --- a/components/datetime/src/pattern/names.rs +++ b/components/datetime/src/pattern/names.rs @@ -433,7 +433,7 @@ size_test!( /// use icu::datetime::pattern::{DateTimePattern, PatternLoadError}; /// use icu::datetime::fieldsets::enums::CompositeFieldSet; /// use icu::locale::locale; -/// use icu::timezone::{TimeZoneIdMapper, ZoneOffsetCalculator}; +/// use icu::time::zone::{IanaParser, UtcOffsetCalculator}; /// use icu::datetime::input::{Time, TimeZoneInfo, ZonedDateTime}; /// use icu_provider_adapters::empty::EmptyDataProvider; /// use writeable::{Part, assert_try_writeable_parts_eq}; @@ -452,7 +452,7 @@ size_test!( /// // The pattern string contains lots of symbols including "E", "MMM", and "a", /// // but we did not load any data! /// -/// let mut dtz = ZonedDateTime::try_from_str("2023-11-20T11:35:03+00:00[Europe/London]", Gregorian, TimeZoneIdMapper::new(), &ZoneOffsetCalculator::new()).unwrap(); +/// let mut dtz = ZonedDateTime::try_from_str("2023-11-20T11:35:03+00:00[Europe/London]", Gregorian, IanaParser::new(), &UtcOffsetCalculator::new()).unwrap(); /// /// // Missing data is filled in on a best-effort basis, and an error is signaled. /// assert_try_writeable_parts_eq!( @@ -1405,14 +1405,14 @@ impl TypedDateTimeNames { /// use icu::datetime::pattern::DateTimePattern; /// use icu::datetime::pattern::TypedDateTimeNames; /// use icu::locale::locale; - /// use icu::timezone::{TimeZoneIdMapper, ZoneOffsetCalculator}; + /// use icu::time::zone::{IanaParser, UtcOffsetCalculator}; /// use icu::datetime::input::ZonedDateTime; /// use writeable::assert_try_writeable_eq; /// - /// let mut zone_london_winter = ZonedDateTime::try_from_str("2024-01-01T00:00:00+00:00[Europe/London]", Gregorian, TimeZoneIdMapper::new(), &ZoneOffsetCalculator::new()) + /// let mut zone_london_winter = ZonedDateTime::try_from_str("2024-01-01T00:00:00+00:00[Europe/London]", Gregorian, IanaParser::new(), &UtcOffsetCalculator::new()) /// .unwrap() /// .zone; - /// let mut zone_london_summer = ZonedDateTime::try_from_str("2024-07-01T00:00:00+01:00[Europe/London]", Gregorian, TimeZoneIdMapper::new(), &ZoneOffsetCalculator::new()) + /// let mut zone_london_summer = ZonedDateTime::try_from_str("2024-07-01T00:00:00+01:00[Europe/London]", Gregorian, IanaParser::new(), &UtcOffsetCalculator::new()) /// .unwrap() /// .zone; /// @@ -1516,11 +1516,11 @@ impl TypedDateTimeNames { /// use icu::datetime::pattern::DateTimePattern; /// use icu::datetime::pattern::TypedDateTimeNames; /// use icu::locale::locale; - /// use icu::timezone::{TimeZoneIdMapper, ZoneOffsetCalculator}; + /// use icu::time::zone::{IanaParser, UtcOffsetCalculator}; /// use icu::datetime::input::ZonedDateTime; /// use writeable::assert_try_writeable_eq; /// - /// let mut zone_london_winter = ZonedDateTime::try_from_str("2024-01-01T00:00:00+00:00[Europe/London]", Gregorian, TimeZoneIdMapper::new(), &ZoneOffsetCalculator::new()) + /// let mut zone_london_winter = ZonedDateTime::try_from_str("2024-01-01T00:00:00+00:00[Europe/London]", Gregorian, IanaParser::new(), &UtcOffsetCalculator::new()) /// .unwrap() /// .zone; /// @@ -1580,11 +1580,11 @@ impl TypedDateTimeNames { /// use icu::datetime::pattern::DateTimePattern; /// use icu::datetime::pattern::TypedDateTimeNames; /// use icu::locale::locale; - /// use icu::timezone::{TimeZoneIdMapper, ZoneOffsetCalculator}; + /// use icu::time::zone::{IanaParser, UtcOffsetCalculator}; /// use icu::datetime::input::ZonedDateTime; /// use writeable::assert_try_writeable_eq; /// - /// let mut zone_london_winter = ZonedDateTime::try_from_str("2024-01-01T00:00:00+00:00[Europe/London]", Gregorian, TimeZoneIdMapper::new(), &ZoneOffsetCalculator::new()) + /// let mut zone_london_winter = ZonedDateTime::try_from_str("2024-01-01T00:00:00+00:00[Europe/London]", Gregorian, IanaParser::new(), &UtcOffsetCalculator::new()) /// .unwrap() /// .zone; /// @@ -1644,14 +1644,14 @@ impl TypedDateTimeNames { /// use icu::datetime::pattern::DateTimePattern; /// use icu::datetime::pattern::TypedDateTimeNames; /// use icu::locale::locale; - /// use icu::timezone::{TimeZoneIdMapper, ZoneOffsetCalculator}; + /// use icu::time::zone::{IanaParser, UtcOffsetCalculator}; /// use icu::datetime::input::ZonedDateTime; /// use writeable::assert_try_writeable_eq; /// - /// let mut zone_london_winter = ZonedDateTime::try_from_str("2024-01-01T00:00:00+00:00[Europe/London]", Gregorian, TimeZoneIdMapper::new(), &ZoneOffsetCalculator::new()) + /// let mut zone_london_winter = ZonedDateTime::try_from_str("2024-01-01T00:00:00+00:00[Europe/London]", Gregorian, IanaParser::new(), &UtcOffsetCalculator::new()) /// .unwrap() /// .zone; - /// let mut zone_london_summer = ZonedDateTime::try_from_str("2024-07-01T00:00:00+01:00[Europe/London]", Gregorian, TimeZoneIdMapper::new(), &ZoneOffsetCalculator::new()) + /// let mut zone_london_summer = ZonedDateTime::try_from_str("2024-07-01T00:00:00+01:00[Europe/London]", Gregorian, IanaParser::new(), &UtcOffsetCalculator::new()) /// .unwrap() /// .zone; /// @@ -1717,14 +1717,14 @@ impl TypedDateTimeNames { /// use icu::datetime::pattern::DateTimePattern; /// use icu::datetime::pattern::TypedDateTimeNames; /// use icu::locale::locale; - /// use icu::timezone::{TimeZoneIdMapper, ZoneOffsetCalculator}; + /// use icu::time::zone::{IanaParser, UtcOffsetCalculator}; /// use icu::datetime::input::ZonedDateTime; /// use writeable::assert_try_writeable_eq; /// - /// let mut zone_london_winter = ZonedDateTime::try_from_str("2024-01-01T00:00:00+00:00[Europe/London]", Gregorian, TimeZoneIdMapper::new(), &ZoneOffsetCalculator::new()) + /// let mut zone_london_winter = ZonedDateTime::try_from_str("2024-01-01T00:00:00+00:00[Europe/London]", Gregorian, IanaParser::new(), &UtcOffsetCalculator::new()) /// .unwrap() /// .zone; - /// let mut zone_london_summer = ZonedDateTime::try_from_str("2024-07-01T00:00:00+01:00[Europe/London]", Gregorian, TimeZoneIdMapper::new(), &ZoneOffsetCalculator::new()) + /// let mut zone_london_summer = ZonedDateTime::try_from_str("2024-07-01T00:00:00+01:00[Europe/London]", Gregorian, IanaParser::new(), &UtcOffsetCalculator::new()) /// .unwrap() /// .zone; /// @@ -1790,14 +1790,14 @@ impl TypedDateTimeNames { /// use icu::datetime::pattern::DateTimePattern; /// use icu::datetime::pattern::TypedDateTimeNames; /// use icu::locale::locale; - /// use icu::timezone::{TimeZoneIdMapper, ZoneOffsetCalculator}; + /// use icu::time::zone::{IanaParser, UtcOffsetCalculator}; /// use icu::datetime::input::ZonedDateTime; /// use writeable::assert_try_writeable_eq; /// - /// let mut zone_london_winter = ZonedDateTime::try_from_str("2024-01-01T00:00:00+00:00[Europe/London]", Gregorian, TimeZoneIdMapper::new(), &ZoneOffsetCalculator::new()) + /// let mut zone_london_winter = ZonedDateTime::try_from_str("2024-01-01T00:00:00+00:00[Europe/London]", Gregorian, IanaParser::new(), &UtcOffsetCalculator::new()) /// .unwrap() /// .zone; - /// let mut zone_london_summer = ZonedDateTime::try_from_str("2024-07-01T00:00:00+01:00[Europe/London]", Gregorian, TimeZoneIdMapper::new(), &ZoneOffsetCalculator::new()) + /// let mut zone_london_summer = ZonedDateTime::try_from_str("2024-07-01T00:00:00+01:00[Europe/London]", Gregorian, IanaParser::new(), &UtcOffsetCalculator::new()) /// .unwrap() /// .zone; /// @@ -1863,14 +1863,14 @@ impl TypedDateTimeNames { /// use icu::datetime::pattern::DateTimePattern; /// use icu::datetime::pattern::TypedDateTimeNames; /// use icu::locale::locale; - /// use icu::timezone::{TimeZoneIdMapper, ZoneOffsetCalculator}; + /// use icu::time::zone::{IanaParser, UtcOffsetCalculator}; /// use icu::datetime::input::ZonedDateTime; /// use writeable::assert_try_writeable_eq; /// - /// let mut zone_london_winter = ZonedDateTime::try_from_str("2024-01-01T00:00:00+00:00[Europe/London]", Gregorian, TimeZoneIdMapper::new(), &ZoneOffsetCalculator::new()) + /// let mut zone_london_winter = ZonedDateTime::try_from_str("2024-01-01T00:00:00+00:00[Europe/London]", Gregorian, IanaParser::new(), &UtcOffsetCalculator::new()) /// .unwrap() /// .zone; - /// let mut zone_london_summer = ZonedDateTime::try_from_str("2024-07-01T00:00:00+01:00[Europe/London]", Gregorian, TimeZoneIdMapper::new(), &ZoneOffsetCalculator::new()) + /// let mut zone_london_summer = ZonedDateTime::try_from_str("2024-07-01T00:00:00+01:00[Europe/London]", Gregorian, IanaParser::new(), &UtcOffsetCalculator::new()) /// .unwrap() /// .zone; /// @@ -3007,7 +3007,7 @@ impl RawDateTimeNamesBorrowed<'_> { &self, field_symbol: fields::DayPeriod, field_length: FieldLength, - hour: icu_timezone::types::IsoHour, + hour: icu_time::Hour, is_top_of_hour: bool, ) -> Result<&str, GetNameForDayPeriodError> { use fields::DayPeriod::NoonMidnight; diff --git a/components/datetime/src/provider/pattern/mod.rs b/components/datetime/src/provider/pattern/mod.rs index bea3970e5ab..6d3c2854121 100644 --- a/components/datetime/src/provider/pattern/mod.rs +++ b/components/datetime/src/provider/pattern/mod.rs @@ -43,7 +43,7 @@ pub enum TimeGranularity { Minutes, /// Smallest time unit = seconds. Seconds, - /// Smallest time unit = nanoseconds. + /// Smallest time unit = Nanoseconds. Nanoseconds, } @@ -58,12 +58,12 @@ impl TimeGranularity { /// the top of the hour, otherwise returns [`false`]. /// e.g. `12:00:00` is at the top of the hour for any display granularity. /// e.g. `12:00:05` is only at the top of the hour if the seconds are not displayed. - pub fn is_top_of_hour(self, minute: u8, second: u8, nanosecond: u32) -> bool { + pub fn is_top_of_hour(self, minute: u8, second: u8, subsecond: u32) -> bool { match self { Self::None | Self::Hours => true, Self::Minutes => minute == 0, - Self::Seconds => minute + second == 0, - Self::Nanoseconds => minute as u32 + second as u32 + nanosecond == 0, + Self::Seconds => minute == 0 && second == 0, + Self::Nanoseconds => minute == 0 && second == 0 && subsecond == 0, } } diff --git a/components/datetime/src/provider/time_zones.rs b/components/datetime/src/provider/time_zones.rs index de271acea7b..a2482c7e6d4 100644 --- a/components/datetime/src/provider/time_zones.rs +++ b/components/datetime/src/provider/time_zones.rs @@ -9,7 +9,7 @@ use icu_pattern::{DoublePlaceholderPattern, SinglePlaceholderPattern}; use icu_provider::prelude::*; use zerovec::{ule::NichedOption, ZeroMap, ZeroMap2d}; -use icu_timezone::{provider::IsoMinutesSinceEpoch, TimeZoneBcp47Id, ZoneVariant}; +use icu_time::{provider::MinutesSinceEpoch, zone::TimeZoneVariant, TimeZone}; /// Time zone type aliases for cleaner code pub(crate) mod tz { @@ -87,7 +87,7 @@ pub struct TimeZoneEssentials<'data> { pub struct Locations<'data> { /// Per-zone location display name #[cfg_attr(feature = "serde", serde(borrow))] - pub locations: ZeroMap<'data, TimeZoneBcp47Id, str>, + pub locations: ZeroMap<'data, TimeZone, str>, /// The format string for a region's generic time. #[cfg_attr( feature = "serde", @@ -147,7 +147,7 @@ pub struct ExemplarCities<'data> { /// Per-zone exemplar city name. This is deduplicated against `Locations.locations`, so it /// only contains time zones that don't use the exemplar city in the location format. #[cfg_attr(feature = "serde", serde(borrow))] - pub exemplars: ZeroMap<'data, TimeZoneBcp47Id, str>, + pub exemplars: ZeroMap<'data, TimeZone, str>, } /// An ICU4X mapping to generic metazone names. @@ -175,7 +175,7 @@ pub struct MetazoneGenericNames<'data> { pub defaults: ZeroMap<'data, MetazoneId, str>, /// The override mapping between timezone id and localized metazone name. #[cfg_attr(feature = "serde", serde(borrow))] - pub overrides: ZeroMap<'data, TimeZoneBcp47Id, str>, + pub overrides: ZeroMap<'data, TimeZone, str>, } /// An ICU4X mapping to specific metazone names. @@ -205,10 +205,10 @@ pub struct MetazoneGenericNames<'data> { pub struct MetazoneSpecificNames<'data> { /// The default mapping between metazone id and localized metazone name. #[cfg_attr(feature = "serde", serde(borrow))] - pub defaults: ZeroMap<'data, (MetazoneId, ZoneVariant), str>, + pub defaults: ZeroMap<'data, (MetazoneId, TimeZoneVariant), str>, /// The override mapping between timezone id and localized metazone name. #[cfg_attr(feature = "serde", serde(borrow))] - pub overrides: ZeroMap<'data, (TimeZoneBcp47Id, ZoneVariant), str>, + pub overrides: ZeroMap<'data, (TimeZone, TimeZoneVariant), str>, } /// Metazone ID in a compact format @@ -243,7 +243,7 @@ pub type MetazoneId = core::num::NonZeroU8; #[yoke(prove_covariance_manually)] pub struct MetazonePeriod<'data> { /// The default mapping between period and metazone id. The second level key is a wall-clock time represented as - /// the number of minutes since the local [`EPOCH`](icu_timezone::provider::EPOCH). It represents when the metazone started to be used. + /// the number of minutes since the local [`EPOCH`](icu_time::provider::EPOCH). It represents when the metazone started to be used. #[cfg_attr(feature = "serde", serde(borrow))] - pub list: ZeroMap2d<'data, TimeZoneBcp47Id, IsoMinutesSinceEpoch, NichedOption>, + pub list: ZeroMap2d<'data, TimeZone, MinutesSinceEpoch, NichedOption>, } diff --git a/components/datetime/src/scaffold/calendar.rs b/components/datetime/src/scaffold/calendar.rs index f9c396fd4c2..8db3c4ca306 100644 --- a/components/datetime/src/scaffold/calendar.rs +++ b/components/datetime/src/scaffold/calendar.rs @@ -18,7 +18,10 @@ use icu_calendar::cal::{ use icu_calendar::{any_calendar::IntoAnyCalendar, AnyCalendar, AsCalendar, Calendar, Date, Ref}; use icu_provider::marker::NeverMarker; use icu_provider::prelude::*; -use icu_timezone::{DateTime, Time, TimeZoneInfo, TimeZoneModel, UtcOffset, ZonedDateTime}; +use icu_time::{ + zone::{models::TimeZoneModel, UtcOffset}, + DateTime, Time, TimeZoneInfo, ZonedDateTime, +}; mod private { pub trait Sealed {} diff --git a/components/datetime/src/scaffold/dynamic_impls.rs b/components/datetime/src/scaffold/dynamic_impls.rs index 6f1b309620d..92505bf0455 100644 --- a/components/datetime/src/scaffold/dynamic_impls.rs +++ b/components/datetime/src/scaffold/dynamic_impls.rs @@ -10,9 +10,9 @@ use icu_calendar::{ Date, Iso, }; use icu_provider::marker::NeverMarker; -use icu_timezone::{ - types::{IsoHour, IsoMinute, IsoSecond, NanoSecond}, - Time, TimeZoneBcp47Id, UtcOffset, ZoneVariant, +use icu_time::{ + zone::{TimeZoneVariant, UtcOffset}, + Hour, Minute, Nanosecond, Second, Time, TimeZone, }; impl UnstableSealed for DateFieldSet {} @@ -136,7 +136,7 @@ impl TimeMarkers for TimeFieldSet { type HourInput = datetime_marker_helper!(@input/hour, yes); type MinuteInput = datetime_marker_helper!(@input/minute, yes); type SecondInput = datetime_marker_helper!(@input/second, yes); - type NanoSecondInput = datetime_marker_helper!(@input/nanosecond, yes); + type NanosecondInput = datetime_marker_helper!(@input/Nanosecond, yes); } impl DateTimeMarkers for TimeFieldSet { diff --git a/components/datetime/src/scaffold/fieldset_traits.rs b/components/datetime/src/scaffold/fieldset_traits.rs index c0e2d1764ac..9128bab4613 100644 --- a/components/datetime/src/scaffold/fieldset_traits.rs +++ b/components/datetime/src/scaffold/fieldset_traits.rs @@ -16,10 +16,10 @@ use icu_calendar::{ }; use icu_decimal::provider::{DecimalDigitsV1, DecimalSymbolsV2}; use icu_provider::{marker::NeverMarker, prelude::*}; -use icu_timezone::scaffold::IntoOption; -use icu_timezone::{ - types::{IsoHour, IsoMinute, IsoSecond, NanoSecond}, - Time, TimeZoneBcp47Id, UtcOffset, ZoneVariant, +use icu_time::scaffold::IntoOption; +use icu_time::{ + zone::{TimeZoneVariant, UtcOffset}, + Hour, Minute, Nanosecond, Second, Time, TimeZone, }; // TODO: Add WeekCalculator and DecimalFormatter optional bindings here @@ -97,13 +97,13 @@ pub trait DateDataMarkers: UnstableSealed { /// pub trait TimeMarkers: UnstableSealed { /// Marker for resolving the day-of-month input field. - type HourInput: IntoOption; + type HourInput: IntoOption; /// Marker for resolving the day-of-week input field. - type MinuteInput: IntoOption; + type MinuteInput: IntoOption; /// Marker for resolving the day-of-year input field. - type SecondInput: IntoOption; + type SecondInput: IntoOption; /// Marker for resolving the any-calendar-kind input field. - type NanoSecondInput: IntoOption; + type NanosecondInput: IntoOption; /// Marker for loading time skeleton patterns. type TimeSkeletonPatternsV1: DataMarker>; /// Marker for loading day period names. @@ -121,11 +121,11 @@ pub trait TimeMarkers: UnstableSealed { /// pub trait ZoneMarkers: UnstableSealed { /// Marker for resolving the time zone id input field. - type TimeZoneIdInput: IntoOption; + type TimeZoneIdInput: IntoOption; /// Marker for resolving the time zone offset input field. type TimeZoneOffsetInput: IntoOption; /// Marker for resolving the time zone variant input field. - type TimeZoneVariantInput: IntoOption; + type TimeZoneVariantInput: IntoOption; /// Marker for resolving the time zone non-location display names, which depend on the datetime. type TimeZoneLocalTimeInput: IntoOption<(Date, Time)>; /// Marker for loading core time zone data. @@ -185,11 +185,11 @@ pub trait DateTimeMarkers: UnstableSealed + DateTimeNamesMarker { /// The following types implement this trait: /// /// - [`Date`](icu_calendar::Date) -/// - [`Time`](icu_timezone::Time) -/// - [`DateTime`](icu_timezone::DateTime) -/// - [`ZonedDateTime`](icu_timezone::ZonedDateTime) -/// - [`UtcOffset`](icu_timezone::UtcOffset) -/// - [`TimeZoneInfo`](icu_timezone::TimeZoneInfo) +/// - [`Time`](icu_time::Time) +/// - [`DateTime`](icu_time::DateTime) +/// - [`ZonedDateTime`](icu_time::ZonedDateTime) +/// - [`UtcOffset`](icu_time::zone::UtcOffset) +/// - [`TimeZoneInfo`](icu_time::TimeZoneInfo) /// /// [`fieldsets::YMD`]: crate::fieldsets::YMD // This trait is implicitly sealed due to sealed supertraits @@ -202,7 +202,7 @@ pub trait AllInputMarkers: + GetField<::HourInput> + GetField<::MinuteInput> + GetField<::SecondInput> - + GetField<::NanoSecondInput> + + GetField<::NanosecondInput> + GetField<::TimeZoneIdInput> + GetField<::TimeZoneOffsetInput> + GetField<::TimeZoneVariantInput> @@ -228,7 +228,7 @@ where + GetField<::HourInput> + GetField<::MinuteInput> + GetField<::SecondInput> - + GetField<::NanoSecondInput> + + GetField<::NanosecondInput> + GetField<::TimeZoneIdInput> + GetField<::TimeZoneOffsetInput> + GetField<::TimeZoneVariantInput> @@ -580,7 +580,7 @@ impl TimeMarkers for () { type HourInput = (); type MinuteInput = (); type SecondInput = (); - type NanoSecondInput = (); + type NanosecondInput = (); type TimeSkeletonPatternsV1 = NeverMarker>; type DayPeriodNamesV1 = NeverMarker>; } @@ -691,25 +691,25 @@ macro_rules! datetime_marker_helper { DayOfYearInfo }; (@input/hour, yes) => { - IsoHour + Hour }; (@input/minute, yes) => { - IsoMinute + Minute }; (@input/second, yes) => { - IsoSecond + Second }; - (@input/nanosecond, yes) => { - NanoSecond + (@input/Nanosecond, yes) => { + Nanosecond }; (@input/timezone/id, yes) => { - TimeZoneBcp47Id + TimeZone }; (@input/timezone/offset, yes) => { Option }; (@input/timezone/variant, yes) => { - ZoneVariant + TimeZoneVariant }; (@input/timezone/local_time, yes) => { (Date, Time) diff --git a/components/datetime/src/scaffold/get_field.rs b/components/datetime/src/scaffold/get_field.rs index c3056485451..22e920cf8aa 100644 --- a/components/datetime/src/scaffold/get_field.rs +++ b/components/datetime/src/scaffold/get_field.rs @@ -6,10 +6,9 @@ use icu_calendar::{ types::{DayOfMonth, DayOfYearInfo, IsoWeekday, MonthInfo, YearInfo}, AsCalendar, Calendar, Date, Iso, }; -use icu_timezone::{ - types::{IsoHour, IsoMinute, IsoSecond, NanoSecond}, - DateTime, Time, TimeZoneBcp47Id, TimeZoneInfo, TimeZoneModel, UtcOffset, ZoneVariant, - ZonedDateTime, +use icu_time::{ + zone::{models::TimeZoneModel, TimeZoneVariant, UtcOffset}, + DateTime, Hour, Minute, Nanosecond, Second, Time, TimeZone, TimeZoneInfo, ZonedDateTime, }; use super::UnstableSealed; @@ -76,31 +75,31 @@ impl> GetField for Date< impl UnstableSealed for Time {} -impl GetField for Time { +impl GetField for Time { #[inline] - fn get_field(&self) -> IsoHour { + fn get_field(&self) -> Hour { self.hour } } -impl GetField for Time { +impl GetField for Time { #[inline] - fn get_field(&self) -> IsoMinute { + fn get_field(&self) -> Minute { self.minute } } -impl GetField for Time { +impl GetField for Time { #[inline] - fn get_field(&self) -> IsoSecond { + fn get_field(&self) -> Second { self.second } } -impl GetField for Time { +impl GetField for Time { #[inline] - fn get_field(&self) -> NanoSecond { - self.nanosecond + fn get_field(&self) -> Nanosecond { + self.subsecond } } @@ -141,31 +140,31 @@ impl> GetField for DateT } } -impl> GetField for DateTime { +impl> GetField for DateTime { #[inline] - fn get_field(&self) -> IsoHour { + fn get_field(&self) -> Hour { self.time.hour } } -impl> GetField for DateTime { +impl> GetField for DateTime { #[inline] - fn get_field(&self) -> IsoMinute { + fn get_field(&self) -> Minute { self.time.minute } } -impl> GetField for DateTime { +impl> GetField for DateTime { #[inline] - fn get_field(&self) -> IsoSecond { + fn get_field(&self) -> Second { self.time.second } } -impl> GetField for DateTime { +impl> GetField for DateTime { #[inline] - fn get_field(&self) -> NanoSecond { - self.time.nanosecond + fn get_field(&self) -> Nanosecond { + self.time.subsecond } } @@ -206,31 +205,31 @@ impl, Z> GetField for Zo } } -impl, Z> GetField for ZonedDateTime { +impl, Z> GetField for ZonedDateTime { #[inline] - fn get_field(&self) -> IsoHour { + fn get_field(&self) -> Hour { self.time.hour } } -impl, Z> GetField for ZonedDateTime { +impl, Z> GetField for ZonedDateTime { #[inline] - fn get_field(&self) -> IsoMinute { + fn get_field(&self) -> Minute { self.time.minute } } -impl, Z> GetField for ZonedDateTime { +impl, Z> GetField for ZonedDateTime { #[inline] - fn get_field(&self) -> IsoSecond { + fn get_field(&self) -> Second { self.time.second } } -impl, Z> GetField for ZonedDateTime { +impl, Z> GetField for ZonedDateTime { #[inline] - fn get_field(&self) -> NanoSecond { - self.time.nanosecond + fn get_field(&self) -> Nanosecond { + self.time.subsecond } } @@ -245,22 +244,22 @@ where } } -impl, Z> GetField for ZonedDateTime +impl, Z> GetField for ZonedDateTime where - Z: GetField, + Z: GetField, { #[inline] - fn get_field(&self) -> TimeZoneBcp47Id { + fn get_field(&self) -> TimeZone { self.zone.get_field() } } -impl, Z> GetField for ZonedDateTime +impl, Z> GetField for ZonedDateTime where - Z: GetField, + Z: GetField, { #[inline] - fn get_field(&self) -> ZoneVariant { + fn get_field(&self) -> TimeZoneVariant { self.zone.get_field() } } @@ -287,12 +286,12 @@ impl GetField> for UtcOffset { impl UnstableSealed for TimeZoneInfo {} -impl GetField for TimeZoneInfo +impl GetField for TimeZoneInfo where O: TimeZoneModel, { #[inline] - fn get_field(&self) -> TimeZoneBcp47Id { + fn get_field(&self) -> TimeZone { self.time_zone_id() } } @@ -307,12 +306,12 @@ where } } -impl GetField for TimeZoneInfo +impl GetField for TimeZoneInfo where - O: TimeZoneModel, + O: TimeZoneModel, { #[inline] - fn get_field(&self) -> ZoneVariant { + fn get_field(&self) -> TimeZoneVariant { self.zone_variant() } } diff --git a/components/datetime/tests/datetime.rs b/components/datetime/tests/datetime.rs index ad29cb1b75e..ea825a5e716 100644 --- a/components/datetime/tests/datetime.rs +++ b/components/datetime/tests/datetime.rs @@ -28,7 +28,10 @@ use icu_locale_core::{ Locale, }; use icu_provider::prelude::*; -use icu_timezone::{DateTime, TimeZoneIdMapper, TimeZoneInfo, UtcOffset, ZonedDateTime}; +use icu_time::{ + zone::{IanaParser, UtcOffset}, + DateTime, TimeZoneInfo, ZonedDateTime, +}; use patterns::{ dayperiods::{DayPeriodExpectation, DayPeriodTests}, time_zones::TimeZoneTests, @@ -464,7 +467,7 @@ fn test_time_zone_format_offset_fallback() { .unwrap(); assert_writeable_eq!( tzf.format( - &TimeZoneIdMapper::new() + &IanaParser::new() .iana_to_bcp47("America/Los_Angeles") .with_offset(None) ), diff --git a/components/datetime/tests/mock.rs b/components/datetime/tests/mock.rs index 2501db0db74..92c609eca1d 100644 --- a/components/datetime/tests/mock.rs +++ b/components/datetime/tests/mock.rs @@ -5,8 +5,9 @@ //! Some useful parsing functions for tests. use icu_calendar::Gregorian; -use icu_timezone::{ - models, TimeZoneIdMapper, TimeZoneInfo, ZoneOffsetCalculator, ZoneVariant, ZonedDateTime, +use icu_time::{ + zone::{models, IanaParser, TimeZoneVariant, UtcOffsetCalculator}, + TimeZoneInfo, ZonedDateTime, }; /// Parse a [`DateTime`] and [`TimeZoneInfo`] from a string. @@ -33,18 +34,18 @@ pub fn parse_zoned_gregorian_from_str( match ZonedDateTime::try_from_str( input, Gregorian, - TimeZoneIdMapper::new(), - &ZoneOffsetCalculator::new(), + IanaParser::new(), + &UtcOffsetCalculator::new(), ) { Ok(zdt) => zdt, - Err(icu_timezone::ParseError::MismatchedTimeZoneFields) => { - match ZonedDateTime::try_loose_from_str(input, Gregorian, TimeZoneIdMapper::new()) { + Err(icu_time::ParseError::MismatchedTimeZoneFields) => { + match ZonedDateTime::try_loose_from_str(input, Gregorian, IanaParser::new()) { Ok(zdt) => { ZonedDateTime { date: zdt.date, time: zdt.time, // For fixture tests, set the zone variant to standard here - zone: zdt.zone.with_zone_variant(ZoneVariant::Standard), + zone: zdt.zone.with_zone_variant(TimeZoneVariant::Standard), } } Err(e) => panic!("could not parse input: {input}: {e:?}"), diff --git a/components/datetime/tests/resolved_components.rs b/components/datetime/tests/resolved_components.rs index e9d0aa83d5e..a2de47a3a0b 100644 --- a/components/datetime/tests/resolved_components.rs +++ b/components/datetime/tests/resolved_components.rs @@ -11,7 +11,7 @@ use icu_datetime::{ }; use icu_locale_core::Locale; use icu_locale_core::{locale, preferences::extensions::unicode::keywords::HourCycle}; -use icu_timezone::{DateTime, Time}; +use icu_time::{DateTime, Time}; fn assert_resolved_components( skeleton: CompositeDateTimeFieldSet, diff --git a/components/datetime/tests/simple_test.rs b/components/datetime/tests/simple_test.rs index ab30c30d71b..0896c172101 100644 --- a/components/datetime/tests/simple_test.rs +++ b/components/datetime/tests/simple_test.rs @@ -10,7 +10,7 @@ use icu_datetime::fieldsets::enums::{ use icu_datetime::fieldsets::{self, YMD}; use icu_datetime::{DateTimeFormatterPreferences, FixedCalendarDateTimeFormatter}; use icu_locale_core::{locale, Locale}; -use icu_timezone::{DateTime, Time}; +use icu_time::{DateTime, Time}; use writeable::assert_writeable_eq; const EXPECTED_DATETIME: &[&str] = &[ diff --git a/components/icu/Cargo.toml b/components/icu/Cargo.toml index e17b84c5a70..c028389b612 100644 --- a/components/icu/Cargo.toml +++ b/components/icu/Cargo.toml @@ -32,7 +32,7 @@ icu_normalizer = { workspace = true } icu_plurals = { workspace = true } icu_properties = { workspace = true, features = ["alloc"] } icu_segmenter = { workspace = true } -icu_timezone = { workspace = true } +icu_time = { workspace = true } icu_experimental = { workspace = true, optional = true } icu_pattern = { workspace = true, optional = true } @@ -63,7 +63,7 @@ default = [ "icu_plurals/default", "icu_properties/default", "icu_segmenter/default", - "icu_timezone/default", + "icu_time/default", "icu_experimental?/default", "icu_pattern?/default", ] @@ -80,7 +80,7 @@ serde = [ "icu_plurals/serde", "icu_properties/serde", "icu_segmenter/serde", - "icu_timezone/serde", + "icu_time/serde", "icu_experimental?/serde", "icu_pattern?/serde", ] @@ -96,7 +96,7 @@ compiled_data = [ "icu_plurals/compiled_data", "icu_properties/compiled_data", "icu_segmenter/compiled_data", - "icu_timezone/compiled_data", + "icu_time/compiled_data", "icu_experimental?/compiled_data", ] datagen = [ @@ -113,7 +113,7 @@ datagen = [ "icu_plurals/datagen", "icu_properties/datagen", "icu_segmenter/datagen", - "icu_timezone/datagen", + "icu_time/datagen", "icu_experimental?/datagen", ] serde_human = [ diff --git a/components/icu/examples/jiff.rs b/components/icu/examples/jiff.rs index 04e627299b2..f1f06a77a3d 100644 --- a/components/icu/examples/jiff.rs +++ b/components/icu/examples/jiff.rs @@ -6,7 +6,10 @@ use icu::{ calendar::Date, datetime::{fieldsets, DateTimeFormatter}, locale::locale, - timezone::{Time, TimeZoneIdMapper, UtcOffset, ZoneOffsetCalculator, ZonedDateTime}, + time::{ + zone::{IanaParser, UtcOffset, UtcOffsetCalculator}, + Time, ZonedDateTime, + }, }; fn main() -> Result<(), Box> { @@ -31,7 +34,7 @@ fn main() -> Result<(), Box> { let zone = // ICU uses BCP47 time zone IDs - TimeZoneIdMapper::new().iana_to_bcp47(zoned.time_zone().iana_name().unwrap_or("Etc/Unknown")) + IanaParser::new().iana_to_bcp47(zoned.time_zone().iana_name().unwrap_or("Etc/Unknown")) // In ICU's model, a time zone has a fixed offset, as that's required for formatting .with_offset(UtcOffset::try_from_seconds(zoned.offset().seconds()).ok()) // Display names might change over time for a given zone (e.g. it might change from Eastern Time to @@ -48,8 +51,8 @@ fn main() -> Result<(), Box> { ZonedDateTime::try_from_str( &zoned.to_string(), icu::calendar::Iso, - TimeZoneIdMapper::new(), - &ZoneOffsetCalculator::new() + IanaParser::new(), + &UtcOffsetCalculator::new() ) .unwrap(), zoned_date_time diff --git a/components/icu/examples/tui.rs b/components/icu/examples/tui.rs index 771e9712008..35531918511 100644 --- a/components/icu/examples/tui.rs +++ b/components/icu/examples/tui.rs @@ -8,11 +8,11 @@ use icu::calendar::{Date, Gregorian}; use icu::locale::locale; use icu::plurals::{PluralCategory, PluralRules}; -use icu::timezone::TimeZoneInfo; +use icu::time::TimeZoneInfo; use icu_collections::codepointinvlist::CodePointInversionListBuilder; use icu_datetime::fieldsets::{self, YMDT}; use icu_datetime::FixedCalendarDateTimeFormatter; -use icu_timezone::{Time, ZonedDateTime}; +use icu_time::{Time, ZonedDateTime}; use std::env; fn main() { diff --git a/components/icu/src/lib.rs b/components/icu/src/lib.rs index 887b2c24d3a..79236b805e4 100644 --- a/components/icu/src/lib.rs +++ b/components/icu/src/lib.rs @@ -178,7 +178,7 @@ pub use icu_collections as collections; pub use icu_segmenter as segmenter; #[doc(inline)] -pub use icu_timezone as timezone; +pub use icu_time as time; #[doc(inline)] #[cfg(feature = "experimental")] diff --git a/components/timezone/Cargo.toml b/components/time/Cargo.toml similarity index 91% rename from components/timezone/Cargo.toml rename to components/time/Cargo.toml index 5cf3eb3e7ac..275ec73e4d8 100644 --- a/components/timezone/Cargo.toml +++ b/components/time/Cargo.toml @@ -3,7 +3,7 @@ # (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). [package] -name = "icu_timezone" +name = "icu_time" description = "API for resolving and manipulating time zone information" authors.workspace = true @@ -33,7 +33,7 @@ writeable = { workspace = true } databake = { workspace = true, optional = true, features = ["derive"] } serde = { workspace = true, features = ["derive", "alloc"], optional = true } -icu_timezone_data = { workspace = true, optional = true } +icu_time_data = { workspace = true, optional = true } [dev-dependencies] icu = { path = "../../components/icu", default-features = false } @@ -43,4 +43,4 @@ default = ["compiled_data", "ixdtf"] ixdtf = ["dep:ixdtf", "icu_calendar/ixdtf"] serde = ["dep:serde", "zerovec/serde", "zerotrie/serde", "tinystr/serde", "icu_provider/serde"] datagen = ["serde", "dep:databake", "zerovec/databake", "zerotrie/databake", "tinystr/databake"] -compiled_data = ["dep:icu_timezone_data", "icu_calendar/compiled_data"] +compiled_data = ["dep:icu_time_data", "icu_calendar/compiled_data"] diff --git a/components/timezone/LICENSE b/components/time/LICENSE similarity index 100% rename from components/timezone/LICENSE rename to components/time/LICENSE diff --git a/components/time/README.md b/components/time/README.md new file mode 100644 index 00000000000..d2738ec72b9 --- /dev/null +++ b/components/time/README.md @@ -0,0 +1,11 @@ +# icu_time [![crates.io](https://img.shields.io/crates/v/icu_time)](https://crates.io/crates/icu_time) + + + +TODO + + + +## More Information + +For more information on development, authorship, contributing etc. please visit [`ICU4X home page`](https://github.com/unicode-org/icu4x). diff --git a/components/timezone/src/error.rs b/components/time/src/error.rs similarity index 100% rename from components/timezone/src/error.rs rename to components/time/src/error.rs diff --git a/components/timezone/src/ids.rs b/components/time/src/ids.rs similarity index 78% rename from components/timezone/src/ids.rs rename to components/time/src/ids.rs index 907a08c5919..88348977898 100644 --- a/components/timezone/src/ids.rs +++ b/components/time/src/ids.rs @@ -15,7 +15,7 @@ use crate::{ provider::names::{ Bcp47ToIanaMap, Bcp47ToIanaMapV1, IanaToBcp47Map, IanaToBcp47MapV3, NON_REGION_CITY_PREFIX, }, - TimeZoneBcp47Id, + TimeZone, }; /// A mapper between IANA time zone identifiers and BCP-47 time zone identifiers. @@ -54,33 +54,33 @@ use crate::{ /// /// Normalization is a cheap operation, but canonicalization might be expensive, since it might /// require searching over all IANA IDs to find the canonicalization. If you need -/// canonicalization that is reliably fast, use [`TimeZoneIdMapperWithFastCanonicalization`]. +/// canonicalization that is reliably fast, use [`IanaParserExtended`]. /// /// # Examples /// /// ``` -/// use icu::timezone::TimeZoneBcp47Id; -/// use icu::timezone::TimeZoneIdMapper; +/// use icu::time::TimeZone; +/// use icu::time::zone::IanaParser; /// use tinystr::tinystr; /// -/// let mapper = TimeZoneIdMapper::new(); +/// let mapper = IanaParser::new(); /// /// // The IANA zone "Australia/Melbourne" is the BCP-47 zone "aumel": /// assert_eq!( /// mapper.iana_to_bcp47("Australia/Melbourne"), -/// TimeZoneBcp47Id(tinystr!(8, "aumel")) +/// TimeZone(tinystr!(8, "aumel")) /// ); /// /// // Lookup is ASCII-case-insensitive: /// assert_eq!( /// mapper.iana_to_bcp47("australia/melbourne"), -/// TimeZoneBcp47Id(tinystr!(8, "aumel")) +/// TimeZone(tinystr!(8, "aumel")) /// ); /// /// // The IANA zone "Australia/Victoria" is an alias: /// assert_eq!( /// mapper.iana_to_bcp47("Australia/Victoria"), -/// TimeZoneBcp47Id(tinystr!(8, "aumel")) +/// TimeZone(tinystr!(8, "aumel")) /// ); /// /// // The IANA zone "Australia/Boing_Boing" does not exist @@ -88,7 +88,7 @@ use crate::{ /// // timezone in order for this operation to be infallible: /// assert_eq!( /// mapper.iana_to_bcp47("Australia/Boing_Boing"), -/// TimeZoneBcp47Id::unknown() +/// TimeZone::unknown() /// ); /// /// // We can recover the canonical identifier from the mapper: @@ -98,23 +98,23 @@ use crate::{ /// ); /// ``` #[derive(Debug, Clone)] -pub struct TimeZoneIdMapper { +pub struct IanaParser { data: DataPayload, checksum: u64, } -impl TimeZoneIdMapper { - /// Creates a new [`TimeZoneIdMapper`] using compiled data. +impl IanaParser { + /// Creates a new [`IanaParser`] using compiled data. /// - /// See [`TimeZoneIdMapper`] for an example. + /// See [`IanaParser`] for an example. /// /// ✨ *Enabled with the `compiled_data` Cargo feature.* /// /// [📚 Help choosing a constructor](icu_provider::constructors) #[cfg(feature = "compiled_data")] #[allow(clippy::new_ret_no_self)] - pub fn new() -> TimeZoneIdMapperBorrowed<'static> { - TimeZoneIdMapperBorrowed::new() + pub fn new() -> IanaParserBorrowed<'static> { + IanaParserBorrowed::new() } icu_provider::gen_buffer_data_constructors!(() -> error: DataError, @@ -144,40 +144,40 @@ impl TimeZoneIdMapper { /// Returns a borrowed version of the mapper that can be queried. /// /// This avoids a small potential indirection cost when querying the mapper. - pub fn as_borrowed(&self) -> TimeZoneIdMapperBorrowed { - TimeZoneIdMapperBorrowed { + pub fn as_borrowed(&self) -> IanaParserBorrowed { + IanaParserBorrowed { data: self.data.get(), checksum: self.checksum, } } } -impl AsRef for TimeZoneIdMapper { +impl AsRef for IanaParser { #[inline] - fn as_ref(&self) -> &TimeZoneIdMapper { + fn as_ref(&self) -> &IanaParser { self } } /// A borrowed wrapper around the time zone ID mapper, returned by -/// [`TimeZoneIdMapper::as_borrowed()`]. More efficient to query. +/// [`IanaParser::as_borrowed()`]. More efficient to query. #[derive(Debug, Copy, Clone)] -pub struct TimeZoneIdMapperBorrowed<'a> { +pub struct IanaParserBorrowed<'a> { data: &'a IanaToBcp47Map<'a>, checksum: u64, } #[cfg(feature = "compiled_data")] -impl Default for TimeZoneIdMapperBorrowed<'static> { +impl Default for IanaParserBorrowed<'static> { fn default() -> Self { Self::new() } } -impl TimeZoneIdMapperBorrowed<'static> { - /// Creates a new [`TimeZoneIdMapperBorrowed`] using compiled data. +impl IanaParserBorrowed<'static> { + /// Creates a new [`IanaParserBorrowed`] using compiled data. /// - /// See [`TimeZoneIdMapperBorrowed`] for an example. + /// See [`IanaParserBorrowed`] for an example. /// /// ✨ *Enabled with the `compiled_data` Cargo feature.* /// @@ -190,31 +190,31 @@ impl TimeZoneIdMapperBorrowed<'static> { } } - /// Cheaply converts a [`TimeZoneIdMapperBorrowed<'static>`] into a [`TimeZoneIdMapper`]. + /// Cheaply converts a [`IanaParserBorrowed<'static>`] into a [`IanaParser`]. /// - /// Note: Due to branching and indirection, using [`TimeZoneIdMapper`] might inhibit some - /// compile-time optimizations that are possible with [`TimeZoneIdMapperBorrowed`]. - pub fn static_to_owned(&self) -> TimeZoneIdMapper { - TimeZoneIdMapper { + /// Note: Due to branching and indirection, using [`IanaParser`] might inhibit some + /// compile-time optimizations that are possible with [`IanaParserBorrowed`]. + pub fn static_to_owned(&self) -> IanaParser { + IanaParser { data: DataPayload::from_static_ref(self.data), checksum: self.checksum, } } } -impl TimeZoneIdMapperBorrowed<'_> { +impl IanaParserBorrowed<'_> { /// Gets the BCP-47 time zone ID from an IANA time zone ID /// with a case-insensitive lookup. /// - /// Returns [`TimeZoneBcp47Id::unknown()`] if the IANA ID is not found. + /// Returns [`TimeZone::unknown()`] if the IANA ID is not found. /// /// # Examples /// /// ``` - /// use icu_timezone::TimeZoneBcp47Id; - /// use icu_timezone::TimeZoneIdMapper; + /// use icu_time::TimeZone; + /// use icu_time::zone::iana::IanaParser; /// - /// let mapper = TimeZoneIdMapper::new(); + /// let mapper = IanaParser::new(); /// /// let result = mapper.iana_to_bcp47("Asia/CALCUTTA"); /// @@ -223,20 +223,20 @@ impl TimeZoneIdMapperBorrowed<'_> { /// // Unknown IANA time zone ID: /// assert_eq!( /// mapper.iana_to_bcp47("America/San_Francisco"), - /// TimeZoneBcp47Id::unknown() + /// TimeZone::unknown() /// ); /// ``` - pub fn iana_to_bcp47(&self, iana_id: &str) -> TimeZoneBcp47Id { + pub fn iana_to_bcp47(&self, iana_id: &str) -> TimeZone { self.iana_lookup_quick(iana_id) .and_then(|trie_value| self.data.bcp47_ids.get(trie_value.index())) - .unwrap_or(TimeZoneBcp47Id::unknown()) + .unwrap_or(TimeZone::unknown()) } /// Same as [`Self::iana_to_bcp47()`] but works with potentially ill-formed UTF-8. - pub fn iana_bytes_to_bcp47(&self, iana_id: &[u8]) -> TimeZoneBcp47Id { + pub fn iana_bytes_to_bcp47(&self, iana_id: &[u8]) -> TimeZone { self.iana_lookup_quick(iana_id) .and_then(|trie_value| self.data.bcp47_ids.get(trie_value.index())) - .unwrap_or(TimeZoneBcp47Id::unknown()) + .unwrap_or(TimeZone::unknown()) } /// Normalizes the syntax of an IANA time zone ID. @@ -248,11 +248,11 @@ impl TimeZoneIdMapperBorrowed<'_> { /// # Examples /// /// ``` - /// use icu_timezone::TimeZoneBcp47Id; - /// use icu_timezone::TimeZoneIdMapper; + /// use icu_time::TimeZone; + /// use icu_time::zone::iana::IanaParser; /// use std::borrow::Cow; /// - /// let mapper = TimeZoneIdMapper::new(); + /// let mapper = IanaParser::new(); /// /// let result = mapper.normalize_iana("Asia/CALCUTTA").unwrap(); /// @@ -268,7 +268,7 @@ impl TimeZoneIdMapperBorrowed<'_> { /// // Unknown IANA time zone ID: /// assert_eq!(mapper.normalize_iana("America/San_Francisco"), None); /// ``` - pub fn normalize_iana<'s>(&self, iana_id: &'s str) -> Option<(Cow<'s, str>, TimeZoneBcp47Id)> { + pub fn normalize_iana<'s>(&self, iana_id: &'s str) -> Option<(Cow<'s, str>, TimeZone)> { let (trie_value, string) = self.iana_lookup_with_normalization(iana_id, |_| {})?; let Some(bcp47_id) = self.data.bcp47_ids.get(trie_value.index()) else { debug_assert!(false, "index should be in range"); @@ -286,11 +286,11 @@ impl TimeZoneIdMapperBorrowed<'_> { /// # Examples /// /// ``` - /// use icu_timezone::TimeZoneBcp47Id; - /// use icu_timezone::TimeZoneIdMapper; + /// use icu_time::TimeZone; + /// use icu_time::zone::iana::IanaParser; /// use std::borrow::Cow; /// - /// let mapper = TimeZoneIdMapper::new(); + /// let mapper = IanaParser::new(); /// /// let result = mapper.canonicalize_iana("Asia/CALCUTTA").unwrap(); /// @@ -306,10 +306,7 @@ impl TimeZoneIdMapperBorrowed<'_> { /// // Unknown IANA time zone ID: /// assert_eq!(mapper.canonicalize_iana("America/San_Francisco"), None); /// ``` - pub fn canonicalize_iana<'s>( - &self, - iana_id: &'s str, - ) -> Option<(Cow<'s, str>, TimeZoneBcp47Id)> { + pub fn canonicalize_iana<'s>(&self, iana_id: &'s str) -> Option<(Cow<'s, str>, TimeZone)> { // Note: We collect the cursors into a stack so that we start probing // nearby the input IANA identifier. This should improve lookup time since // most renames share the same prefix like "Asia" or "Europe". @@ -341,34 +338,34 @@ impl TimeZoneIdMapperBorrowed<'_> { /// This function performs a linear search over all IANA IDs. If this is problematic, consider one of the /// following functions instead: /// - /// 1. [`TimeZoneIdMapperBorrowed::canonicalize_iana()`] + /// 1. [`IanaParserBorrowed::canonicalize_iana()`] /// is faster if you have an IANA ID. - /// 2. [`TimeZoneIdMapperWithFastCanonicalizationBorrowed::canonical_iana_from_bcp47()`] + /// 2. [`IanaParserExtendedBorrowed::canonical_iana_from_bcp47()`] /// is faster, but it requires loading additional data - /// (see [`TimeZoneIdMapperWithFastCanonicalization`]). + /// (see [`IanaParserExtended`]). /// /// Returns `None` if the BCP-47 ID is not found. /// /// # Examples /// /// ``` - /// use icu_timezone::TimeZoneBcp47Id; - /// use icu_timezone::TimeZoneIdMapper; + /// use icu_time::TimeZone; + /// use icu_time::zone::iana::IanaParser; /// use std::borrow::Cow; /// use tinystr::tinystr; /// - /// let mapper = TimeZoneIdMapper::new(); + /// let mapper = IanaParser::new(); /// - /// let bcp47_id = TimeZoneBcp47Id(tinystr!(8, "inccu")); + /// let bcp47_id = TimeZone(tinystr!(8, "inccu")); /// let result = mapper.find_canonical_iana_from_bcp47(bcp47_id).unwrap(); /// /// assert_eq!(result, "Asia/Kolkata"); /// /// // Unknown BCP-47 time zone ID: - /// let bcp47_id = TimeZoneBcp47Id(tinystr!(8, "ussfo")); + /// let bcp47_id = TimeZone(tinystr!(8, "ussfo")); /// assert_eq!(mapper.find_canonical_iana_from_bcp47(bcp47_id), None); /// ``` - pub fn find_canonical_iana_from_bcp47(&self, bcp47_id: TimeZoneBcp47Id) -> Option { + pub fn find_canonical_iana_from_bcp47(&self, bcp47_id: TimeZone) -> Option { let index = self.data.bcp47_ids.binary_search(&bcp47_id).ok()?; let stack = alloc::vec![(self.data.map.cursor(), 0, 0)]; let needle = IanaTrieValue::canonical_for_index(index); @@ -498,14 +495,14 @@ impl TimeZoneIdMapperBorrowed<'_> { /// Returns an iterator over BCP-47 time zone identifiers in alphabetical order. /// /// To iterate over canonical IANA time zone IDs, use - /// [`TimeZoneIdMapperWithFastCanonicalizationBorrowed::iter_canonical_iana()`]. + /// [`IanaParserExtendedBorrowed::iter_canonical_iana()`]. /// /// # Examples /// /// ``` - /// use icu::timezone::TimeZoneIdMapper; + /// use icu::time::zone::IanaParser; /// - /// let ids = TimeZoneIdMapper::new() + /// let ids = IanaParser::new() /// .iter_bcp47() /// .skip(30) /// .take(5) @@ -532,44 +529,44 @@ impl TimeZoneIdMapperBorrowed<'_> { /// An iterator over BCP-47 time zone identifiers. /// -/// See [`TimeZoneIdMapperBorrowed::iter_bcp47()`] +/// See [`IanaParserBorrowed::iter_bcp47()`] #[derive(Debug)] pub struct TimeZoneBcp47Iter<'a> { - inner: ZeroSliceIter<'a, TimeZoneBcp47Id>, + inner: ZeroSliceIter<'a, TimeZone>, } impl Iterator for TimeZoneBcp47Iter<'_> { - type Item = TimeZoneBcp47Id; + type Item = TimeZone; fn next(&mut self) -> Option { self.inner.next() } } -/// A mapper that supplements [`TimeZoneIdMapper`] with about 8 KB of additional data to +/// A mapper that supplements [`IanaParser`] with about 8 KB of additional data to /// improve the performance of canonical IANA ID lookup. /// -/// The data in [`TimeZoneIdMapper`] is optimized for IANA to BCP-47 lookup; the reverse +/// The data in [`IanaParser`] is optimized for IANA to BCP-47 lookup; the reverse /// requires a linear walk over all ~600 IANA identifiers. The data added here allows for /// constant-time mapping from BCP-47 to IANA. #[derive(Debug, Clone)] -pub struct TimeZoneIdMapperWithFastCanonicalization { +pub struct IanaParserExtended { inner: I, data: DataPayload, } -impl TimeZoneIdMapperWithFastCanonicalization { - /// Creates a new [`TimeZoneIdMapperWithFastCanonicalization`] using compiled data. +impl IanaParserExtended { + /// Creates a new [`IanaParserExtended`] using compiled data. /// - /// See [`TimeZoneIdMapperWithFastCanonicalization`] for an example. + /// See [`IanaParserExtended`] for an example. /// /// ✨ *Enabled with the `compiled_data` Cargo feature.* /// /// [📚 Help choosing a constructor](icu_provider::constructors) #[cfg(feature = "compiled_data")] #[allow(clippy::new_ret_no_self)] - pub fn new() -> TimeZoneIdMapperWithFastCanonicalizationBorrowed<'static> { - TimeZoneIdMapperWithFastCanonicalizationBorrowed::new() + pub fn new() -> IanaParserExtendedBorrowed<'static> { + IanaParserExtendedBorrowed::new() } icu_provider::gen_buffer_data_constructors!(() -> error: DataError, @@ -586,19 +583,19 @@ impl TimeZoneIdMapperWithFastCanonicalization { where P: DataProvider + DataProvider + ?Sized, { - let mapper = TimeZoneIdMapper::try_new_unstable(provider)?; + let mapper = IanaParser::try_new_unstable(provider)?; Self::try_new_with_mapper_unstable(provider, mapper) } } -impl TimeZoneIdMapperWithFastCanonicalization +impl IanaParserExtended where - I: AsRef, + I: AsRef, { - /// Creates a new [`TimeZoneIdMapperWithFastCanonicalization`] using compiled data - /// and a pre-existing [`TimeZoneIdMapper`], which can be borrowed. + /// Creates a new [`IanaParserExtended`] using compiled data + /// and a pre-existing [`IanaParser`], which can be borrowed. /// - /// See [`TimeZoneIdMapperWithFastCanonicalization`] for an example. + /// See [`IanaParserExtended`] for an example. /// /// ✨ *Enabled with the `compiled_data` Cargo feature.* /// @@ -644,16 +641,16 @@ where }) } - /// Gets the inner [`TimeZoneIdMapper`] for performing queries. - pub fn inner(&self) -> &TimeZoneIdMapper { + /// Gets the inner [`IanaParser`] for performing queries. + pub fn inner(&self) -> &IanaParser { self.inner.as_ref() } /// Returns a borrowed version of the mapper that can be queried. /// /// This avoids a small potential indirection cost when querying the mapper. - pub fn as_borrowed(&self) -> TimeZoneIdMapperWithFastCanonicalizationBorrowed { - TimeZoneIdMapperWithFastCanonicalizationBorrowed { + pub fn as_borrowed(&self) -> IanaParserExtendedBorrowed { + IanaParserExtendedBorrowed { inner: self.inner.as_ref().as_borrowed(), data: self.data.get(), } @@ -661,24 +658,24 @@ where } /// A borrowed wrapper around the time zone ID mapper, returned by -/// [`TimeZoneIdMapperWithFastCanonicalization::as_borrowed()`]. More efficient to query. +/// [`IanaParserExtended::as_borrowed()`]. More efficient to query. #[derive(Debug, Copy, Clone)] -pub struct TimeZoneIdMapperWithFastCanonicalizationBorrowed<'a> { - inner: TimeZoneIdMapperBorrowed<'a>, +pub struct IanaParserExtendedBorrowed<'a> { + inner: IanaParserBorrowed<'a>, data: &'a Bcp47ToIanaMap<'a>, } #[cfg(feature = "compiled_data")] -impl Default for TimeZoneIdMapperWithFastCanonicalizationBorrowed<'static> { +impl Default for IanaParserExtendedBorrowed<'static> { fn default() -> Self { Self::new() } } -impl TimeZoneIdMapperWithFastCanonicalizationBorrowed<'static> { - /// Creates a new [`TimeZoneIdMapperWithFastCanonicalizationBorrowed`] using compiled data. +impl IanaParserExtendedBorrowed<'static> { + /// Creates a new [`IanaParserExtendedBorrowed`] using compiled data. /// - /// See [`TimeZoneIdMapperWithFastCanonicalizationBorrowed`] for an example. + /// See [`IanaParserExtendedBorrowed`] for an example. /// /// ✨ *Enabled with the `compiled_data` Cargo feature.* /// @@ -690,26 +687,26 @@ impl TimeZoneIdMapperWithFastCanonicalizationBorrowed<'static> { == crate::provider::Baked::SINGLETON_BCP47_TO_IANA_MAP_V1_CHECKSUM, ); Self { - inner: TimeZoneIdMapperBorrowed::new(), + inner: IanaParserBorrowed::new(), data: crate::provider::Baked::SINGLETON_BCP47_TO_IANA_MAP_V1, } } - /// Cheaply converts a [`TimeZoneIdMapperWithFastCanonicalizationBorrowed<'static>`] into a [`TimeZoneIdMapperWithFastCanonicalization`]. + /// Cheaply converts a [`IanaParserExtendedBorrowed<'static>`] into a [`IanaParserExtended`]. /// - /// Note: Due to branching and indirection, using [`TimeZoneIdMapperWithFastCanonicalization`] might inhibit some - /// compile-time optimizations that are possible with [`TimeZoneIdMapperWithFastCanonicalizationBorrowed`]. - pub fn static_to_owned(&self) -> TimeZoneIdMapperWithFastCanonicalization { - TimeZoneIdMapperWithFastCanonicalization { + /// Note: Due to branching and indirection, using [`IanaParserExtended`] might inhibit some + /// compile-time optimizations that are possible with [`IanaParserExtendedBorrowed`]. + pub fn static_to_owned(&self) -> IanaParserExtended { + IanaParserExtended { inner: self.inner.static_to_owned(), data: DataPayload::from_static_ref(self.data), } } } -impl<'a> TimeZoneIdMapperWithFastCanonicalizationBorrowed<'a> { - /// Gets the inner [`TimeZoneIdMapperBorrowed`] for performing queries. - pub fn inner(&self) -> TimeZoneIdMapperBorrowed<'a> { +impl<'a> IanaParserExtendedBorrowed<'a> { + /// Gets the inner [`IanaParserBorrowed`] for performing queries. + pub fn inner(&self) -> IanaParserBorrowed<'a> { self.inner } @@ -717,20 +714,20 @@ impl<'a> TimeZoneIdMapperWithFastCanonicalizationBorrowed<'a> { /// /// Also returns the BCP-47 time zone ID. /// - /// This is a faster version of [`TimeZoneIdMapperBorrowed::canonicalize_iana()`] + /// This is a faster version of [`IanaParserBorrowed::canonicalize_iana()`] /// and it always returns borrowed IANA strings, but it requires loading additional data - /// (see [`TimeZoneIdMapperWithFastCanonicalization`]). + /// (see [`IanaParserExtended`]). /// /// Returns `None` if the IANA ID is not found. /// /// # Examples /// /// ``` - /// use icu_timezone::TimeZoneBcp47Id; - /// use icu_timezone::TimeZoneIdMapperWithFastCanonicalization; + /// use icu_time::TimeZone; + /// use icu_time::zone::iana::IanaParserExtended; /// use std::borrow::Cow; /// - /// let mapper = TimeZoneIdMapperWithFastCanonicalization::new(); + /// let mapper = IanaParserExtended::new(); /// /// let result = mapper.canonicalize_iana("Asia/CALCUTTA").unwrap(); /// @@ -741,10 +738,7 @@ impl<'a> TimeZoneIdMapperWithFastCanonicalizationBorrowed<'a> { /// // Unknown IANA time zone ID: /// assert_eq!(mapper.canonicalize_iana("America/San_Francisco"), None); /// ``` - pub fn canonicalize_iana( - &self, - iana_id: &str, - ) -> Option<(TimeZoneIanaIdBorrowed, TimeZoneBcp47Id)> { + pub fn canonicalize_iana(&self, iana_id: &str) -> Option<(TimeZoneIanaIdBorrowed, TimeZone)> { let trie_value = self.inner.iana_lookup_quick(iana_id)?; let Some(bcp47_id) = self.inner.data.bcp47_ids.get(trie_value.index()) else { debug_assert!(false, "index should be in range"); @@ -759,36 +753,33 @@ impl<'a> TimeZoneIdMapperWithFastCanonicalizationBorrowed<'a> { /// Returns the canonical, normalized IANA ID of the given BCP-47 ID. /// - /// This is a faster version of [`TimeZoneIdMapperBorrowed::find_canonical_iana_from_bcp47()`] + /// This is a faster version of [`IanaParserBorrowed::find_canonical_iana_from_bcp47()`] /// and it always returns borrowed IANA strings, but it requires loading additional data - /// (see [`TimeZoneIdMapperWithFastCanonicalization`]). + /// (see [`IanaParserExtended`]). /// /// Returns `None` if the BCP-47 ID is not found. /// /// # Examples /// /// ``` - /// use icu_timezone::TimeZoneBcp47Id; - /// use icu_timezone::TimeZoneIdMapperWithFastCanonicalization; + /// use icu_time::TimeZone; + /// use icu_time::zone::iana::IanaParserExtended; /// use std::borrow::Cow; /// use tinystr::tinystr; /// - /// let mapper = TimeZoneIdMapperWithFastCanonicalization::new(); + /// let mapper = IanaParserExtended::new(); /// - /// let bcp47_id = TimeZoneBcp47Id(tinystr!(8, "inccu")); + /// let bcp47_id = TimeZone(tinystr!(8, "inccu")); /// let result = mapper.canonical_iana_from_bcp47(bcp47_id).unwrap(); /// /// // The Cow is always returned borrowed: /// assert_eq!(result, "Asia/Kolkata"); /// /// // Unknown BCP-47 time zone ID: - /// let bcp47_id = TimeZoneBcp47Id(tinystr!(8, "ussfo")); + /// let bcp47_id = TimeZone(tinystr!(8, "ussfo")); /// assert_eq!(mapper.canonical_iana_from_bcp47(bcp47_id), None); /// ``` - pub fn canonical_iana_from_bcp47( - &self, - bcp47_id: TimeZoneBcp47Id, - ) -> Option { + pub fn canonical_iana_from_bcp47(&self, bcp47_id: TimeZone) -> Option { let index = self.inner.data.bcp47_ids.binary_search(&bcp47_id).ok()?; let Some(string) = self.data.canonical_iana_ids.get(index) else { debug_assert!(false, "index should be in range"); @@ -799,14 +790,14 @@ impl<'a> TimeZoneIdMapperWithFastCanonicalizationBorrowed<'a> { /// Returns an iterator over all canonical IANA time zone identifiers in an arbitrary, unstable order. /// - /// To iterate over BCP-47 IDs, use [`TimeZoneIdMapperBorrowed::iter_bcp47()`]. + /// To iterate over BCP-47 IDs, use [`IanaParserBorrowed::iter_bcp47()`]. /// /// # Examples /// /// ``` - /// use icu::timezone::TimeZoneIdMapperWithFastCanonicalization; + /// use icu::time::zone::iana::IanaParserExtended; /// - /// let ids = TimeZoneIdMapperWithFastCanonicalization::new() + /// let ids = IanaParserExtended::new() /// .iter_canonical_iana() /// .skip(30) /// .take(5) @@ -833,7 +824,7 @@ impl<'a> TimeZoneIdMapperWithFastCanonicalizationBorrowed<'a> { /// An iterator over canonical IANA time zone identifiers. /// -/// See [`TimeZoneIdMapperWithFastCanonicalizationBorrowed::iter_canonical_iana()`] +/// See [`IanaParserExtendedBorrowed::iter_canonical_iana()`] #[derive(Debug)] pub struct TimeZoneCanonicalIanaIter<'a> { inner: VarZeroSliceIter<'a, str>, diff --git a/components/timezone/src/ixdtf.rs b/components/time/src/ixdtf.rs similarity index 89% rename from components/timezone/src/ixdtf.rs rename to components/time/src/ixdtf.rs index c45f1fdbaa8..daf2ffc0841 100644 --- a/components/timezone/src/ixdtf.rs +++ b/components/time/src/ixdtf.rs @@ -3,8 +3,8 @@ // (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). use crate::{ - time_zone::models, DateTime, InvalidOffsetError, Time, TimeZoneBcp47Id, - TimeZoneIdMapperBorrowed, TimeZoneInfo, UtcOffset, ZoneOffsetCalculator, ZonedDateTime, + zone::{iana::IanaParserBorrowed, models, UtcOffset, UtcOffsetCalculator}, + DateTime, InvalidOffsetError, Time, TimeZone, TimeZoneInfo, ZonedDateTime, }; use core::str::FromStr; use icu_calendar::{AnyCalendarKind, AsCalendar, Date, DateError, Iso, RangeError}; @@ -19,7 +19,7 @@ use ixdtf::{ ParseError as IxdtfParseError, }; -/// The error type for parsing IXDTF syntax strings in `icu_timezone`. +/// The error type for parsing IXDTF syntax strings in `icu_time`. #[derive(Debug, PartialEq, displaydoc::Display)] #[non_exhaustive] pub enum ParseError { @@ -35,7 +35,7 @@ pub enum ParseError { /// There were missing fields required to parse component. MissingFields, /// There were two offsets provided that were not consistent with each other. - InconsistentTimeZoneOffsets, + InconsistentTimeUtcOffsets, /// There was an invalid Offset. InvalidOffsetError, /// The set of time zone fields was not expected for the given type. @@ -53,17 +53,17 @@ pub enum ParseError { /// # Example /// ``` /// use icu::calendar::Iso; - /// use icu::timezone::{ZonedDateTime, ParseError, TimeZoneIdMapper}; + /// use icu::time::{ZonedDateTime, ParseError, zone::IanaParser}; /// /// // This timestamp is in UTC, and requires a time zone calculation in order to display a Zurich time. /// assert_eq!( - /// ZonedDateTime::try_loose_from_str("2024-08-12T12:32:00Z[Europe/Zurich]", Iso, TimeZoneIdMapper::new()).unwrap_err(), + /// ZonedDateTime::try_loose_from_str("2024-08-12T12:32:00Z[Europe/Zurich]", Iso, IanaParser::new()).unwrap_err(), /// ParseError::RequiresCalculation, /// ); /// /// // These timestamps are in local time - /// ZonedDateTime::try_loose_from_str("2024-08-12T14:32:00+02:00[Europe/Zurich]", Iso, TimeZoneIdMapper::new()).unwrap(); - /// ZonedDateTime::try_loose_from_str("2024-08-12T14:32:00[Europe/Zurich]", Iso, TimeZoneIdMapper::new()).unwrap(); + /// ZonedDateTime::try_loose_from_str("2024-08-12T14:32:00+02:00[Europe/Zurich]", Iso, IanaParser::new()).unwrap(); + /// ZonedDateTime::try_loose_from_str("2024-08-12T14:32:00[Europe/Zurich]", Iso, IanaParser::new()).unwrap(); /// ``` #[displaydoc( "A timezone calculation is required to interpret this string, which is not supported" @@ -171,7 +171,7 @@ impl<'a> Intermediate<'a> { .. } => { if offset != offset1 { - return Err(ParseError::InconsistentTimeZoneOffsets); + return Err(ParseError::InconsistentTimeUtcOffsets); } (Some(*offset), false, None) } @@ -262,7 +262,7 @@ impl<'a> Intermediate<'a> { fn location_only( self, - mapper: TimeZoneIdMapperBorrowed<'_>, + mapper: IanaParserBorrowed<'_>, ) -> Result, ParseError> { let None = self.offset else { return Err(ParseError::MismatchedTimeZoneFields); @@ -290,7 +290,7 @@ impl<'a> Intermediate<'a> { fn loose( self, - mapper: TimeZoneIdMapperBorrowed<'_>, + mapper: IanaParserBorrowed<'_>, ) -> Result, ParseError> { let time_zone_id = match self.iana_identifier { Some(iana_identifier) => { @@ -299,8 +299,8 @@ impl<'a> Intermediate<'a> { } mapper.iana_bytes_to_bcp47(iana_identifier) } - None if self.is_z => TimeZoneBcp47Id(tinystr::tinystr!(8, "utc")), - None => TimeZoneBcp47Id::unknown(), + None if self.is_z => TimeZone(tinystr::tinystr!(8, "utc")), + None => TimeZone::unknown(), }; let offset = match self.offset { Some(offset) => { @@ -327,8 +327,8 @@ impl<'a> Intermediate<'a> { fn full( self, - mapper: TimeZoneIdMapperBorrowed<'_>, - zone_offset_calculator: &ZoneOffsetCalculator, + mapper: IanaParserBorrowed<'_>, + zone_offset_calculator: &UtcOffsetCalculator, ) -> Result, ParseError> { let Some(offset) = self.offset else { return Err(ParseError::MismatchedTimeZoneFields); @@ -385,7 +385,7 @@ impl ZonedDateTime> { pub fn try_location_only_from_str( ixdtf_str: &str, calendar: A, - mapper: TimeZoneIdMapperBorrowed, + mapper: IanaParserBorrowed, ) -> Result { Self::try_location_only_from_utf8(ixdtf_str.as_bytes(), calendar, mapper) } @@ -396,7 +396,7 @@ impl ZonedDateTime> { pub fn try_location_only_from_utf8( ixdtf_str: &[u8], calendar: A, - mapper: TimeZoneIdMapperBorrowed, + mapper: IanaParserBorrowed, ) -> Result { let ixdtf_record = IxdtfParser::from_utf8(ixdtf_str).parse()?; let date = Date::try_from_ixdtf_record(&ixdtf_record, calendar)?; @@ -418,7 +418,7 @@ impl ZonedDateTime> { pub fn try_loose_from_str( ixdtf_str: &str, calendar: A, - mapper: TimeZoneIdMapperBorrowed, + mapper: IanaParserBorrowed, ) -> Result { Self::try_loose_from_utf8(ixdtf_str.as_bytes(), calendar, mapper) } @@ -429,7 +429,7 @@ impl ZonedDateTime> { pub fn try_loose_from_utf8( ixdtf_str: &[u8], calendar: A, - mapper: TimeZoneIdMapperBorrowed, + mapper: IanaParserBorrowed, ) -> Result { let ixdtf_record = IxdtfParser::from_utf8(ixdtf_str).parse()?; let date = Date::try_from_ixdtf_record(&ixdtf_record, calendar)?; @@ -455,16 +455,16 @@ impl ZonedDateTime> { /// /// ``` /// use icu_calendar::cal::Hebrew; - /// use icu_timezone::{ - /// ZonedDateTime, TimeZoneBcp47Id, TimeZoneInfo, UtcOffset, ZoneVariant, TimeZoneIdMapper, ZoneOffsetCalculator + /// use icu_time::{ + /// ZonedDateTime, TimeZone, TimeZoneInfo, zone::{UtcOffset, TimeZoneVariant, IanaParser, UtcOffsetCalculator} /// }; /// use tinystr::tinystr; /// /// let zoneddatetime = ZonedDateTime::try_from_str( /// "2024-08-08T12:08:19-05:00[America/Chicago][u-ca=hebrew]", /// Hebrew, - /// TimeZoneIdMapper::new(), - /// &ZoneOffsetCalculator::new(), + /// IanaParser::new(), + /// &UtcOffsetCalculator::new(), /// ) /// .unwrap(); /// @@ -478,16 +478,16 @@ impl ZonedDateTime> { /// assert_eq!(zoneddatetime.time.hour.number(), 12); /// assert_eq!(zoneddatetime.time.minute.number(), 8); /// assert_eq!(zoneddatetime.time.second.number(), 19); - /// assert_eq!(zoneddatetime.time.nanosecond.number(), 0); + /// assert_eq!(zoneddatetime.time.subsecond.number(), 0); /// assert_eq!( /// zoneddatetime.zone.time_zone_id(), - /// TimeZoneBcp47Id(tinystr!(8, "uschi")) + /// TimeZone(tinystr!(8, "uschi")) /// ); /// assert_eq!( /// zoneddatetime.zone.offset(), /// Some(UtcOffset::try_from_seconds(-18000).unwrap()) /// ); - /// assert_eq!(zoneddatetime.zone.zone_variant(), ZoneVariant::Daylight); + /// assert_eq!(zoneddatetime.zone.zone_variant(), TimeZoneVariant::Daylight); /// let (_, _) = zoneddatetime.zone.local_time(); /// ``` /// @@ -503,7 +503,7 @@ impl ZonedDateTime> { /// /// ``` /// use icu_calendar::Iso; - /// use icu_timezone::{ZonedDateTime, TimeZoneInfo, UtcOffset}; + /// use icu_time::{ZonedDateTime, TimeZoneInfo, zone::UtcOffset}; /// /// let tz_from_offset = ZonedDateTime::try_offset_only_from_str("2024-08-08T12:08:19-05:00", Iso) /// .unwrap(); @@ -520,14 +520,14 @@ impl ZonedDateTime> { /// /// ``` /// use icu_calendar::Iso; - /// use icu_timezone::{ - /// ZonedDateTime, TimeZoneBcp47Id, TimeZoneInfo, UtcOffset, ZoneVariant, TimeZoneIdMapper + /// use icu_time::{ + /// ZonedDateTime, TimeZone, TimeZoneInfo, zone::{UtcOffset, TimeZoneVariant, IanaParser} /// }; /// use tinystr::tinystr; /// /// let tz_from_offset_annotation = ZonedDateTime::try_offset_only_from_str("2024-08-08T12:08:19[-05:00]", Iso) /// .unwrap(); - /// let tz_from_iana_annotation = ZonedDateTime::try_location_only_from_str("2024-08-08T12:08:19[America/Chicago]", Iso, TimeZoneIdMapper::new()) + /// let tz_from_iana_annotation = ZonedDateTime::try_location_only_from_str("2024-08-08T12:08:19[America/Chicago]", Iso, IanaParser::new()) /// .unwrap(); /// /// assert_eq!( @@ -537,7 +537,7 @@ impl ZonedDateTime> { /// /// assert_eq!( /// tz_from_iana_annotation.zone.time_zone_id(), - /// TimeZoneBcp47Id(tinystr!(8, "uschi")) + /// TimeZone(tinystr!(8, "uschi")) /// ); /// assert_eq!(tz_from_iana_annotation.zone.offset(), None); /// ``` @@ -553,30 +553,30 @@ impl ZonedDateTime> { /// /// ``` /// use icu_calendar::Iso; - /// use icu_timezone::{TimeZoneInfo, ZonedDateTime, UtcOffset, TimeZoneBcp47Id, ZoneVariant, ParseError, TimeZoneIdMapper, ZoneOffsetCalculator}; + /// use icu_time::{TimeZoneInfo, ZonedDateTime, TimeZone, ParseError, zone::{UtcOffset, TimeZoneVariant, IanaParser, UtcOffsetCalculator}}; /// use tinystr::tinystr; /// - /// let consistent_tz_from_both = ZonedDateTime::try_from_str("2024-08-08T12:08:19-05:00[America/Chicago]", Iso, TimeZoneIdMapper::new(), &ZoneOffsetCalculator::new()).unwrap(); + /// let consistent_tz_from_both = ZonedDateTime::try_from_str("2024-08-08T12:08:19-05:00[America/Chicago]", Iso, IanaParser::new(), &UtcOffsetCalculator::new()).unwrap(); /// /// - /// assert_eq!(consistent_tz_from_both.zone.time_zone_id(), TimeZoneBcp47Id(tinystr!(8, "uschi"))); + /// assert_eq!(consistent_tz_from_both.zone.time_zone_id(), TimeZone(tinystr!(8, "uschi"))); /// assert_eq!(consistent_tz_from_both.zone.offset(), Some(UtcOffset::try_from_seconds(-18000).unwrap())); - /// assert_eq!(consistent_tz_from_both.zone.zone_variant(), ZoneVariant::Daylight); + /// assert_eq!(consistent_tz_from_both.zone.zone_variant(), TimeZoneVariant::Daylight); /// let (_, _) = consistent_tz_from_both.zone.local_time(); /// /// // There is no name for America/Los_Angeles never at -05:00 (at least in 2024), so either the /// // time zone or the offset are wrong. /// // The only valid way to display this zoned datetime is "GMT-5", so we drop the time zone. /// assert_eq!( - /// ZonedDateTime::try_from_str("2024-08-08T12:08:19-05:00[America/Los_Angeles]", Iso, TimeZoneIdMapper::new(), &ZoneOffsetCalculator::new()) + /// ZonedDateTime::try_from_str("2024-08-08T12:08:19-05:00[America/Los_Angeles]", Iso, IanaParser::new(), &UtcOffsetCalculator::new()) /// .unwrap().zone.time_zone_id(), - /// TimeZoneBcp47Id::unknown() + /// TimeZone::unknown() /// ); /// /// // We don't know that America/Los_Angeles didn't use standard time (-08:00) in August, but we have a /// // name for Los Angeles at -8 (Pacific Standard Time), so this parses successfully. /// assert!( - /// ZonedDateTime::try_from_str("2024-08-08T12:08:19-08:00[America/Los_Angeles]", Iso, TimeZoneIdMapper::new(), &ZoneOffsetCalculator::new()).is_ok() + /// ZonedDateTime::try_from_str("2024-08-08T12:08:19-08:00[America/Los_Angeles]", Iso, IanaParser::new(), &UtcOffsetCalculator::new()).is_ok() /// ); /// ``` /// @@ -586,8 +586,8 @@ impl ZonedDateTime> { /// /// ``` /// use icu_calendar::Iso; - /// use icu_timezone::{ - /// ZonedDateTime, ParseError, TimeZoneBcp47Id, TimeZoneInfo, UtcOffset, + /// use icu_time::{ + /// ZonedDateTime, ParseError, TimeZone, TimeZoneInfo, zone::UtcOffset, /// }; /// use tinystr::tinystr; /// @@ -605,14 +605,14 @@ impl ZonedDateTime> { /// /// assert!(matches!( /// inconsistent_tz_from_both, - /// Err(ParseError::InconsistentTimeZoneOffsets) + /// Err(ParseError::InconsistentTimeUtcOffsets) /// )); /// ``` pub fn try_from_str( ixdtf_str: &str, calendar: A, - mapper: TimeZoneIdMapperBorrowed, - offsets: &ZoneOffsetCalculator, + mapper: IanaParserBorrowed, + offsets: &UtcOffsetCalculator, ) -> Result { Self::try_from_utf8(ixdtf_str.as_bytes(), calendar, mapper, offsets) } @@ -623,8 +623,8 @@ impl ZonedDateTime> { pub fn try_from_utf8( ixdtf_str: &[u8], calendar: A, - mapper: TimeZoneIdMapperBorrowed, - offsets: &ZoneOffsetCalculator, + mapper: IanaParserBorrowed, + offsets: &UtcOffsetCalculator, ) -> Result { let ixdtf_record = IxdtfParser::from_utf8(ixdtf_str).parse()?; let date = Date::try_from_ixdtf_record(&ixdtf_record, calendar)?; @@ -654,7 +654,7 @@ impl DateTime { /// /// ``` /// use icu::calendar::cal::Hebrew; - /// use icu::timezone::DateTime; + /// use icu::time::DateTime; /// /// let datetime = /// DateTime::try_from_str("2024-07-17T16:01:17.045[u-ca=hebrew]", Hebrew).unwrap(); @@ -669,7 +669,7 @@ impl DateTime { /// assert_eq!(datetime.time.hour.number(), 16); /// assert_eq!(datetime.time.minute.number(), 1); /// assert_eq!(datetime.time.second.number(), 17); - /// assert_eq!(datetime.time.nanosecond.number(), 45000000); + /// assert_eq!(datetime.time.subsecond.number(), 45000000); /// ``` pub fn try_from_str(ixdtf_str: &str, calendar: A) -> Result { Self::try_from_utf8(ixdtf_str.as_bytes(), calendar) @@ -698,14 +698,14 @@ impl Time { /// # Examples /// /// ``` - /// use icu::timezone::Time; + /// use icu::time::Time; /// /// let time = Time::try_from_str("16:01:17.045").unwrap(); /// /// assert_eq!(time.hour.number(), 16); /// assert_eq!(time.minute.number(), 1); /// assert_eq!(time.second.number(), 17); - /// assert_eq!(time.nanosecond.number(), 45000000); + /// assert_eq!(time.subsecond.number(), 45000000); /// ``` pub fn try_from_str(ixdtf_str: &str) -> Result { Self::try_from_utf8(ixdtf_str.as_bytes()) @@ -743,7 +743,7 @@ impl FromStr for Time { #[cfg(test)] mod test { use super::*; - use crate::TimeZoneBcp47Id; + use crate::TimeZone; #[test] fn max_possible_ixdtf_utc_offset() { @@ -774,10 +774,10 @@ mod test { let result = ZonedDateTime::try_loose_from_str( "2024-08-08T12:08:19[Future/Zone]", Iso, - TimeZoneIdMapperBorrowed::new(), + IanaParserBorrowed::new(), ) .unwrap(); - assert_eq!(result.zone.time_zone_id(), TimeZoneBcp47Id::unknown()); + assert_eq!(result.zone.time_zone_id(), TimeZone::unknown()); assert_eq!(result.zone.offset(), None); } @@ -786,7 +786,7 @@ mod test { ZonedDateTime::try_location_only_from_str( "2024-10-18T15:44[America/Los_Angeles]", icu_calendar::cal::Gregorian, - crate::TimeZoneIdMapper::new(), + IanaParserBorrowed::new(), ) .unwrap(); } diff --git a/components/time/src/lib.rs b/components/time/src/lib.rs new file mode 100644 index 00000000000..e05c19a314b --- /dev/null +++ b/components/time/src/lib.rs @@ -0,0 +1,155 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +// https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations +#![cfg_attr(not(any(test, doc)), no_std)] +#![cfg_attr( + not(test), + deny( + clippy::indexing_slicing, + clippy::unwrap_used, + clippy::expect_used, + clippy::panic, + clippy::exhaustive_structs, + clippy::exhaustive_enums, + clippy::trivially_copy_pass_by_ref, + missing_debug_implementations, + ) +)] +#![warn(missing_docs)] + +//! TODO + +extern crate alloc; + +mod error; +mod ids; +#[cfg(feature = "ixdtf")] +mod ixdtf; +pub mod provider; +pub mod scaffold; +mod time_zone; +mod types; +mod windows_tz; +mod zone_offset; + +pub use error::InvalidOffsetError; +#[cfg(feature = "ixdtf")] +pub use ixdtf::ParseError; + +pub use provider::TimeZone; +pub use time_zone::TimeZoneInfo; + +pub use types::{DateTime, Hour, Minute, Nanosecond, Second, Time, ZonedDateTime}; + +pub mod zone { + //! Types for resolving and manipulating time zones. + //! + //! # Fields + //! + //! In ICU4X, a [formattable time zone](super::TimeZoneInfo) consists of up to four different fields: + //! + //! 1. The time zone ID + //! 2. The offset from UTC + //! 3. A timestamp, as time zone names can change over time + //! 4. The zone variant, representing concepts such as Standard, Summer, Daylight, and Ramadan time + //! + //! ## Time Zone + //! + //! The time zone ID corresponds to a time zone from the time zone database. The time zone ID + //! usually corresponds to the largest city in the time zone. + //! + //! There are two mostly-interchangeable standards for time zone IDs: + //! + //! 1. IANA time zone IDs, like `"America/Chicago"` + //! 2. BCP-47 time zone IDs, like `"uschi"` + //! + //! ICU4X uses BCP-47 time zone IDs for all of its APIs. To get a BCP-47 time zone from an + //! IANA time zone, use [`IanaParser`]. + //! + //! ## UTC Offset + //! + //! The UTC offset precisely states the time difference between the time zone in question and + //! Coordinated Universal Time (UTC). + //! + //! In localized strings, it is often rendered as "UTC-6", meaning 6 hours less than UTC (some locales + //! use the term "GMT" instead of "UTC"). + //! + //! ## Timestamp + //! + //! Some time zones change names over time, such as when changing "metazone". For example, Portugal changed from + //! "Western European Time" to "Central European Time" and back in the 1990s, without changing time zone id + //! (`Europe/Lisbon`/`ptlis`). Therefore, a timestamp is needed to resolve such generic time zone names. + //! + //! It is not required to set the timestamp on [`TimeZoneInfo`](super::TimeZoneInfo). If it is not set, some string + //! formats may be unsupported. + //! + //! ## Zone Variant + //! + //! Many zones use different names and offsets in the summer than in the winter. In ICU4X, + //! this is called the _zone variant_. + //! + //! CLDR has two zone variants, named `"standard"` and `"daylight"`. However, the mapping of these + //! variants to specific observed offsets varies from time zone to time zone, and they may not + //! consistently represent winter versus summer time. + //! + //! Note: It is not required to set the zone variant on [`TimeZoneInfo`](super::TimeZoneInfo). If it is not set, some string + //! formats may be unsupported. + //! + //! # Examples + //! + //! ``` + //! use icu::calendar::Date; + //! use icu::time::Time; + //! use icu::time::TimeZone; + //! use icu::time::zone::IanaParser; + //! use icu::time::zone::TimeZoneVariant; + //! use tinystr::tinystr; + //! + //! // Parse the IANA ID + //! let id = IanaParser::new().iana_to_bcp47("America/Chicago"); + //! + //! // Alternatively, use the BCP47 ID directly + //! let id = TimeZone(tinystr!(8, "uschi")); + //! + //! // Create a TimeZoneInfo by associating the ID with an offset + //! let time_zone = id.with_offset("-0600".parse().ok()); + //! + //! // Extend to a TimeZoneInfo by adding a local time + //! let time_zone_at_time = time_zone + //! .at_time((Date::try_new_iso(2023, 12, 2).unwrap(), Time::midnight())); + //! + //! // Extend to a TimeZoneInfo by adding a zone variant + //! let time_zone_with_variant = + //! time_zone_at_time.with_zone_variant(TimeZoneVariant::Standard); + //! ``` + + pub use crate::types::TimeZoneVariant; + pub use crate::types::UtcOffset; + pub use crate::zone_offset::UtcOffsetCalculator; + pub use crate::zone_offset::UtcOffsets; + + pub use iana::IanaParser; + pub use windows::WindowsTimeZoneMapper; + + /// TODO + pub mod models { + pub use crate::time_zone::models::*; + pub use crate::time_zone::TimeZoneModel; + } + + /// TODO + pub mod iana { + pub use crate::ids::{ + IanaParser, IanaParserBorrowed, IanaParserExtended, IanaParserExtendedBorrowed, + TimeZoneBcp47Iter, TimeZoneCanonicalIanaIter, + }; + } + + /// TODO + pub mod windows { + pub use crate::windows_tz::WindowsTimeZoneMapper; + pub use crate::windows_tz::WindowsTimeZoneMapperBorrowed; + } +} diff --git a/components/timezone/src/provider.rs b/components/time/src/provider.rs similarity index 85% rename from components/timezone/src/provider.rs rename to components/time/src/provider.rs index 76e6264802b..f048e623580 100644 --- a/components/timezone/src/provider.rs +++ b/components/time/src/provider.rs @@ -39,9 +39,9 @@ pub struct Baked; #[cfg(feature = "compiled_data")] #[allow(unused_imports)] const _: () = { - use icu_timezone_data::*; + use icu_time_data::*; pub mod icu { - pub use crate as timezone; + pub use crate as time; } make_provider!(Baked); impl_bcp47_to_iana_map_v1!(Baked); @@ -69,11 +69,11 @@ pub const MARKERS: &[DataMarkerInfo] = &[ #[repr(transparent)] #[derive(Debug, Clone, Copy, Eq, Ord, PartialEq, PartialOrd, yoke::Yokeable, ULE, Hash)] #[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] -#[cfg_attr(feature = "datagen", databake(path = icu_timezone::provider))] +#[cfg_attr(feature = "datagen", databake(path = icu_time::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] -pub struct TimeZoneBcp47Id(pub TinyAsciiStr<8>); +pub struct TimeZone(pub TinyAsciiStr<8>); -impl TimeZoneBcp47Id { +impl TimeZone { /// The synthetic `Etc/Unknown` time zone. /// /// This is the result of parsing unknown zones. It's important that such parsing does not @@ -83,7 +83,7 @@ impl TimeZoneBcp47Id { } } -impl Deref for TimeZoneBcp47Id { +impl Deref for TimeZone { type Target = TinyAsciiStr<8>; fn deref(&self) -> &Self::Target { @@ -91,7 +91,7 @@ impl Deref for TimeZoneBcp47Id { } } -impl AsULE for TimeZoneBcp47Id { +impl AsULE for TimeZone { type ULE = Self; #[inline] @@ -105,18 +105,18 @@ impl AsULE for TimeZoneBcp47Id { } } -impl<'a> zerovec::maps::ZeroMapKV<'a> for TimeZoneBcp47Id { - type Container = ZeroVec<'a, TimeZoneBcp47Id>; - type Slice = ZeroSlice; - type GetType = TimeZoneBcp47Id; - type OwnedType = TimeZoneBcp47Id; +impl<'a> zerovec::maps::ZeroMapKV<'a> for TimeZone { + type Container = ZeroVec<'a, TimeZone>; + type Slice = ZeroSlice; + type GetType = TimeZone; + type OwnedType = TimeZone; } /// Storage type for storing UTC offsets as eights of an hour. pub type EighthsOfHourOffset = i8; /// Storage type for storing `DateTime` as minutes since [`EPOCH`]. -pub type IsoMinutesSinceEpoch = i32; -/// The epoch for [`IsoMinutesSinceEpoch`]. +pub type MinutesSinceEpoch = i32; +/// The epoch for [`MinutesSinceEpoch`]. /// /// This is 1970-01-01, but this is coincidental to anything UNIX and should be changed to 0 in the future. pub const EPOCH: RataDie = RataDie::new(719163); @@ -131,7 +131,7 @@ pub const EPOCH: RataDie = RataDie::new(719163); #[icu_provider::data_struct(marker(ZoneOffsetPeriodV1, "time_zone/offset_period@1", singleton))] #[derive(PartialEq, Debug, Clone, Default)] #[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] -#[cfg_attr(feature = "datagen", databake(path = icu_timezone::provider))] +#[cfg_attr(feature = "datagen", databake(path = icu_time::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] pub struct ZoneOffsetPeriod<'data>( @@ -141,10 +141,5 @@ pub struct ZoneOffsetPeriod<'data>( /// The values are the standard offset, and the daylight offset *relative to the standard offset*. As such, /// if the second value is 0, there is no daylight time. #[cfg_attr(feature = "serde", serde(borrow))] - pub ZeroMap2d< - 'data, - TimeZoneBcp47Id, - IsoMinutesSinceEpoch, - (EighthsOfHourOffset, EighthsOfHourOffset), - >, + pub ZeroMap2d<'data, TimeZone, MinutesSinceEpoch, (EighthsOfHourOffset, EighthsOfHourOffset)>, ); diff --git a/components/timezone/src/provider/names.rs b/components/time/src/provider/names.rs similarity index 92% rename from components/timezone/src/provider/names.rs rename to components/time/src/provider/names.rs index c9a8c2d57f8..c474994438d 100644 --- a/components/timezone/src/provider/names.rs +++ b/components/time/src/provider/names.rs @@ -12,7 +12,7 @@ //! //! Read more about data providers: [`icu_provider`] -use crate::TimeZoneBcp47Id; +use crate::TimeZone; use icu_provider::prelude::*; use zerotrie::ZeroAsciiIgnoreCaseTrie; use zerovec::{VarZeroVec, ZeroVec}; @@ -45,7 +45,7 @@ pub const NON_REGION_CITY_PREFIX: u8 = b'_'; has_checksum ))] #[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] -#[cfg_attr(feature = "datagen", databake(path = icu_timezone::provider::names))] +#[cfg_attr(feature = "datagen", databake(path = icu_time::provider::names))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct IanaToBcp47Map<'data> { /// A map from normal-case IANA time zone identifiers to indexes of BCP-47 time zone @@ -62,9 +62,9 @@ pub struct IanaToBcp47Map<'data> { pub map: ZeroAsciiIgnoreCaseTrie>, /// A sorted list of BCP-47 time zone identifiers. #[cfg_attr(feature = "serde", serde(borrow))] - // Note: this is 9739B as `ZeroVec` (`ZeroVec`) + // Note: this is 9739B as `ZeroVec` (`ZeroVec`) // and 9335B as `VarZeroVec` - pub bcp47_ids: ZeroVec<'data, TimeZoneBcp47Id>, + pub bcp47_ids: ZeroVec<'data, TimeZone>, } /// A mapping from IANA time zone identifiers to BCP-47 time zone identifiers. @@ -86,7 +86,7 @@ pub struct IanaToBcp47Map<'data> { has_checksum ))] #[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] -#[cfg_attr(feature = "datagen", databake(path = icu_timezone::provider::names))] +#[cfg_attr(feature = "datagen", databake(path = icu_time::provider::names))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] pub struct Bcp47ToIanaMap<'data> { diff --git a/components/timezone/src/provider/windows.rs b/components/time/src/provider/windows.rs similarity index 91% rename from components/timezone/src/provider/windows.rs rename to components/time/src/provider/windows.rs index 3420bd6be1f..342f8fecdaf 100644 --- a/components/timezone/src/provider/windows.rs +++ b/components/time/src/provider/windows.rs @@ -16,7 +16,7 @@ use icu_provider::prelude::*; use zerotrie::ZeroTrieSimpleAscii; use zerovec::ZeroVec; -use super::TimeZoneBcp47Id; +use super::TimeZone; /// A mapping from Windows Timezone names to the corresponding BCP-47 IDs. /// @@ -32,7 +32,7 @@ use super::TimeZoneBcp47Id; singleton ))] #[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] -#[cfg_attr(feature = "datagen", databake(path = icu_timezone::provider::windows))] +#[cfg_attr(feature = "datagen", databake(path = icu_time::provider::windows))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct WindowsZonesToBcp47Map<'data> { /// A map from a `WindowsZoneIdentifier` and `WindowsRegion` to indexes of the associated BCP-47 time zone identifiers. @@ -41,5 +41,5 @@ pub struct WindowsZonesToBcp47Map<'data> { /// A sorted list of BCP-47 time zone identifiers. #[cfg_attr(feature = "serde", serde(borrow))] - pub bcp47_ids: ZeroVec<'data, TimeZoneBcp47Id>, + pub bcp47_ids: ZeroVec<'data, TimeZone>, } diff --git a/components/timezone/src/scaffold/into_option.rs b/components/time/src/scaffold/into_option.rs similarity index 86% rename from components/timezone/src/scaffold/into_option.rs rename to components/time/src/scaffold/into_option.rs index fe493804b39..4576fb9b33a 100644 --- a/components/timezone/src/scaffold/into_option.rs +++ b/components/time/src/scaffold/into_option.rs @@ -2,7 +2,10 @@ // called LICENSE at the top level of the ICU4X source tree // (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). -use crate::{types::*, TimeZoneBcp47Id, UtcOffset, ZoneVariant}; +use crate::{ + zone::{TimeZoneVariant, UtcOffset}, + Hour, Minute, Nanosecond, Second, Time, TimeZone, +}; use icu_calendar::{types::*, AnyCalendarKind, Date, Iso}; /// Converts Self to an `Option`, either `Some(T)` if able or `None` @@ -67,35 +70,35 @@ impl IntoOption for AnyCalendarKind { } } -impl IntoOption for IsoHour { +impl IntoOption for Hour { #[inline] fn into_option(self) -> Option { Some(self) } } -impl IntoOption for IsoMinute { +impl IntoOption for Minute { #[inline] fn into_option(self) -> Option { Some(self) } } -impl IntoOption for IsoSecond { +impl IntoOption for Second { #[inline] fn into_option(self) -> Option { Some(self) } } -impl IntoOption for NanoSecond { +impl IntoOption for Nanosecond { #[inline] fn into_option(self) -> Option { Some(self) } } -impl IntoOption for TimeZoneBcp47Id { +impl IntoOption for TimeZone { #[inline] fn into_option(self) -> Option { Some(self) @@ -109,7 +112,7 @@ impl IntoOption for UtcOffset { } } -impl IntoOption for ZoneVariant { +impl IntoOption for TimeZoneVariant { #[inline] fn into_option(self) -> Option { Some(self) diff --git a/components/timezone/src/scaffold/mod.rs b/components/time/src/scaffold/mod.rs similarity index 100% rename from components/timezone/src/scaffold/mod.rs rename to components/time/src/scaffold/mod.rs diff --git a/components/timezone/src/time_zone.rs b/components/time/src/time_zone.rs similarity index 79% rename from components/timezone/src/time_zone.rs rename to components/time/src/time_zone.rs index 62665cfdacf..24ff280ec5c 100644 --- a/components/timezone/src/time_zone.rs +++ b/components/time/src/time_zone.rs @@ -5,7 +5,9 @@ use core::fmt; use crate::{ - scaffold::IntoOption, Time, TimeZoneBcp47Id, UtcOffset, ZoneOffsetCalculator, ZoneVariant, + scaffold::IntoOption, + zone::{TimeZoneVariant, UtcOffset, UtcOffsetCalculator}, + Time, TimeZone, }; use icu_calendar::{Date, Iso}; @@ -21,7 +23,7 @@ mod private { /// pub trait TimeZoneModel: private::Sealed { /// The zone variant, if required for this time zone model. - type ZoneVariant: IntoOption + fmt::Debug + Copy; + type TimeZoneVariant: IntoOption + fmt::Debug + Copy; /// The local time, if required for this time zone model. type LocalTime: IntoOption<(Date, Time)> + fmt::Debug + Copy; } @@ -37,7 +39,7 @@ pub mod models { impl super::private::Sealed for Base {} impl TimeZoneModel for Base { - type ZoneVariant = (); + type TimeZoneVariant = (); type LocalTime = (); } @@ -48,7 +50,7 @@ pub mod models { impl super::private::Sealed for AtTime {} impl TimeZoneModel for AtTime { - type ZoneVariant = (); + type TimeZoneVariant = (); type LocalTime = (Date, Time); } @@ -59,7 +61,7 @@ pub mod models { impl super::private::Sealed for Full {} impl TimeZoneModel for Full { - type ZoneVariant = ZoneVariant; + type TimeZoneVariant = TimeZoneVariant; type LocalTime = (Date, Time); } } @@ -68,10 +70,10 @@ pub mod models { #[derive(Debug, PartialEq, Eq)] #[allow(clippy::exhaustive_structs)] // these four fields fully cover the needs of UTS 35 pub struct TimeZoneInfo { - time_zone_id: TimeZoneBcp47Id, + time_zone_id: TimeZone, offset: Option, local_time: Model::LocalTime, - zone_variant: Model::ZoneVariant, + zone_variant: Model::TimeZoneVariant, } impl Clone for TimeZoneInfo { @@ -84,7 +86,7 @@ impl Copy for TimeZoneInfo {} impl TimeZoneInfo { /// The BCP47 time-zone identifier. - pub fn time_zone_id(self) -> TimeZoneBcp47Id { + pub fn time_zone_id(self) -> TimeZone { self.time_zone_id } @@ -108,18 +110,18 @@ where impl TimeZoneInfo where - Model: TimeZoneModel, + Model: TimeZoneModel, { /// The time variant e.g. daylight or standard, if known. /// /// This field is not enforced to be consistent with the time zone id and offset. - pub fn zone_variant(self) -> ZoneVariant { + pub fn zone_variant(self) -> TimeZoneVariant { self.zone_variant } } -impl TimeZoneBcp47Id { - /// Associates this [`TimeZoneBcp47Id`] with a UTC offset, returning a [`TimeZoneInfo`]. +impl TimeZone { + /// Associates this [`TimeZone`] with a UTC offset, returning a [`TimeZoneInfo`]. pub const fn with_offset(self, offset: Option) -> TimeZoneInfo { TimeZoneInfo { offset, @@ -129,7 +131,7 @@ impl TimeZoneBcp47Id { } } - /// Converts this [`TimeZoneBcp47Id`] into a [`TimeZoneInfo`] without an offset. + /// Converts this [`TimeZone`] into a [`TimeZoneInfo`] without an offset. pub const fn without_offset(self) -> TimeZoneInfo { TimeZoneInfo { offset: None, @@ -143,12 +145,12 @@ impl TimeZoneBcp47Id { impl TimeZoneInfo { /// Creates a time zone info with no information. pub const fn unknown() -> Self { - TimeZoneBcp47Id::unknown().with_offset(None) + TimeZone::unknown().with_offset(None) } /// Creates a new [`TimeZoneInfo`] for the UTC time zone. pub const fn utc() -> Self { - TimeZoneBcp47Id(tinystr::tinystr!(8, "utc")).with_offset(Some(UtcOffset::zero())) + TimeZone(tinystr::tinystr!(8, "utc")).with_offset(Some(UtcOffset::zero())) } /// Sets a local time on this time zone. @@ -164,7 +166,10 @@ impl TimeZoneInfo { impl TimeZoneInfo { /// Sets a zone variant on this time zone. - pub const fn with_zone_variant(self, zone_variant: ZoneVariant) -> TimeZoneInfo { + pub const fn with_zone_variant( + self, + zone_variant: TimeZoneVariant, + ) -> TimeZoneInfo { TimeZoneInfo { offset: self.offset, time_zone_id: self.time_zone_id, @@ -173,38 +178,38 @@ impl TimeZoneInfo { } } - /// Sets the zone variant by calculating it using a [`ZoneOffsetCalculator`]. + /// Sets the zone variant by calculating it using a [`UtcOffsetCalculator`]. /// /// If `offset()` is `None`, or if it doesn't match either of the /// timezone's standard or daylight offset around `local_time()`, - /// the variant will be set to [`ZoneVariant::Standard`] and the time zone - /// to [`TimeZoneBcp47Id::unknown()`]. + /// the variant will be set to [`TimeZoneVariant::Standard`] and the time zone + /// to [`TimeZone::unknown()`]. pub fn infer_zone_variant( self, - calculator: &ZoneOffsetCalculator, + calculator: &UtcOffsetCalculator, ) -> TimeZoneInfo { let Some(offset) = self.offset else { - return TimeZoneBcp47Id::unknown() + return TimeZone::unknown() .with_offset(self.offset) .at_time(self.local_time) - .with_zone_variant(ZoneVariant::Standard); + .with_zone_variant(TimeZoneVariant::Standard); }; let Some(zone_variant) = calculator .compute_offsets_from_time_zone(self.time_zone_id, self.local_time) .and_then(|os| { if os.standard == offset { - Some(ZoneVariant::Standard) + Some(TimeZoneVariant::Standard) } else if os.daylight == Some(offset) { - Some(ZoneVariant::Daylight) + Some(TimeZoneVariant::Daylight) } else { None } }) else { - return TimeZoneBcp47Id::unknown() + return TimeZone::unknown() .with_offset(self.offset) .at_time(self.local_time) - .with_zone_variant(ZoneVariant::Standard); + .with_zone_variant(TimeZoneVariant::Standard); }; self.with_zone_variant(zone_variant) } @@ -222,9 +227,9 @@ impl TimeZoneInfo { /// If the TZDB build mode is unknown or variable, use [`Self::infer_zone_variant`]. pub const fn with_rearguard_isdst(self, isdst: bool) -> TimeZoneInfo { self.with_zone_variant(if isdst { - ZoneVariant::Daylight + TimeZoneVariant::Daylight } else { - ZoneVariant::Standard + TimeZoneVariant::Standard }) } } diff --git a/components/timezone/src/types.rs b/components/time/src/types.rs similarity index 93% rename from components/timezone/src/types.rs rename to components/time/src/types.rs index 3ca0af85e98..092225bed64 100644 --- a/components/timezone/src/types.rs +++ b/components/time/src/types.rs @@ -83,7 +83,7 @@ macro_rules! dt_unit { } dt_unit!( - IsoHour, + Hour, u8, 23, /// An ISO-8601 hour component, for use with ISO calendars. @@ -92,7 +92,7 @@ dt_unit!( ); dt_unit!( - IsoMinute, + Minute, u8, 59, /// An ISO-8601 minute component, for use with ISO calendars. @@ -101,7 +101,7 @@ dt_unit!( ); dt_unit!( - IsoSecond, + Second, u8, 60, /// An ISO-8601 second component, for use with ISO calendars. @@ -110,7 +110,7 @@ dt_unit!( ); dt_unit!( - NanoSecond, + Nanosecond, u32, 999_999_999, /// A fractional second component, stored as nanoseconds. @@ -123,41 +123,36 @@ dt_unit!( #[allow(clippy::exhaustive_structs)] // this type is stable pub struct Time { /// Hour - pub hour: IsoHour, + pub hour: Hour, /// Minute - pub minute: IsoMinute, + pub minute: Minute, /// Second - pub second: IsoSecond, + pub second: Second, - /// Fractional second - pub nanosecond: NanoSecond, + /// Subsecond + pub subsecond: Nanosecond, } impl Time { /// Construct a new [`Time`], without validating that all components are in range - pub const fn new( - hour: IsoHour, - minute: IsoMinute, - second: IsoSecond, - nanosecond: NanoSecond, - ) -> Self { + pub const fn new(hour: Hour, minute: Minute, second: Second, subsecond: Nanosecond) -> Self { Self { hour, minute, second, - nanosecond, + subsecond, } } /// Construct a new [`Time`] representing midnight (00:00.000) pub const fn midnight() -> Self { Self { - hour: IsoHour::zero(), - minute: IsoMinute::zero(), - second: IsoSecond::zero(), - nanosecond: NanoSecond::zero(), + hour: Hour::zero(), + minute: Minute::zero(), + second: Second::zero(), + subsecond: Nanosecond::zero(), } } @@ -167,7 +162,7 @@ impl Time { hour: hour.try_into()?, minute: minute.try_into()?, second: second.try_into()?, - nanosecond: nanosecond.try_into()?, + subsecond: nanosecond.try_into()?, }) } } @@ -218,7 +213,7 @@ impl UtcOffset { /// # Examples /// /// ``` - /// use icu::timezone::UtcOffset; + /// use icu::time::zone::UtcOffset; /// /// assert_eq!( /// UtcOffset::try_from_str("-0600").unwrap(), @@ -247,7 +242,7 @@ impl UtcOffset { /// # Examples /// /// ``` - /// use icu::timezone::UtcOffset; + /// use icu::time::zone::UtcOffset; /// /// let offset0: UtcOffset = UtcOffset::try_from_str("Z").unwrap(); /// let offset1: UtcOffset = UtcOffset::try_from_str("+05").unwrap(); @@ -373,13 +368,13 @@ use crate::TimeZoneInfo; /// * [`TimeZoneInfo::with_rearguard_isdst`] /// * [`TimeZoneInfo::infer_zone_variant`] #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[zerovec::make_ule(ZoneVariantULE)] +#[zerovec::make_ule(TimeZoneVariantULE)] #[repr(u8)] #[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] -#[cfg_attr(feature = "datagen", databake(path = icu_timezone))] +#[cfg_attr(feature = "datagen", databake(path = icu_time))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[non_exhaustive] -pub enum ZoneVariant { +pub enum TimeZoneVariant { /// The variant corresponding to `"standard"` in CLDR. /// /// The semantics vary from time zone to time zone. The time zone display diff --git a/components/timezone/src/windows_tz.rs b/components/time/src/windows_tz.rs similarity index 88% rename from components/timezone/src/windows_tz.rs rename to components/time/src/windows_tz.rs index 4b905c08105..ff8003a2bc8 100644 --- a/components/timezone/src/windows_tz.rs +++ b/components/time/src/windows_tz.rs @@ -11,7 +11,7 @@ use icu_provider::{ use crate::{ provider::windows::{WindowsZonesToBcp47Map, WindowsZonesToBcp47MapV1}, - TimeZoneBcp47Id, + TimeZone, }; /// A mapper between Windows time zone identifier and a BCP-47 ID. @@ -106,28 +106,28 @@ impl WindowsTimeZoneMapperBorrowed<'_> { /// /// ```rust /// use icu::locale::subtags::region; - /// use icu::timezone::{TimeZoneBcp47Id, WindowsTimeZoneMapper}; + /// use icu::time::{TimeZone, zone::WindowsTimeZoneMapper}; /// use tinystr::tinystr; /// /// let win_tz_mapper = WindowsTimeZoneMapper::new(); /// /// let bcp47_id = /// win_tz_mapper.windows_tz_to_bcp47_id("Central Standard Time", None); - /// assert_eq!(bcp47_id, Some(TimeZoneBcp47Id(tinystr!(8, "uschi")))); + /// assert_eq!(bcp47_id, Some(TimeZone(tinystr!(8, "uschi")))); /// /// let bcp47_id = win_tz_mapper /// .windows_tz_to_bcp47_id("Central Standard Time", Some(region!("US"))); - /// assert_eq!(bcp47_id, Some(TimeZoneBcp47Id(tinystr!(8, "uschi")))); + /// assert_eq!(bcp47_id, Some(TimeZone(tinystr!(8, "uschi")))); /// /// let bcp47_id = win_tz_mapper /// .windows_tz_to_bcp47_id("Central Standard Time", Some(region!("CA"))); - /// assert_eq!(bcp47_id, Some(TimeZoneBcp47Id(tinystr!(8, "cawnp")))); + /// assert_eq!(bcp47_id, Some(TimeZone(tinystr!(8, "cawnp")))); /// ``` pub fn windows_tz_to_bcp47_id( self, windows_tz: &str, region: Option, - ) -> Option { + ) -> Option { let mut cursor = self.data.map.cursor(); // Returns None if input is non-ASCII cursor.write_str(windows_tz).ok()?; @@ -150,15 +150,15 @@ mod tests { let win_map = WindowsTimeZoneMapper::new(); let result = win_map.windows_tz_to_bcp47_id("Central Standard Time", None); - assert_eq!(result, Some(TimeZoneBcp47Id(tinystr!(8, "uschi")))); + assert_eq!(result, Some(TimeZone(tinystr!(8, "uschi")))); let result = win_map.windows_tz_to_bcp47_id("Eastern Standard Time", None); - assert_eq!(result, Some(TimeZoneBcp47Id(tinystr!(8, "usnyc")))); + assert_eq!(result, Some(TimeZone(tinystr!(8, "usnyc")))); let result = win_map.windows_tz_to_bcp47_id("Eastern Standard Time", Some(region!("CA"))); - assert_eq!(result, Some(TimeZoneBcp47Id(tinystr!(8, "cator")))); + assert_eq!(result, Some(TimeZone(tinystr!(8, "cator")))); let result = win_map.windows_tz_to_bcp47_id("GMT Standard Time", None); - assert_eq!(result, Some(TimeZoneBcp47Id(tinystr!(8, "gblon")))); + assert_eq!(result, Some(TimeZone(tinystr!(8, "gblon")))); } } diff --git a/components/timezone/src/zone_offset.rs b/components/time/src/zone_offset.rs similarity index 83% rename from components/timezone/src/zone_offset.rs rename to components/time/src/zone_offset.rs index bc4a1195866..923bed8b2eb 100644 --- a/components/timezone/src/zone_offset.rs +++ b/components/time/src/zone_offset.rs @@ -3,28 +3,28 @@ // (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). use crate::provider::{ZoneOffsetPeriodV1, EPOCH}; -use crate::{Time, TimeZoneBcp47Id, UtcOffset}; +use crate::{zone::UtcOffset, Time, TimeZone}; use icu_calendar::Date; use icu_calendar::Iso; use icu_provider::prelude::*; -/// [`ZoneOffsetCalculator`] uses data from the [data provider] to calculate time zone offsets. +/// [`UtcOffsetCalculator`] uses data from the [data provider] to calculate time zone offsets. /// /// [data provider]: icu_provider #[derive(Debug)] -pub struct ZoneOffsetCalculator { +pub struct UtcOffsetCalculator { pub(super) offset_period: DataPayload, } #[cfg(feature = "compiled_data")] -impl Default for ZoneOffsetCalculator { +impl Default for UtcOffsetCalculator { fn default() -> Self { Self::new() } } -impl ZoneOffsetCalculator { - /// Constructs a `ZoneOffsetCalculator` using compiled data. +impl UtcOffsetCalculator { + /// Constructs a `UtcOffsetCalculator` using compiled data. /// /// ✨ *Enabled with the `compiled_data` Cargo feature.* /// @@ -32,7 +32,7 @@ impl ZoneOffsetCalculator { #[cfg(feature = "compiled_data")] #[inline] pub const fn new() -> Self { - ZoneOffsetCalculator { + UtcOffsetCalculator { offset_period: DataPayload::from_static_ref( crate::provider::Baked::SINGLETON_ZONE_OFFSET_PERIOD_V1, ), @@ -64,18 +64,18 @@ impl ZoneOffsetCalculator { /// /// ``` /// use icu::calendar::Date; - /// use icu::timezone::Time; - /// use icu::timezone::TimeZoneBcp47Id; - /// use icu::timezone::UtcOffset; - /// use icu::timezone::ZoneOffsetCalculator; + /// use icu::time::Time; + /// use icu::time::TimeZone; + /// use icu::time::zone::UtcOffset; + /// use icu::time::zone::UtcOffsetCalculator; /// use tinystr::tinystr; /// - /// let zoc = ZoneOffsetCalculator::new(); + /// let zoc = UtcOffsetCalculator::new(); /// /// // America/Denver observes DST /// let offsets = zoc /// .compute_offsets_from_time_zone( - /// TimeZoneBcp47Id(tinystr!(8, "usden")), + /// TimeZone(tinystr!(8, "usden")), /// (Date::try_new_iso(2024, 1, 1).unwrap(), Time::midnight()), /// ) /// .unwrap(); @@ -91,7 +91,7 @@ impl ZoneOffsetCalculator { /// // America/Phoenix does not /// let offsets = zoc /// .compute_offsets_from_time_zone( - /// TimeZoneBcp47Id(tinystr!(8, "usphx")), + /// TimeZone(tinystr!(8, "usphx")), /// (Date::try_new_iso(2024, 1, 1).unwrap(), Time::midnight()), /// ) /// .unwrap(); @@ -103,9 +103,9 @@ impl ZoneOffsetCalculator { /// ``` pub fn compute_offsets_from_time_zone( &self, - time_zone_id: TimeZoneBcp47Id, + time_zone_id: TimeZone, (date, time): (Date, Time), - ) -> Option { + ) -> Option { use zerovec::ule::AsULE; match self.offset_period.get().0.get0(&time_zone_id) { Some(cursor) => { @@ -120,7 +120,7 @@ impl ZoneOffsetCalculator { } } let offsets = offsets?; - Some(ZoneOffsets { + Some(UtcOffsets { standard: UtcOffset::from_eighths_of_hour(offsets.0), daylight: (offsets.1 != 0) .then_some(UtcOffset::from_eighths_of_hour(offsets.0 + offsets.1)), @@ -134,7 +134,7 @@ impl ZoneOffsetCalculator { /// Represents the different offsets in use for a time zone #[non_exhaustive] #[derive(Debug, Clone, Copy, PartialEq, PartialOrd, Eq, Ord)] -pub struct ZoneOffsets { +pub struct UtcOffsets { /// The standard offset. pub standard: UtcOffset, /// The daylight-saving offset, if used. diff --git a/components/timezone/README.md b/components/timezone/README.md deleted file mode 100644 index 7bf3ba6336f..00000000000 --- a/components/timezone/README.md +++ /dev/null @@ -1,90 +0,0 @@ -# icu_timezone [![crates.io](https://img.shields.io/crates/v/icu_timezone)](https://crates.io/crates/icu_timezone) - - - -Types for resolving and manipulating time zones. - -## Fields - -In ICU4X, a [formattable time zone](TimeZoneInfo) consists of up to four different fields: - -1. The time zone ID -2. The offset from UTC -3. A timestamp, as time zone names can change over time -4. The zone variant, representing concepts such as Standard, Summer, Daylight, and Ramadan time - -### Time Zone - -The time zone ID corresponds to a time zone from the time zone database. The time zone ID -usually corresponds to the largest city in the time zone. - -There are two mostly-interchangeable standards for time zone IDs: - -1. IANA time zone IDs, like `"America/Chicago"` -2. BCP-47 time zone IDs, like `"uschi"` - -ICU4X uses BCP-47 time zone IDs for all of its APIs. To get a BCP-47 time zone from an -IANA time zone, use [`TimeZoneIdMapper`]. - -### UTC Offset - -The UTC offset precisely states the time difference between the time zone in question and -Coordinated Universal Time (UTC). - -In localized strings, it is often rendered as "UTC-6", meaning 6 hours less than UTC (some locales -use the term "GMT" instead of "UTC"). - -### Timestamp - -Some time zones change names over time, such as when changing "metazone". For example, Portugal changed from -"Western European Time" to "Central European Time" and back in the 1990s, without changing time zone id -(`Europe/Lisbon`/`ptlis`). Therefore, a timestamp is needed to resolve such generic time zone names. - -It is not required to set the timestamp on [`TimeZoneInfo`]. If it is not set, some string -formats may be unsupported. - -### Zone Variant - -Many zones use different names and offsets in the summer than in the winter. In ICU4X, -this is called the _zone variant_. - -CLDR has two zone variants, named `"standard"` and `"daylight"`. However, the mapping of these -variants to specific observed offsets varies from time zone to time zone, and they may not -consistently represent winter versus summer time. - -Note: It is not required to set the zone variant on [`TimeZoneInfo`]. If it is not set, some string -formats may be unsupported. - -## Examples - -```rust -use icu::calendar::Date; -use icu::timezone::Time; -use icu::timezone::TimeZoneBcp47Id; -use icu::timezone::TimeZoneIdMapper; -use icu::timezone::ZoneVariant; -use tinystr::tinystr; - -// Parse the IANA ID -let id = TimeZoneIdMapper::new().iana_to_bcp47("America/Chicago"); - -// Alternatively, use the BCP47 ID directly -let id = TimeZoneBcp47Id(tinystr!(8, "uschi")); - -// Create a TimeZoneInfo by associating the ID with an offset -let time_zone = id.with_offset("-0600".parse().ok()); - -// Extend to a TimeZoneInfo by adding a local time -let time_zone_at_time = time_zone - .at_time((Date::try_new_iso(2023, 12, 2).unwrap(), Time::midnight())); - -// Extend to a TimeZoneInfo by adding a zone variant -let time_zone_with_variant = - time_zone_at_time.with_zone_variant(ZoneVariant::Standard); -``` - - - -## More Information - -For more information on development, authorship, contributing etc. please visit [`ICU4X home page`](https://github.com/unicode-org/icu4x). diff --git a/components/timezone/src/lib.rs b/components/timezone/src/lib.rs deleted file mode 100644 index 78a933714a2..00000000000 --- a/components/timezone/src/lib.rs +++ /dev/null @@ -1,132 +0,0 @@ -// This file is part of ICU4X. For terms of use, please see the file -// called LICENSE at the top level of the ICU4X source tree -// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). - -//! Types for resolving and manipulating time zones. -//! -//! # Fields -//! -//! In ICU4X, a [formattable time zone](TimeZoneInfo) consists of up to four different fields: -//! -//! 1. The time zone ID -//! 2. The offset from UTC -//! 3. A timestamp, as time zone names can change over time -//! 4. The zone variant, representing concepts such as Standard, Summer, Daylight, and Ramadan time -//! -//! ## Time Zone -//! -//! The time zone ID corresponds to a time zone from the time zone database. The time zone ID -//! usually corresponds to the largest city in the time zone. -//! -//! There are two mostly-interchangeable standards for time zone IDs: -//! -//! 1. IANA time zone IDs, like `"America/Chicago"` -//! 2. BCP-47 time zone IDs, like `"uschi"` -//! -//! ICU4X uses BCP-47 time zone IDs for all of its APIs. To get a BCP-47 time zone from an -//! IANA time zone, use [`TimeZoneIdMapper`]. -//! -//! ## UTC Offset -//! -//! The UTC offset precisely states the time difference between the time zone in question and -//! Coordinated Universal Time (UTC). -//! -//! In localized strings, it is often rendered as "UTC-6", meaning 6 hours less than UTC (some locales -//! use the term "GMT" instead of "UTC"). -//! -//! ## Timestamp -//! -//! Some time zones change names over time, such as when changing "metazone". For example, Portugal changed from -//! "Western European Time" to "Central European Time" and back in the 1990s, without changing time zone id -//! (`Europe/Lisbon`/`ptlis`). Therefore, a timestamp is needed to resolve such generic time zone names. -//! -//! It is not required to set the timestamp on [`TimeZoneInfo`]. If it is not set, some string -//! formats may be unsupported. -//! -//! ## Zone Variant -//! -//! Many zones use different names and offsets in the summer than in the winter. In ICU4X, -//! this is called the _zone variant_. -//! -//! CLDR has two zone variants, named `"standard"` and `"daylight"`. However, the mapping of these -//! variants to specific observed offsets varies from time zone to time zone, and they may not -//! consistently represent winter versus summer time. -//! -//! Note: It is not required to set the zone variant on [`TimeZoneInfo`]. If it is not set, some string -//! formats may be unsupported. -//! -//! # Examples -//! -//! ``` -//! use icu::calendar::Date; -//! use icu::timezone::Time; -//! use icu::timezone::TimeZoneBcp47Id; -//! use icu::timezone::TimeZoneIdMapper; -//! use icu::timezone::ZoneVariant; -//! use tinystr::tinystr; -//! -//! // Parse the IANA ID -//! let id = TimeZoneIdMapper::new().iana_to_bcp47("America/Chicago"); -//! -//! // Alternatively, use the BCP47 ID directly -//! let id = TimeZoneBcp47Id(tinystr!(8, "uschi")); -//! -//! // Create a TimeZoneInfo by associating the ID with an offset -//! let time_zone = id.with_offset("-0600".parse().ok()); -//! -//! // Extend to a TimeZoneInfo by adding a local time -//! let time_zone_at_time = time_zone -//! .at_time((Date::try_new_iso(2023, 12, 2).unwrap(), Time::midnight())); -//! -//! // Extend to a TimeZoneInfo by adding a zone variant -//! let time_zone_with_variant = -//! time_zone_at_time.with_zone_variant(ZoneVariant::Standard); -//! ``` - -// https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations -#![cfg_attr(not(any(test, doc)), no_std)] -#![cfg_attr( - not(test), - deny( - clippy::indexing_slicing, - clippy::unwrap_used, - clippy::expect_used, - clippy::panic, - clippy::exhaustive_structs, - clippy::exhaustive_enums, - clippy::trivially_copy_pass_by_ref, - missing_debug_implementations, - ) -)] -#![warn(missing_docs)] - -extern crate alloc; - -mod error; -mod ids; -pub mod provider; -pub mod scaffold; -mod time_zone; -/// TODO -pub mod types; -mod windows_tz; -mod zone_offset; - -#[cfg(feature = "ixdtf")] -mod ixdtf; - -pub use error::InvalidOffsetError; -pub use ids::{ - TimeZoneBcp47Iter, TimeZoneCanonicalIanaIter, TimeZoneIdMapper, TimeZoneIdMapperBorrowed, - TimeZoneIdMapperWithFastCanonicalization, TimeZoneIdMapperWithFastCanonicalizationBorrowed, -}; -pub use provider::TimeZoneBcp47Id; -pub use time_zone::models; -pub use time_zone::TimeZoneInfo; -pub use time_zone::TimeZoneModel; -pub use types::{DateTime, Time, UtcOffset, ZoneVariant, ZonedDateTime}; -pub use windows_tz::{WindowsTimeZoneMapper, WindowsTimeZoneMapperBorrowed}; -pub use zone_offset::{ZoneOffsetCalculator, ZoneOffsets}; - -#[cfg(feature = "ixdtf")] -pub use crate::ixdtf::ParseError; diff --git a/ffi/capi/Cargo.toml b/ffi/capi/Cargo.toml index d4dccb0fab4..c79be51ddd9 100644 --- a/ffi/capi/Cargo.toml +++ b/ffi/capi/Cargo.toml @@ -53,7 +53,7 @@ buffer_provider = [ "icu_provider/serde", "icu_provider_adapters/serde", "icu_segmenter?/serde", - "icu_timezone?/serde", + "icu_time?/serde", "icu_experimental?/serde", ] provider_fs = ["dep:icu_provider_fs", "buffer_provider", "std"] @@ -76,11 +76,11 @@ default_components = [ "timezone" ] -calendar = ["dep:icu_calendar", "dep:icu_timezone"] +calendar = ["dep:icu_calendar", "dep:icu_time"] casemap = ["dep:icu_casemap"] collator = ["dep:icu_collator"] # collections = ["dep:icu_collections"] # Not useful on its own: use properties -datetime = ["dep:icu_datetime", "dep:icu_calendar", "dep:icu_timezone", "dep:icu_decimal", "dep:icu_plurals", "icu_datetime?/experimental"] +datetime = ["dep:icu_datetime", "dep:icu_calendar", "dep:icu_time", "dep:icu_decimal", "dep:icu_plurals", "icu_datetime?/experimental"] decimal = ["dep:icu_decimal", "dep:fixed_decimal"] experimental = ["dep:icu_experimental"] list = ["dep:icu_list"] @@ -89,7 +89,7 @@ normalizer = ["dep:icu_normalizer", "icu_normalizer?/utf8_iter", "icu_normalizer plurals = ["dep:icu_plurals", "dep:fixed_decimal"] properties = ["dep:icu_properties", "dep:icu_collections", "dep:unicode-bidi"] segmenter = ["dep:icu_segmenter"] -timezone = ["dep:icu_timezone", "dep:icu_calendar"] +timezone = ["dep:icu_time", "dep:icu_calendar"] compiled_data = [ "icu_calendar?/compiled_data", @@ -103,7 +103,7 @@ compiled_data = [ "icu_plurals?/compiled_data", "icu_properties?/compiled_data", "icu_segmenter?/compiled_data", - "icu_timezone?/compiled_data", + "icu_time?/compiled_data", "icu_experimental?/compiled_data", ] @@ -141,7 +141,7 @@ icu_normalizer = { workspace = true, optional = true } icu_plurals = { workspace = true, optional = true } icu_properties = { workspace = true, features = ["alloc", "unicode_bidi"], optional = true } icu_segmenter = { workspace = true, features = ["auto"], optional = true } -icu_timezone = { workspace = true, features = ["ixdtf"], optional = true } +icu_time = { workspace = true, features = ["ixdtf"], optional = true } icu_experimental = { workspace = true, optional = true } # Optional ICU4X features (not components) diff --git a/ffi/capi/bindings/c/IanaParser.d.h b/ffi/capi/bindings/c/IanaParser.d.h new file mode 100644 index 00000000000..f697af801e2 --- /dev/null +++ b/ffi/capi/bindings/c/IanaParser.d.h @@ -0,0 +1,19 @@ +#ifndef IanaParser_D_H +#define IanaParser_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + + + + + +typedef struct IanaParser IanaParser; + + + + +#endif // IanaParser_D_H diff --git a/ffi/capi/bindings/c/IanaParser.h b/ffi/capi/bindings/c/IanaParser.h new file mode 100644 index 00000000000..f02c9c12f39 --- /dev/null +++ b/ffi/capi/bindings/c/IanaParser.h @@ -0,0 +1,43 @@ +#ifndef IanaParser_H +#define IanaParser_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + +#include "DataError.d.h" +#include "DataProvider.d.h" + +#include "IanaParser.d.h" + + + + + + +IanaParser* icu4x_IanaParser_create_mv1(void); + +typedef struct icu4x_IanaParser_create_with_provider_mv1_result {union {IanaParser* ok; DataError err;}; bool is_ok;} icu4x_IanaParser_create_with_provider_mv1_result; +icu4x_IanaParser_create_with_provider_mv1_result icu4x_IanaParser_create_with_provider_mv1(const DataProvider* provider); + +void icu4x_IanaParser_iana_to_bcp47_mv1(const IanaParser* self, DiplomatStringView value, DiplomatWrite* write); + +typedef struct icu4x_IanaParser_normalize_iana_mv1_result { bool is_ok;} icu4x_IanaParser_normalize_iana_mv1_result; +icu4x_IanaParser_normalize_iana_mv1_result icu4x_IanaParser_normalize_iana_mv1(const IanaParser* self, DiplomatStringView value, DiplomatWrite* write); + +typedef struct icu4x_IanaParser_canonicalize_iana_mv1_result { bool is_ok;} icu4x_IanaParser_canonicalize_iana_mv1_result; +icu4x_IanaParser_canonicalize_iana_mv1_result icu4x_IanaParser_canonicalize_iana_mv1(const IanaParser* self, DiplomatStringView value, DiplomatWrite* write); + +typedef struct icu4x_IanaParser_find_canonical_iana_from_bcp47_mv1_result { bool is_ok;} icu4x_IanaParser_find_canonical_iana_from_bcp47_mv1_result; +icu4x_IanaParser_find_canonical_iana_from_bcp47_mv1_result icu4x_IanaParser_find_canonical_iana_from_bcp47_mv1(const IanaParser* self, DiplomatStringView value, DiplomatWrite* write); + + +void icu4x_IanaParser_destroy_mv1(IanaParser* self); + + + + + +#endif // IanaParser_H diff --git a/ffi/capi/bindings/c/IanaParserExtended.d.h b/ffi/capi/bindings/c/IanaParserExtended.d.h new file mode 100644 index 00000000000..32d15a5240a --- /dev/null +++ b/ffi/capi/bindings/c/IanaParserExtended.d.h @@ -0,0 +1,19 @@ +#ifndef IanaParserExtended_D_H +#define IanaParserExtended_D_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + + + + + +typedef struct IanaParserExtended IanaParserExtended; + + + + +#endif // IanaParserExtended_D_H diff --git a/ffi/capi/bindings/c/IanaParserExtended.h b/ffi/capi/bindings/c/IanaParserExtended.h new file mode 100644 index 00000000000..54b96cad749 --- /dev/null +++ b/ffi/capi/bindings/c/IanaParserExtended.h @@ -0,0 +1,38 @@ +#ifndef IanaParserExtended_H +#define IanaParserExtended_H + +#include +#include +#include +#include +#include "diplomat_runtime.h" + +#include "DataError.d.h" +#include "DataProvider.d.h" + +#include "IanaParserExtended.d.h" + + + + + + +IanaParserExtended* icu4x_IanaParserExtended_create_mv1(void); + +typedef struct icu4x_IanaParserExtended_create_with_provider_mv1_result {union {IanaParserExtended* ok; DataError err;}; bool is_ok;} icu4x_IanaParserExtended_create_with_provider_mv1_result; +icu4x_IanaParserExtended_create_with_provider_mv1_result icu4x_IanaParserExtended_create_with_provider_mv1(const DataProvider* provider); + +typedef struct icu4x_IanaParserExtended_canonicalize_iana_mv1_result { bool is_ok;} icu4x_IanaParserExtended_canonicalize_iana_mv1_result; +icu4x_IanaParserExtended_canonicalize_iana_mv1_result icu4x_IanaParserExtended_canonicalize_iana_mv1(const IanaParserExtended* self, DiplomatStringView value, DiplomatWrite* write); + +typedef struct icu4x_IanaParserExtended_canonical_iana_from_bcp47_mv1_result { bool is_ok;} icu4x_IanaParserExtended_canonical_iana_from_bcp47_mv1_result; +icu4x_IanaParserExtended_canonical_iana_from_bcp47_mv1_result icu4x_IanaParserExtended_canonical_iana_from_bcp47_mv1(const IanaParserExtended* self, DiplomatStringView value, DiplomatWrite* write); + + +void icu4x_IanaParserExtended_destroy_mv1(IanaParserExtended* self); + + + + + +#endif // IanaParserExtended_H diff --git a/ffi/capi/bindings/c/Time.h b/ffi/capi/bindings/c/Time.h index cee2df66c8e..3829f52de08 100644 --- a/ffi/capi/bindings/c/Time.h +++ b/ffi/capi/bindings/c/Time.h @@ -18,7 +18,7 @@ typedef struct icu4x_Time_create_mv1_result {union {Time* ok; CalendarError err;}; bool is_ok;} icu4x_Time_create_mv1_result; -icu4x_Time_create_mv1_result icu4x_Time_create_mv1(uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond); +icu4x_Time_create_mv1_result icu4x_Time_create_mv1(uint8_t hour, uint8_t minute, uint8_t second, uint32_t subsecond); typedef struct icu4x_Time_from_string_mv1_result {union {Time* ok; CalendarParseError err;}; bool is_ok;} icu4x_Time_from_string_mv1_result; icu4x_Time_from_string_mv1_result icu4x_Time_from_string_mv1(DiplomatStringView v); @@ -32,7 +32,7 @@ uint8_t icu4x_Time_minute_mv1(const Time* self); uint8_t icu4x_Time_second_mv1(const Time* self); -uint32_t icu4x_Time_nanosecond_mv1(const Time* self); +uint32_t icu4x_Time_subsecond_mv1(const Time* self); void icu4x_Time_destroy_mv1(Time* self); diff --git a/ffi/capi/bindings/c/TimeZoneIdMapper.d.h b/ffi/capi/bindings/c/TimeZoneIdMapper.d.h deleted file mode 100644 index 5ac396be4a8..00000000000 --- a/ffi/capi/bindings/c/TimeZoneIdMapper.d.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef TimeZoneIdMapper_D_H -#define TimeZoneIdMapper_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" - - - - - -typedef struct TimeZoneIdMapper TimeZoneIdMapper; - - - - -#endif // TimeZoneIdMapper_D_H diff --git a/ffi/capi/bindings/c/TimeZoneIdMapper.h b/ffi/capi/bindings/c/TimeZoneIdMapper.h deleted file mode 100644 index de88f03a479..00000000000 --- a/ffi/capi/bindings/c/TimeZoneIdMapper.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef TimeZoneIdMapper_H -#define TimeZoneIdMapper_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" - -#include "DataError.d.h" -#include "DataProvider.d.h" - -#include "TimeZoneIdMapper.d.h" - - - - - - -TimeZoneIdMapper* icu4x_TimeZoneIdMapper_create_mv1(void); - -typedef struct icu4x_TimeZoneIdMapper_create_with_provider_mv1_result {union {TimeZoneIdMapper* ok; DataError err;}; bool is_ok;} icu4x_TimeZoneIdMapper_create_with_provider_mv1_result; -icu4x_TimeZoneIdMapper_create_with_provider_mv1_result icu4x_TimeZoneIdMapper_create_with_provider_mv1(const DataProvider* provider); - -void icu4x_TimeZoneIdMapper_iana_to_bcp47_mv1(const TimeZoneIdMapper* self, DiplomatStringView value, DiplomatWrite* write); - -typedef struct icu4x_TimeZoneIdMapper_normalize_iana_mv1_result { bool is_ok;} icu4x_TimeZoneIdMapper_normalize_iana_mv1_result; -icu4x_TimeZoneIdMapper_normalize_iana_mv1_result icu4x_TimeZoneIdMapper_normalize_iana_mv1(const TimeZoneIdMapper* self, DiplomatStringView value, DiplomatWrite* write); - -typedef struct icu4x_TimeZoneIdMapper_canonicalize_iana_mv1_result { bool is_ok;} icu4x_TimeZoneIdMapper_canonicalize_iana_mv1_result; -icu4x_TimeZoneIdMapper_canonicalize_iana_mv1_result icu4x_TimeZoneIdMapper_canonicalize_iana_mv1(const TimeZoneIdMapper* self, DiplomatStringView value, DiplomatWrite* write); - -typedef struct icu4x_TimeZoneIdMapper_find_canonical_iana_from_bcp47_mv1_result { bool is_ok;} icu4x_TimeZoneIdMapper_find_canonical_iana_from_bcp47_mv1_result; -icu4x_TimeZoneIdMapper_find_canonical_iana_from_bcp47_mv1_result icu4x_TimeZoneIdMapper_find_canonical_iana_from_bcp47_mv1(const TimeZoneIdMapper* self, DiplomatStringView value, DiplomatWrite* write); - - -void icu4x_TimeZoneIdMapper_destroy_mv1(TimeZoneIdMapper* self); - - - - - -#endif // TimeZoneIdMapper_H diff --git a/ffi/capi/bindings/c/TimeZoneIdMapperWithFastCanonicalization.d.h b/ffi/capi/bindings/c/TimeZoneIdMapperWithFastCanonicalization.d.h deleted file mode 100644 index 7021e96b997..00000000000 --- a/ffi/capi/bindings/c/TimeZoneIdMapperWithFastCanonicalization.d.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef TimeZoneIdMapperWithFastCanonicalization_D_H -#define TimeZoneIdMapperWithFastCanonicalization_D_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" - - - - - -typedef struct TimeZoneIdMapperWithFastCanonicalization TimeZoneIdMapperWithFastCanonicalization; - - - - -#endif // TimeZoneIdMapperWithFastCanonicalization_D_H diff --git a/ffi/capi/bindings/c/TimeZoneIdMapperWithFastCanonicalization.h b/ffi/capi/bindings/c/TimeZoneIdMapperWithFastCanonicalization.h deleted file mode 100644 index 66a1d89d702..00000000000 --- a/ffi/capi/bindings/c/TimeZoneIdMapperWithFastCanonicalization.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef TimeZoneIdMapperWithFastCanonicalization_H -#define TimeZoneIdMapperWithFastCanonicalization_H - -#include -#include -#include -#include -#include "diplomat_runtime.h" - -#include "DataError.d.h" -#include "DataProvider.d.h" - -#include "TimeZoneIdMapperWithFastCanonicalization.d.h" - - - - - - -TimeZoneIdMapperWithFastCanonicalization* icu4x_TimeZoneIdMapperWithFastCanonicalization_create_mv1(void); - -typedef struct icu4x_TimeZoneIdMapperWithFastCanonicalization_create_with_provider_mv1_result {union {TimeZoneIdMapperWithFastCanonicalization* ok; DataError err;}; bool is_ok;} icu4x_TimeZoneIdMapperWithFastCanonicalization_create_with_provider_mv1_result; -icu4x_TimeZoneIdMapperWithFastCanonicalization_create_with_provider_mv1_result icu4x_TimeZoneIdMapperWithFastCanonicalization_create_with_provider_mv1(const DataProvider* provider); - -typedef struct icu4x_TimeZoneIdMapperWithFastCanonicalization_canonicalize_iana_mv1_result { bool is_ok;} icu4x_TimeZoneIdMapperWithFastCanonicalization_canonicalize_iana_mv1_result; -icu4x_TimeZoneIdMapperWithFastCanonicalization_canonicalize_iana_mv1_result icu4x_TimeZoneIdMapperWithFastCanonicalization_canonicalize_iana_mv1(const TimeZoneIdMapperWithFastCanonicalization* self, DiplomatStringView value, DiplomatWrite* write); - -typedef struct icu4x_TimeZoneIdMapperWithFastCanonicalization_canonical_iana_from_bcp47_mv1_result { bool is_ok;} icu4x_TimeZoneIdMapperWithFastCanonicalization_canonical_iana_from_bcp47_mv1_result; -icu4x_TimeZoneIdMapperWithFastCanonicalization_canonical_iana_from_bcp47_mv1_result icu4x_TimeZoneIdMapperWithFastCanonicalization_canonical_iana_from_bcp47_mv1(const TimeZoneIdMapperWithFastCanonicalization* self, DiplomatStringView value, DiplomatWrite* write); - - -void icu4x_TimeZoneIdMapperWithFastCanonicalization_destroy_mv1(TimeZoneIdMapperWithFastCanonicalization* self); - - - - - -#endif // TimeZoneIdMapperWithFastCanonicalization_H diff --git a/ffi/capi/bindings/c/TimeZoneInfo.h b/ffi/capi/bindings/c/TimeZoneInfo.h index d6507eb5984..470c0301613 100644 --- a/ffi/capi/bindings/c/TimeZoneInfo.h +++ b/ffi/capi/bindings/c/TimeZoneInfo.h @@ -7,10 +7,10 @@ #include #include "diplomat_runtime.h" +#include "IanaParser.d.h" #include "IsoDate.d.h" #include "IsoDateTime.d.h" #include "Time.d.h" -#include "TimeZoneIdMapper.d.h" #include "TimeZoneInfo.d.h" @@ -58,7 +58,7 @@ icu4x_TimeZoneInfo_offset_seconds_part_mv1_result icu4x_TimeZoneInfo_offset_seco void icu4x_TimeZoneInfo_set_time_zone_id_mv1(TimeZoneInfo* self, DiplomatStringView id); -void icu4x_TimeZoneInfo_set_iana_time_zone_id_mv1(TimeZoneInfo* self, const TimeZoneIdMapper* mapper, DiplomatStringView id); +void icu4x_TimeZoneInfo_set_iana_time_zone_id_mv1(TimeZoneInfo* self, const IanaParser* mapper, DiplomatStringView id); void icu4x_TimeZoneInfo_time_zone_id_mv1(const TimeZoneInfo* self, DiplomatWrite* write); diff --git a/ffi/capi/bindings/cpp/icu4x/IanaParser.d.hpp b/ffi/capi/bindings/cpp/icu4x/IanaParser.d.hpp new file mode 100644 index 00000000000..eb21b4d1291 --- /dev/null +++ b/ffi/capi/bindings/cpp/icu4x/IanaParser.d.hpp @@ -0,0 +1,59 @@ +#ifndef icu4x_IanaParser_D_HPP +#define icu4x_IanaParser_D_HPP + +#include +#include +#include +#include +#include +#include +#include +#include "../diplomat_runtime.hpp" + +namespace icu4x { +namespace capi { struct DataProvider; } +class DataProvider; +namespace capi { struct IanaParser; } +class IanaParser; +class DataError; +} + + +namespace icu4x { +namespace capi { + struct IanaParser; +} // namespace capi +} // namespace + +namespace icu4x { +class IanaParser { +public: + + inline static std::unique_ptr create(); + + inline static diplomat::result, icu4x::DataError> create_with_provider(const icu4x::DataProvider& provider); + + inline std::string 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> canonicalize_iana(std::string_view value) const; + + inline std::optional find_canonical_iana_from_bcp47(std::string_view value) const; + + inline const icu4x::capi::IanaParser* AsFFI() const; + inline icu4x::capi::IanaParser* AsFFI(); + inline static const icu4x::IanaParser* FromFFI(const icu4x::capi::IanaParser* ptr); + inline static icu4x::IanaParser* FromFFI(icu4x::capi::IanaParser* ptr); + inline static void operator delete(void* ptr); +private: + IanaParser() = delete; + IanaParser(const icu4x::IanaParser&) = delete; + IanaParser(icu4x::IanaParser&&) noexcept = delete; + IanaParser operator=(const icu4x::IanaParser&) = delete; + IanaParser operator=(icu4x::IanaParser&&) noexcept = delete; + static void operator delete[](void*, size_t) = delete; +}; + +} // namespace +#endif // icu4x_IanaParser_D_HPP diff --git a/ffi/capi/bindings/cpp/icu4x/IanaParser.hpp b/ffi/capi/bindings/cpp/icu4x/IanaParser.hpp new file mode 100644 index 00000000000..fd2475e73d5 --- /dev/null +++ b/ffi/capi/bindings/cpp/icu4x/IanaParser.hpp @@ -0,0 +1,118 @@ +#ifndef icu4x_IanaParser_HPP +#define icu4x_IanaParser_HPP + +#include "IanaParser.d.hpp" + +#include +#include +#include +#include +#include +#include +#include +#include "../diplomat_runtime.hpp" +#include "DataError.hpp" +#include "DataProvider.hpp" + + +namespace icu4x { +namespace capi { + extern "C" { + + icu4x::capi::IanaParser* icu4x_IanaParser_create_mv1(void); + + typedef struct icu4x_IanaParser_create_with_provider_mv1_result {union {icu4x::capi::IanaParser* ok; icu4x::capi::DataError err;}; bool is_ok;} icu4x_IanaParser_create_with_provider_mv1_result; + icu4x_IanaParser_create_with_provider_mv1_result icu4x_IanaParser_create_with_provider_mv1(const icu4x::capi::DataProvider* provider); + + void icu4x_IanaParser_iana_to_bcp47_mv1(const icu4x::capi::IanaParser* self, diplomat::capi::DiplomatStringView value, diplomat::capi::DiplomatWrite* write); + + typedef struct icu4x_IanaParser_normalize_iana_mv1_result { bool is_ok;} icu4x_IanaParser_normalize_iana_mv1_result; + icu4x_IanaParser_normalize_iana_mv1_result icu4x_IanaParser_normalize_iana_mv1(const icu4x::capi::IanaParser* self, diplomat::capi::DiplomatStringView value, diplomat::capi::DiplomatWrite* write); + + typedef struct icu4x_IanaParser_canonicalize_iana_mv1_result { bool is_ok;} icu4x_IanaParser_canonicalize_iana_mv1_result; + icu4x_IanaParser_canonicalize_iana_mv1_result icu4x_IanaParser_canonicalize_iana_mv1(const icu4x::capi::IanaParser* self, diplomat::capi::DiplomatStringView value, diplomat::capi::DiplomatWrite* write); + + typedef struct icu4x_IanaParser_find_canonical_iana_from_bcp47_mv1_result { bool is_ok;} icu4x_IanaParser_find_canonical_iana_from_bcp47_mv1_result; + icu4x_IanaParser_find_canonical_iana_from_bcp47_mv1_result icu4x_IanaParser_find_canonical_iana_from_bcp47_mv1(const icu4x::capi::IanaParser* self, diplomat::capi::DiplomatStringView value, diplomat::capi::DiplomatWrite* write); + + + void icu4x_IanaParser_destroy_mv1(IanaParser* self); + + } // extern "C" +} // namespace capi +} // namespace + +inline std::unique_ptr icu4x::IanaParser::create() { + auto result = icu4x::capi::icu4x_IanaParser_create_mv1(); + return std::unique_ptr(icu4x::IanaParser::FromFFI(result)); +} + +inline diplomat::result, icu4x::DataError> icu4x::IanaParser::create_with_provider(const icu4x::DataProvider& provider) { + auto result = icu4x::capi::icu4x_IanaParser_create_with_provider_mv1(provider.AsFFI()); + return result.is_ok ? diplomat::result, icu4x::DataError>(diplomat::Ok>(std::unique_ptr(icu4x::IanaParser::FromFFI(result.ok)))) : diplomat::result, icu4x::DataError>(diplomat::Err(icu4x::DataError::FromFFI(result.err))); +} + +inline std::string icu4x::IanaParser::iana_to_bcp47(std::string_view value) const { + std::string output; + diplomat::capi::DiplomatWrite write = diplomat::WriteFromString(output); + icu4x::capi::icu4x_IanaParser_iana_to_bcp47_mv1(this->AsFFI(), + {value.data(), value.size()}, + &write); + return output; +} + +inline diplomat::result, diplomat::Utf8Error> icu4x::IanaParser::normalize_iana(std::string_view value) const { + if (!diplomat::capi::diplomat_is_str(value.data(), value.size())) { + return diplomat::Err(); + } + std::string output; + diplomat::capi::DiplomatWrite write = diplomat::WriteFromString(output); + auto result = icu4x::capi::icu4x_IanaParser_normalize_iana_mv1(this->AsFFI(), + {value.data(), value.size()}, + &write); + return diplomat::Ok>(result.is_ok ? std::optional(std::move(output)) : std::nullopt); +} + +inline diplomat::result, diplomat::Utf8Error> icu4x::IanaParser::canonicalize_iana(std::string_view value) const { + if (!diplomat::capi::diplomat_is_str(value.data(), value.size())) { + return diplomat::Err(); + } + std::string output; + diplomat::capi::DiplomatWrite write = diplomat::WriteFromString(output); + auto result = icu4x::capi::icu4x_IanaParser_canonicalize_iana_mv1(this->AsFFI(), + {value.data(), value.size()}, + &write); + return diplomat::Ok>(result.is_ok ? std::optional(std::move(output)) : std::nullopt); +} + +inline std::optional icu4x::IanaParser::find_canonical_iana_from_bcp47(std::string_view value) const { + std::string output; + diplomat::capi::DiplomatWrite write = diplomat::WriteFromString(output); + auto result = icu4x::capi::icu4x_IanaParser_find_canonical_iana_from_bcp47_mv1(this->AsFFI(), + {value.data(), value.size()}, + &write); + return result.is_ok ? std::optional(std::move(output)) : std::nullopt; +} + +inline const icu4x::capi::IanaParser* icu4x::IanaParser::AsFFI() const { + return reinterpret_cast(this); +} + +inline icu4x::capi::IanaParser* icu4x::IanaParser::AsFFI() { + return reinterpret_cast(this); +} + +inline const icu4x::IanaParser* icu4x::IanaParser::FromFFI(const icu4x::capi::IanaParser* ptr) { + return reinterpret_cast(ptr); +} + +inline icu4x::IanaParser* icu4x::IanaParser::FromFFI(icu4x::capi::IanaParser* ptr) { + return reinterpret_cast(ptr); +} + +inline void icu4x::IanaParser::operator delete(void* ptr) { + icu4x::capi::icu4x_IanaParser_destroy_mv1(reinterpret_cast(ptr)); +} + + +#endif // icu4x_IanaParser_HPP diff --git a/ffi/capi/bindings/cpp/icu4x/IanaParserExtended.d.hpp b/ffi/capi/bindings/cpp/icu4x/IanaParserExtended.d.hpp new file mode 100644 index 00000000000..f1af1004c05 --- /dev/null +++ b/ffi/capi/bindings/cpp/icu4x/IanaParserExtended.d.hpp @@ -0,0 +1,55 @@ +#ifndef icu4x_IanaParserExtended_D_HPP +#define icu4x_IanaParserExtended_D_HPP + +#include +#include +#include +#include +#include +#include +#include +#include "../diplomat_runtime.hpp" + +namespace icu4x { +namespace capi { struct DataProvider; } +class DataProvider; +namespace capi { struct IanaParserExtended; } +class IanaParserExtended; +class DataError; +} + + +namespace icu4x { +namespace capi { + struct IanaParserExtended; +} // namespace capi +} // namespace + +namespace icu4x { +class IanaParserExtended { +public: + + inline static std::unique_ptr create(); + + inline static diplomat::result, icu4x::DataError> create_with_provider(const icu4x::DataProvider& provider); + + inline diplomat::result, diplomat::Utf8Error> canonicalize_iana(std::string_view value) const; + + inline std::optional canonical_iana_from_bcp47(std::string_view value) const; + + inline const icu4x::capi::IanaParserExtended* AsFFI() const; + inline icu4x::capi::IanaParserExtended* AsFFI(); + inline static const icu4x::IanaParserExtended* FromFFI(const icu4x::capi::IanaParserExtended* ptr); + inline static icu4x::IanaParserExtended* FromFFI(icu4x::capi::IanaParserExtended* ptr); + inline static void operator delete(void* ptr); +private: + IanaParserExtended() = delete; + IanaParserExtended(const icu4x::IanaParserExtended&) = delete; + IanaParserExtended(icu4x::IanaParserExtended&&) noexcept = delete; + IanaParserExtended operator=(const icu4x::IanaParserExtended&) = delete; + IanaParserExtended operator=(icu4x::IanaParserExtended&&) noexcept = delete; + static void operator delete[](void*, size_t) = delete; +}; + +} // namespace +#endif // icu4x_IanaParserExtended_D_HPP diff --git a/ffi/capi/bindings/cpp/icu4x/IanaParserExtended.hpp b/ffi/capi/bindings/cpp/icu4x/IanaParserExtended.hpp new file mode 100644 index 00000000000..46f731534ec --- /dev/null +++ b/ffi/capi/bindings/cpp/icu4x/IanaParserExtended.hpp @@ -0,0 +1,92 @@ +#ifndef icu4x_IanaParserExtended_HPP +#define icu4x_IanaParserExtended_HPP + +#include "IanaParserExtended.d.hpp" + +#include +#include +#include +#include +#include +#include +#include +#include "../diplomat_runtime.hpp" +#include "DataError.hpp" +#include "DataProvider.hpp" + + +namespace icu4x { +namespace capi { + extern "C" { + + icu4x::capi::IanaParserExtended* icu4x_IanaParserExtended_create_mv1(void); + + typedef struct icu4x_IanaParserExtended_create_with_provider_mv1_result {union {icu4x::capi::IanaParserExtended* ok; icu4x::capi::DataError err;}; bool is_ok;} icu4x_IanaParserExtended_create_with_provider_mv1_result; + icu4x_IanaParserExtended_create_with_provider_mv1_result icu4x_IanaParserExtended_create_with_provider_mv1(const icu4x::capi::DataProvider* provider); + + typedef struct icu4x_IanaParserExtended_canonicalize_iana_mv1_result { bool is_ok;} icu4x_IanaParserExtended_canonicalize_iana_mv1_result; + icu4x_IanaParserExtended_canonicalize_iana_mv1_result icu4x_IanaParserExtended_canonicalize_iana_mv1(const icu4x::capi::IanaParserExtended* self, diplomat::capi::DiplomatStringView value, diplomat::capi::DiplomatWrite* write); + + typedef struct icu4x_IanaParserExtended_canonical_iana_from_bcp47_mv1_result { bool is_ok;} icu4x_IanaParserExtended_canonical_iana_from_bcp47_mv1_result; + icu4x_IanaParserExtended_canonical_iana_from_bcp47_mv1_result icu4x_IanaParserExtended_canonical_iana_from_bcp47_mv1(const icu4x::capi::IanaParserExtended* self, diplomat::capi::DiplomatStringView value, diplomat::capi::DiplomatWrite* write); + + + void icu4x_IanaParserExtended_destroy_mv1(IanaParserExtended* self); + + } // extern "C" +} // namespace capi +} // namespace + +inline std::unique_ptr icu4x::IanaParserExtended::create() { + auto result = icu4x::capi::icu4x_IanaParserExtended_create_mv1(); + return std::unique_ptr(icu4x::IanaParserExtended::FromFFI(result)); +} + +inline diplomat::result, icu4x::DataError> icu4x::IanaParserExtended::create_with_provider(const icu4x::DataProvider& provider) { + auto result = icu4x::capi::icu4x_IanaParserExtended_create_with_provider_mv1(provider.AsFFI()); + return result.is_ok ? diplomat::result, icu4x::DataError>(diplomat::Ok>(std::unique_ptr(icu4x::IanaParserExtended::FromFFI(result.ok)))) : diplomat::result, icu4x::DataError>(diplomat::Err(icu4x::DataError::FromFFI(result.err))); +} + +inline diplomat::result, diplomat::Utf8Error> icu4x::IanaParserExtended::canonicalize_iana(std::string_view value) const { + if (!diplomat::capi::diplomat_is_str(value.data(), value.size())) { + return diplomat::Err(); + } + std::string output; + diplomat::capi::DiplomatWrite write = diplomat::WriteFromString(output); + auto result = icu4x::capi::icu4x_IanaParserExtended_canonicalize_iana_mv1(this->AsFFI(), + {value.data(), value.size()}, + &write); + return diplomat::Ok>(result.is_ok ? std::optional(std::move(output)) : std::nullopt); +} + +inline std::optional icu4x::IanaParserExtended::canonical_iana_from_bcp47(std::string_view value) const { + std::string output; + diplomat::capi::DiplomatWrite write = diplomat::WriteFromString(output); + auto result = icu4x::capi::icu4x_IanaParserExtended_canonical_iana_from_bcp47_mv1(this->AsFFI(), + {value.data(), value.size()}, + &write); + return result.is_ok ? std::optional(std::move(output)) : std::nullopt; +} + +inline const icu4x::capi::IanaParserExtended* icu4x::IanaParserExtended::AsFFI() const { + return reinterpret_cast(this); +} + +inline icu4x::capi::IanaParserExtended* icu4x::IanaParserExtended::AsFFI() { + return reinterpret_cast(this); +} + +inline const icu4x::IanaParserExtended* icu4x::IanaParserExtended::FromFFI(const icu4x::capi::IanaParserExtended* ptr) { + return reinterpret_cast(ptr); +} + +inline icu4x::IanaParserExtended* icu4x::IanaParserExtended::FromFFI(icu4x::capi::IanaParserExtended* ptr) { + return reinterpret_cast(ptr); +} + +inline void icu4x::IanaParserExtended::operator delete(void* ptr) { + icu4x::capi::icu4x_IanaParserExtended_destroy_mv1(reinterpret_cast(ptr)); +} + + +#endif // icu4x_IanaParserExtended_HPP diff --git a/ffi/capi/bindings/cpp/icu4x/Time.d.hpp b/ffi/capi/bindings/cpp/icu4x/Time.d.hpp index b4da6643bfb..9922e00dcb7 100644 --- a/ffi/capi/bindings/cpp/icu4x/Time.d.hpp +++ b/ffi/capi/bindings/cpp/icu4x/Time.d.hpp @@ -28,7 +28,7 @@ namespace icu4x { class Time { public: - inline static diplomat::result, icu4x::CalendarError> create(uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond); + inline static diplomat::result, icu4x::CalendarError> create(uint8_t hour, uint8_t minute, uint8_t second, uint32_t subsecond); inline static diplomat::result, icu4x::CalendarParseError> from_string(std::string_view v); @@ -40,7 +40,7 @@ class Time { inline uint8_t second() const; - inline uint32_t nanosecond() const; + inline uint32_t subsecond() const; inline const icu4x::capi::Time* AsFFI() const; inline icu4x::capi::Time* AsFFI(); diff --git a/ffi/capi/bindings/cpp/icu4x/Time.hpp b/ffi/capi/bindings/cpp/icu4x/Time.hpp index bacfa1e69a9..3d1908552a6 100644 --- a/ffi/capi/bindings/cpp/icu4x/Time.hpp +++ b/ffi/capi/bindings/cpp/icu4x/Time.hpp @@ -20,7 +20,7 @@ namespace capi { extern "C" { typedef struct icu4x_Time_create_mv1_result {union {icu4x::capi::Time* ok; icu4x::capi::CalendarError err;}; bool is_ok;} icu4x_Time_create_mv1_result; - icu4x_Time_create_mv1_result icu4x_Time_create_mv1(uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond); + icu4x_Time_create_mv1_result icu4x_Time_create_mv1(uint8_t hour, uint8_t minute, uint8_t second, uint32_t subsecond); typedef struct icu4x_Time_from_string_mv1_result {union {icu4x::capi::Time* ok; icu4x::capi::CalendarParseError err;}; bool is_ok;} icu4x_Time_from_string_mv1_result; icu4x_Time_from_string_mv1_result icu4x_Time_from_string_mv1(diplomat::capi::DiplomatStringView v); @@ -34,7 +34,7 @@ namespace capi { uint8_t icu4x_Time_second_mv1(const icu4x::capi::Time* self); - uint32_t icu4x_Time_nanosecond_mv1(const icu4x::capi::Time* self); + uint32_t icu4x_Time_subsecond_mv1(const icu4x::capi::Time* self); void icu4x_Time_destroy_mv1(Time* self); @@ -43,11 +43,11 @@ namespace capi { } // namespace capi } // namespace -inline diplomat::result, icu4x::CalendarError> icu4x::Time::create(uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond) { +inline diplomat::result, icu4x::CalendarError> icu4x::Time::create(uint8_t hour, uint8_t minute, uint8_t second, uint32_t subsecond) { auto result = icu4x::capi::icu4x_Time_create_mv1(hour, minute, second, - nanosecond); + subsecond); return result.is_ok ? diplomat::result, icu4x::CalendarError>(diplomat::Ok>(std::unique_ptr(icu4x::Time::FromFFI(result.ok)))) : diplomat::result, icu4x::CalendarError>(diplomat::Err(icu4x::CalendarError::FromFFI(result.err))); } @@ -76,8 +76,8 @@ inline uint8_t icu4x::Time::second() const { return result; } -inline uint32_t icu4x::Time::nanosecond() const { - auto result = icu4x::capi::icu4x_Time_nanosecond_mv1(this->AsFFI()); +inline uint32_t icu4x::Time::subsecond() const { + auto result = icu4x::capi::icu4x_Time_subsecond_mv1(this->AsFFI()); return result; } diff --git a/ffi/capi/bindings/cpp/icu4x/TimeZoneIdMapper.d.hpp b/ffi/capi/bindings/cpp/icu4x/TimeZoneIdMapper.d.hpp deleted file mode 100644 index 816267314ec..00000000000 --- a/ffi/capi/bindings/cpp/icu4x/TimeZoneIdMapper.d.hpp +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef icu4x_TimeZoneIdMapper_D_HPP -#define icu4x_TimeZoneIdMapper_D_HPP - -#include -#include -#include -#include -#include -#include -#include -#include "../diplomat_runtime.hpp" - -namespace icu4x { -namespace capi { struct DataProvider; } -class DataProvider; -namespace capi { struct TimeZoneIdMapper; } -class TimeZoneIdMapper; -class DataError; -} - - -namespace icu4x { -namespace capi { - struct TimeZoneIdMapper; -} // namespace capi -} // namespace - -namespace icu4x { -class TimeZoneIdMapper { -public: - - inline static std::unique_ptr create(); - - inline static diplomat::result, icu4x::DataError> create_with_provider(const icu4x::DataProvider& provider); - - inline std::string 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> canonicalize_iana(std::string_view value) const; - - inline std::optional find_canonical_iana_from_bcp47(std::string_view value) const; - - inline const icu4x::capi::TimeZoneIdMapper* AsFFI() const; - inline icu4x::capi::TimeZoneIdMapper* AsFFI(); - inline static const icu4x::TimeZoneIdMapper* FromFFI(const icu4x::capi::TimeZoneIdMapper* ptr); - inline static icu4x::TimeZoneIdMapper* FromFFI(icu4x::capi::TimeZoneIdMapper* ptr); - inline static void operator delete(void* ptr); -private: - TimeZoneIdMapper() = delete; - TimeZoneIdMapper(const icu4x::TimeZoneIdMapper&) = delete; - TimeZoneIdMapper(icu4x::TimeZoneIdMapper&&) noexcept = delete; - TimeZoneIdMapper operator=(const icu4x::TimeZoneIdMapper&) = delete; - TimeZoneIdMapper operator=(icu4x::TimeZoneIdMapper&&) noexcept = delete; - static void operator delete[](void*, size_t) = delete; -}; - -} // namespace -#endif // icu4x_TimeZoneIdMapper_D_HPP diff --git a/ffi/capi/bindings/cpp/icu4x/TimeZoneIdMapper.hpp b/ffi/capi/bindings/cpp/icu4x/TimeZoneIdMapper.hpp deleted file mode 100644 index a260561999c..00000000000 --- a/ffi/capi/bindings/cpp/icu4x/TimeZoneIdMapper.hpp +++ /dev/null @@ -1,118 +0,0 @@ -#ifndef icu4x_TimeZoneIdMapper_HPP -#define icu4x_TimeZoneIdMapper_HPP - -#include "TimeZoneIdMapper.d.hpp" - -#include -#include -#include -#include -#include -#include -#include -#include "../diplomat_runtime.hpp" -#include "DataError.hpp" -#include "DataProvider.hpp" - - -namespace icu4x { -namespace capi { - extern "C" { - - icu4x::capi::TimeZoneIdMapper* icu4x_TimeZoneIdMapper_create_mv1(void); - - typedef struct icu4x_TimeZoneIdMapper_create_with_provider_mv1_result {union {icu4x::capi::TimeZoneIdMapper* ok; icu4x::capi::DataError err;}; bool is_ok;} icu4x_TimeZoneIdMapper_create_with_provider_mv1_result; - icu4x_TimeZoneIdMapper_create_with_provider_mv1_result icu4x_TimeZoneIdMapper_create_with_provider_mv1(const icu4x::capi::DataProvider* provider); - - void icu4x_TimeZoneIdMapper_iana_to_bcp47_mv1(const icu4x::capi::TimeZoneIdMapper* self, diplomat::capi::DiplomatStringView value, diplomat::capi::DiplomatWrite* write); - - typedef struct icu4x_TimeZoneIdMapper_normalize_iana_mv1_result { bool is_ok;} icu4x_TimeZoneIdMapper_normalize_iana_mv1_result; - icu4x_TimeZoneIdMapper_normalize_iana_mv1_result icu4x_TimeZoneIdMapper_normalize_iana_mv1(const icu4x::capi::TimeZoneIdMapper* self, diplomat::capi::DiplomatStringView value, diplomat::capi::DiplomatWrite* write); - - typedef struct icu4x_TimeZoneIdMapper_canonicalize_iana_mv1_result { bool is_ok;} icu4x_TimeZoneIdMapper_canonicalize_iana_mv1_result; - icu4x_TimeZoneIdMapper_canonicalize_iana_mv1_result icu4x_TimeZoneIdMapper_canonicalize_iana_mv1(const icu4x::capi::TimeZoneIdMapper* self, diplomat::capi::DiplomatStringView value, diplomat::capi::DiplomatWrite* write); - - typedef struct icu4x_TimeZoneIdMapper_find_canonical_iana_from_bcp47_mv1_result { bool is_ok;} icu4x_TimeZoneIdMapper_find_canonical_iana_from_bcp47_mv1_result; - icu4x_TimeZoneIdMapper_find_canonical_iana_from_bcp47_mv1_result icu4x_TimeZoneIdMapper_find_canonical_iana_from_bcp47_mv1(const icu4x::capi::TimeZoneIdMapper* self, diplomat::capi::DiplomatStringView value, diplomat::capi::DiplomatWrite* write); - - - void icu4x_TimeZoneIdMapper_destroy_mv1(TimeZoneIdMapper* self); - - } // extern "C" -} // namespace capi -} // namespace - -inline std::unique_ptr icu4x::TimeZoneIdMapper::create() { - auto result = icu4x::capi::icu4x_TimeZoneIdMapper_create_mv1(); - return std::unique_ptr(icu4x::TimeZoneIdMapper::FromFFI(result)); -} - -inline diplomat::result, icu4x::DataError> icu4x::TimeZoneIdMapper::create_with_provider(const icu4x::DataProvider& provider) { - auto result = icu4x::capi::icu4x_TimeZoneIdMapper_create_with_provider_mv1(provider.AsFFI()); - return result.is_ok ? diplomat::result, icu4x::DataError>(diplomat::Ok>(std::unique_ptr(icu4x::TimeZoneIdMapper::FromFFI(result.ok)))) : diplomat::result, icu4x::DataError>(diplomat::Err(icu4x::DataError::FromFFI(result.err))); -} - -inline std::string icu4x::TimeZoneIdMapper::iana_to_bcp47(std::string_view value) const { - std::string output; - diplomat::capi::DiplomatWrite write = diplomat::WriteFromString(output); - icu4x::capi::icu4x_TimeZoneIdMapper_iana_to_bcp47_mv1(this->AsFFI(), - {value.data(), value.size()}, - &write); - return output; -} - -inline diplomat::result, diplomat::Utf8Error> icu4x::TimeZoneIdMapper::normalize_iana(std::string_view value) const { - if (!diplomat::capi::diplomat_is_str(value.data(), value.size())) { - return diplomat::Err(); - } - std::string output; - diplomat::capi::DiplomatWrite write = diplomat::WriteFromString(output); - auto result = icu4x::capi::icu4x_TimeZoneIdMapper_normalize_iana_mv1(this->AsFFI(), - {value.data(), value.size()}, - &write); - return diplomat::Ok>(result.is_ok ? std::optional(std::move(output)) : std::nullopt); -} - -inline diplomat::result, diplomat::Utf8Error> icu4x::TimeZoneIdMapper::canonicalize_iana(std::string_view value) const { - if (!diplomat::capi::diplomat_is_str(value.data(), value.size())) { - return diplomat::Err(); - } - std::string output; - diplomat::capi::DiplomatWrite write = diplomat::WriteFromString(output); - auto result = icu4x::capi::icu4x_TimeZoneIdMapper_canonicalize_iana_mv1(this->AsFFI(), - {value.data(), value.size()}, - &write); - return diplomat::Ok>(result.is_ok ? std::optional(std::move(output)) : std::nullopt); -} - -inline std::optional icu4x::TimeZoneIdMapper::find_canonical_iana_from_bcp47(std::string_view value) const { - std::string output; - diplomat::capi::DiplomatWrite write = diplomat::WriteFromString(output); - auto result = icu4x::capi::icu4x_TimeZoneIdMapper_find_canonical_iana_from_bcp47_mv1(this->AsFFI(), - {value.data(), value.size()}, - &write); - return result.is_ok ? std::optional(std::move(output)) : std::nullopt; -} - -inline const icu4x::capi::TimeZoneIdMapper* icu4x::TimeZoneIdMapper::AsFFI() const { - return reinterpret_cast(this); -} - -inline icu4x::capi::TimeZoneIdMapper* icu4x::TimeZoneIdMapper::AsFFI() { - return reinterpret_cast(this); -} - -inline const icu4x::TimeZoneIdMapper* icu4x::TimeZoneIdMapper::FromFFI(const icu4x::capi::TimeZoneIdMapper* ptr) { - return reinterpret_cast(ptr); -} - -inline icu4x::TimeZoneIdMapper* icu4x::TimeZoneIdMapper::FromFFI(icu4x::capi::TimeZoneIdMapper* ptr) { - return reinterpret_cast(ptr); -} - -inline void icu4x::TimeZoneIdMapper::operator delete(void* ptr) { - icu4x::capi::icu4x_TimeZoneIdMapper_destroy_mv1(reinterpret_cast(ptr)); -} - - -#endif // icu4x_TimeZoneIdMapper_HPP diff --git a/ffi/capi/bindings/cpp/icu4x/TimeZoneIdMapperWithFastCanonicalization.d.hpp b/ffi/capi/bindings/cpp/icu4x/TimeZoneIdMapperWithFastCanonicalization.d.hpp deleted file mode 100644 index a0b7b76ce32..00000000000 --- a/ffi/capi/bindings/cpp/icu4x/TimeZoneIdMapperWithFastCanonicalization.d.hpp +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef icu4x_TimeZoneIdMapperWithFastCanonicalization_D_HPP -#define icu4x_TimeZoneIdMapperWithFastCanonicalization_D_HPP - -#include -#include -#include -#include -#include -#include -#include -#include "../diplomat_runtime.hpp" - -namespace icu4x { -namespace capi { struct DataProvider; } -class DataProvider; -namespace capi { struct TimeZoneIdMapperWithFastCanonicalization; } -class TimeZoneIdMapperWithFastCanonicalization; -class DataError; -} - - -namespace icu4x { -namespace capi { - struct TimeZoneIdMapperWithFastCanonicalization; -} // namespace capi -} // namespace - -namespace icu4x { -class TimeZoneIdMapperWithFastCanonicalization { -public: - - inline static std::unique_ptr create(); - - inline static diplomat::result, icu4x::DataError> create_with_provider(const icu4x::DataProvider& provider); - - inline diplomat::result, diplomat::Utf8Error> canonicalize_iana(std::string_view value) const; - - inline std::optional canonical_iana_from_bcp47(std::string_view value) const; - - inline const icu4x::capi::TimeZoneIdMapperWithFastCanonicalization* AsFFI() const; - inline icu4x::capi::TimeZoneIdMapperWithFastCanonicalization* AsFFI(); - inline static const icu4x::TimeZoneIdMapperWithFastCanonicalization* FromFFI(const icu4x::capi::TimeZoneIdMapperWithFastCanonicalization* ptr); - inline static icu4x::TimeZoneIdMapperWithFastCanonicalization* FromFFI(icu4x::capi::TimeZoneIdMapperWithFastCanonicalization* ptr); - inline static void operator delete(void* ptr); -private: - TimeZoneIdMapperWithFastCanonicalization() = delete; - TimeZoneIdMapperWithFastCanonicalization(const icu4x::TimeZoneIdMapperWithFastCanonicalization&) = delete; - TimeZoneIdMapperWithFastCanonicalization(icu4x::TimeZoneIdMapperWithFastCanonicalization&&) noexcept = delete; - TimeZoneIdMapperWithFastCanonicalization operator=(const icu4x::TimeZoneIdMapperWithFastCanonicalization&) = delete; - TimeZoneIdMapperWithFastCanonicalization operator=(icu4x::TimeZoneIdMapperWithFastCanonicalization&&) noexcept = delete; - static void operator delete[](void*, size_t) = delete; -}; - -} // namespace -#endif // icu4x_TimeZoneIdMapperWithFastCanonicalization_D_HPP diff --git a/ffi/capi/bindings/cpp/icu4x/TimeZoneIdMapperWithFastCanonicalization.hpp b/ffi/capi/bindings/cpp/icu4x/TimeZoneIdMapperWithFastCanonicalization.hpp deleted file mode 100644 index 507e9112ce7..00000000000 --- a/ffi/capi/bindings/cpp/icu4x/TimeZoneIdMapperWithFastCanonicalization.hpp +++ /dev/null @@ -1,92 +0,0 @@ -#ifndef icu4x_TimeZoneIdMapperWithFastCanonicalization_HPP -#define icu4x_TimeZoneIdMapperWithFastCanonicalization_HPP - -#include "TimeZoneIdMapperWithFastCanonicalization.d.hpp" - -#include -#include -#include -#include -#include -#include -#include -#include "../diplomat_runtime.hpp" -#include "DataError.hpp" -#include "DataProvider.hpp" - - -namespace icu4x { -namespace capi { - extern "C" { - - icu4x::capi::TimeZoneIdMapperWithFastCanonicalization* icu4x_TimeZoneIdMapperWithFastCanonicalization_create_mv1(void); - - typedef struct icu4x_TimeZoneIdMapperWithFastCanonicalization_create_with_provider_mv1_result {union {icu4x::capi::TimeZoneIdMapperWithFastCanonicalization* ok; icu4x::capi::DataError err;}; bool is_ok;} icu4x_TimeZoneIdMapperWithFastCanonicalization_create_with_provider_mv1_result; - icu4x_TimeZoneIdMapperWithFastCanonicalization_create_with_provider_mv1_result icu4x_TimeZoneIdMapperWithFastCanonicalization_create_with_provider_mv1(const icu4x::capi::DataProvider* provider); - - typedef struct icu4x_TimeZoneIdMapperWithFastCanonicalization_canonicalize_iana_mv1_result { bool is_ok;} icu4x_TimeZoneIdMapperWithFastCanonicalization_canonicalize_iana_mv1_result; - icu4x_TimeZoneIdMapperWithFastCanonicalization_canonicalize_iana_mv1_result icu4x_TimeZoneIdMapperWithFastCanonicalization_canonicalize_iana_mv1(const icu4x::capi::TimeZoneIdMapperWithFastCanonicalization* self, diplomat::capi::DiplomatStringView value, diplomat::capi::DiplomatWrite* write); - - typedef struct icu4x_TimeZoneIdMapperWithFastCanonicalization_canonical_iana_from_bcp47_mv1_result { bool is_ok;} icu4x_TimeZoneIdMapperWithFastCanonicalization_canonical_iana_from_bcp47_mv1_result; - icu4x_TimeZoneIdMapperWithFastCanonicalization_canonical_iana_from_bcp47_mv1_result icu4x_TimeZoneIdMapperWithFastCanonicalization_canonical_iana_from_bcp47_mv1(const icu4x::capi::TimeZoneIdMapperWithFastCanonicalization* self, diplomat::capi::DiplomatStringView value, diplomat::capi::DiplomatWrite* write); - - - void icu4x_TimeZoneIdMapperWithFastCanonicalization_destroy_mv1(TimeZoneIdMapperWithFastCanonicalization* self); - - } // extern "C" -} // namespace capi -} // namespace - -inline std::unique_ptr icu4x::TimeZoneIdMapperWithFastCanonicalization::create() { - auto result = icu4x::capi::icu4x_TimeZoneIdMapperWithFastCanonicalization_create_mv1(); - return std::unique_ptr(icu4x::TimeZoneIdMapperWithFastCanonicalization::FromFFI(result)); -} - -inline diplomat::result, icu4x::DataError> icu4x::TimeZoneIdMapperWithFastCanonicalization::create_with_provider(const icu4x::DataProvider& provider) { - auto result = icu4x::capi::icu4x_TimeZoneIdMapperWithFastCanonicalization_create_with_provider_mv1(provider.AsFFI()); - return result.is_ok ? diplomat::result, icu4x::DataError>(diplomat::Ok>(std::unique_ptr(icu4x::TimeZoneIdMapperWithFastCanonicalization::FromFFI(result.ok)))) : diplomat::result, icu4x::DataError>(diplomat::Err(icu4x::DataError::FromFFI(result.err))); -} - -inline diplomat::result, diplomat::Utf8Error> icu4x::TimeZoneIdMapperWithFastCanonicalization::canonicalize_iana(std::string_view value) const { - if (!diplomat::capi::diplomat_is_str(value.data(), value.size())) { - return diplomat::Err(); - } - std::string output; - diplomat::capi::DiplomatWrite write = diplomat::WriteFromString(output); - auto result = icu4x::capi::icu4x_TimeZoneIdMapperWithFastCanonicalization_canonicalize_iana_mv1(this->AsFFI(), - {value.data(), value.size()}, - &write); - return diplomat::Ok>(result.is_ok ? std::optional(std::move(output)) : std::nullopt); -} - -inline std::optional icu4x::TimeZoneIdMapperWithFastCanonicalization::canonical_iana_from_bcp47(std::string_view value) const { - std::string output; - diplomat::capi::DiplomatWrite write = diplomat::WriteFromString(output); - auto result = icu4x::capi::icu4x_TimeZoneIdMapperWithFastCanonicalization_canonical_iana_from_bcp47_mv1(this->AsFFI(), - {value.data(), value.size()}, - &write); - return result.is_ok ? std::optional(std::move(output)) : std::nullopt; -} - -inline const icu4x::capi::TimeZoneIdMapperWithFastCanonicalization* icu4x::TimeZoneIdMapperWithFastCanonicalization::AsFFI() const { - return reinterpret_cast(this); -} - -inline icu4x::capi::TimeZoneIdMapperWithFastCanonicalization* icu4x::TimeZoneIdMapperWithFastCanonicalization::AsFFI() { - return reinterpret_cast(this); -} - -inline const icu4x::TimeZoneIdMapperWithFastCanonicalization* icu4x::TimeZoneIdMapperWithFastCanonicalization::FromFFI(const icu4x::capi::TimeZoneIdMapperWithFastCanonicalization* ptr) { - return reinterpret_cast(ptr); -} - -inline icu4x::TimeZoneIdMapperWithFastCanonicalization* icu4x::TimeZoneIdMapperWithFastCanonicalization::FromFFI(icu4x::capi::TimeZoneIdMapperWithFastCanonicalization* ptr) { - return reinterpret_cast(ptr); -} - -inline void icu4x::TimeZoneIdMapperWithFastCanonicalization::operator delete(void* ptr) { - icu4x::capi::icu4x_TimeZoneIdMapperWithFastCanonicalization_destroy_mv1(reinterpret_cast(ptr)); -} - - -#endif // icu4x_TimeZoneIdMapperWithFastCanonicalization_HPP diff --git a/ffi/capi/bindings/cpp/icu4x/TimeZoneInfo.d.hpp b/ffi/capi/bindings/cpp/icu4x/TimeZoneInfo.d.hpp index e6832c62b24..2dd040c9f85 100644 --- a/ffi/capi/bindings/cpp/icu4x/TimeZoneInfo.d.hpp +++ b/ffi/capi/bindings/cpp/icu4x/TimeZoneInfo.d.hpp @@ -11,12 +11,12 @@ #include "../diplomat_runtime.hpp" namespace icu4x { +namespace capi { struct IanaParser; } +class IanaParser; namespace capi { struct IsoDate; } class IsoDate; namespace capi { struct Time; } class Time; -namespace capi { struct TimeZoneIdMapper; } -class TimeZoneIdMapper; namespace capi { struct TimeZoneInfo; } class TimeZoneInfo; struct IsoDateTime; @@ -64,7 +64,7 @@ class TimeZoneInfo { inline void set_time_zone_id(std::string_view id); - inline void set_iana_time_zone_id(const icu4x::TimeZoneIdMapper& mapper, std::string_view id); + inline void set_iana_time_zone_id(const icu4x::IanaParser& mapper, std::string_view id); inline std::string time_zone_id() const; diff --git a/ffi/capi/bindings/cpp/icu4x/TimeZoneInfo.hpp b/ffi/capi/bindings/cpp/icu4x/TimeZoneInfo.hpp index 04021f79a9c..79ebc15fa47 100644 --- a/ffi/capi/bindings/cpp/icu4x/TimeZoneInfo.hpp +++ b/ffi/capi/bindings/cpp/icu4x/TimeZoneInfo.hpp @@ -11,10 +11,10 @@ #include #include #include "../diplomat_runtime.hpp" +#include "IanaParser.hpp" #include "IsoDate.hpp" #include "IsoDateTime.hpp" #include "Time.hpp" -#include "TimeZoneIdMapper.hpp" #include "TimeZoneInvalidOffsetError.hpp" @@ -61,7 +61,7 @@ namespace capi { void icu4x_TimeZoneInfo_set_time_zone_id_mv1(icu4x::capi::TimeZoneInfo* self, diplomat::capi::DiplomatStringView id); - void icu4x_TimeZoneInfo_set_iana_time_zone_id_mv1(icu4x::capi::TimeZoneInfo* self, const icu4x::capi::TimeZoneIdMapper* mapper, diplomat::capi::DiplomatStringView id); + void icu4x_TimeZoneInfo_set_iana_time_zone_id_mv1(icu4x::capi::TimeZoneInfo* self, const icu4x::capi::IanaParser* mapper, diplomat::capi::DiplomatStringView id); void icu4x_TimeZoneInfo_time_zone_id_mv1(const icu4x::capi::TimeZoneInfo* self, diplomat::capi::DiplomatWrite* write); @@ -169,7 +169,7 @@ inline void icu4x::TimeZoneInfo::set_time_zone_id(std::string_view id) { {id.data(), id.size()}); } -inline void icu4x::TimeZoneInfo::set_iana_time_zone_id(const icu4x::TimeZoneIdMapper& mapper, std::string_view id) { +inline void icu4x::TimeZoneInfo::set_iana_time_zone_id(const icu4x::IanaParser& mapper, std::string_view id) { icu4x::capi::icu4x_TimeZoneInfo_set_iana_time_zone_id_mv1(this->AsFFI(), mapper.AsFFI(), {id.data(), id.size()}); diff --git a/ffi/capi/bindings/dart/CalendarParseError.g.dart b/ffi/capi/bindings/dart/CalendarParseError.g.dart index 5997137fbc2..70ca2c70163 100644 --- a/ffi/capi/bindings/dart/CalendarParseError.g.dart +++ b/ffi/capi/bindings/dart/CalendarParseError.g.dart @@ -2,7 +2,7 @@ part of 'lib.g.dart'; -/// Additional information: [1](https://docs.rs/icu/latest/icu/calendar/enum.ParseError.html), [2](https://docs.rs/icu/latest/icu/timezone/enum.ParseError.html) +/// Additional information: [1](https://docs.rs/icu/latest/icu/calendar/enum.ParseError.html), [2](https://docs.rs/icu/latest/icu/time/enum.ParseError.html) enum CalendarParseError { unknown, diff --git a/ffi/capi/bindings/dart/DateTime.g.dart b/ffi/capi/bindings/dart/DateTime.g.dart index 766821fb0a7..62a3cfc79c9 100644 --- a/ffi/capi/bindings/dart/DateTime.g.dart +++ b/ffi/capi/bindings/dart/DateTime.g.dart @@ -9,7 +9,7 @@ final class _DateTimeFfi extends ffi.Struct { /// An ICU4X DateTime object capable of containing a date and time for any calendar. /// -/// See the [Rust documentation for `DateTime`](https://docs.rs/icu/latest/icu/timezone/struct.DateTime.html) for more information. +/// See the [Rust documentation for `DateTime`](https://docs.rs/icu/latest/icu/time/struct.DateTime.html) for more information. final class DateTime { final Date date; final Time time; @@ -34,7 +34,7 @@ final class DateTime { /// Creates a new [`DateTime`] from an IXDTF string. /// - /// See the [Rust documentation for `try_from_str`](https://docs.rs/icu/latest/icu/timezone/struct.DateTime.html#method.try_from_str) for more information. + /// See the [Rust documentation for `try_from_str`](https://docs.rs/icu/latest/icu/time/struct.DateTime.html#method.try_from_str) for more information. /// /// Throws [CalendarParseError] on failure. factory DateTime.fromString(String v, Calendar calendar) { diff --git a/ffi/capi/bindings/dart/TimeZoneIdMapper.g.dart b/ffi/capi/bindings/dart/IanaParser.g.dart similarity index 53% rename from ffi/capi/bindings/dart/TimeZoneIdMapper.g.dart rename to ffi/capi/bindings/dart/IanaParser.g.dart index c2e2cd3175f..87bab4709a2 100644 --- a/ffi/capi/bindings/dart/TimeZoneIdMapper.g.dart +++ b/ffi/capi/bindings/dart/IanaParser.g.dart @@ -7,8 +7,8 @@ part of 'lib.g.dart'; /// This mapper supports two-way mapping, but it is optimized for the case of IANA to BCP-47. /// It also supports normalizing and canonicalizing the IANA strings. /// -/// See the [Rust documentation for `TimeZoneIdMapper`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapper.html) for more information. -final class TimeZoneIdMapper implements ffi.Finalizable { +/// See the [Rust documentation for `IanaParser`](https://docs.rs/icu/latest/icu/time/zone/iana/struct.IanaParser.html) for more information. +final class IanaParser implements ffi.Finalizable { final ffi.Pointer _ffi; // These are "used" in the sense that they keep dependencies alive @@ -19,70 +19,70 @@ final class TimeZoneIdMapper implements ffi.Finalizable { // corresponding to data this may borrow from. These should be flat arrays containing // references to objects, and this object will hold on to them to keep them alive and // maintain borrow validity. - TimeZoneIdMapper._fromFfi(this._ffi, this._selfEdge) { + IanaParser._fromFfi(this._ffi, this._selfEdge) { if (_selfEdge.isEmpty) { _finalizer.attach(this, _ffi.cast()); } } - static final _finalizer = ffi.NativeFinalizer(ffi.Native.addressOf(_icu4x_TimeZoneIdMapper_destroy_mv1)); + static final _finalizer = ffi.NativeFinalizer(ffi.Native.addressOf(_icu4x_IanaParser_destroy_mv1)); - /// Create a new [`TimeZoneIdMapper`] using compiled data + /// Create a new [`IanaParser`] using compiled data /// - /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapper.html#method.new) for more information. - factory TimeZoneIdMapper() { - final result = _icu4x_TimeZoneIdMapper_create_mv1(); - return TimeZoneIdMapper._fromFfi(result, []); + /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/time/zone/iana/struct.IanaParser.html#method.new) for more information. + factory IanaParser() { + final result = _icu4x_IanaParser_create_mv1(); + return IanaParser._fromFfi(result, []); } - /// Create a new [`TimeZoneIdMapper`] using a particular data source + /// Create a new [`IanaParser`] using a particular data source /// - /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapper.html#method.new) for more information. + /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/time/zone/iana/struct.IanaParser.html#method.new) for more information. /// /// Throws [DataError] on failure. - factory TimeZoneIdMapper.withProvider(DataProvider provider) { - final result = _icu4x_TimeZoneIdMapper_create_with_provider_mv1(provider._ffi); + factory IanaParser.withProvider(DataProvider provider) { + final result = _icu4x_IanaParser_create_with_provider_mv1(provider._ffi); if (!result.isOk) { throw DataError.values[result.union.err]; } - return TimeZoneIdMapper._fromFfi(result.union.ok, []); + return IanaParser._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. + /// See the [Rust documentation for `iana_to_bcp47`](https://docs.rs/icu/latest/icu/time/zone/iana/struct.IanaParserBorrowed.html#method.iana_to_bcp47) for more information. String ianaToBcp47(String value) { final temp = _FinalizedArena(); final write = _Write(); - _icu4x_TimeZoneIdMapper_iana_to_bcp47_mv1(_ffi, value._utf8AllocIn(temp.arena), write._ffi); + _icu4x_IanaParser_iana_to_bcp47_mv1(_ffi, value._utf8AllocIn(temp.arena), write._ffi); 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. + /// See the [Rust documentation for `normalize_iana`](https://docs.rs/icu/latest/icu/time/zone/iana/struct.IanaParserBorrowed.html#method.normalize_iana) for more information. String? normalizeIana(String value) { final temp = _FinalizedArena(); final write = _Write(); - final result = _icu4x_TimeZoneIdMapper_normalize_iana_mv1(_ffi, value._utf8AllocIn(temp.arena), write._ffi); + final result = _icu4x_IanaParser_normalize_iana_mv1(_ffi, value._utf8AllocIn(temp.arena), write._ffi); if (!result.isOk) { return null; } 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. + /// See the [Rust documentation for `canonicalize_iana`](https://docs.rs/icu/latest/icu/time/zone/iana/struct.IanaParserBorrowed.html#method.canonicalize_iana) for more information. String? canonicalizeIana(String value) { final temp = _FinalizedArena(); final write = _Write(); - final result = _icu4x_TimeZoneIdMapper_canonicalize_iana_mv1(_ffi, value._utf8AllocIn(temp.arena), write._ffi); + final result = _icu4x_IanaParser_canonicalize_iana_mv1(_ffi, value._utf8AllocIn(temp.arena), write._ffi); if (!result.isOk) { return null; } 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. + /// See the [Rust documentation for `find_canonical_iana_from_bcp47`](https://docs.rs/icu/latest/icu/time/zone/iana/struct.IanaParserBorrowed.html#method.find_canonical_iana_from_bcp47) for more information. String? findCanonicalIanaFromBcp47(String value) { final temp = _FinalizedArena(); final write = _Write(); - final result = _icu4x_TimeZoneIdMapper_find_canonical_iana_from_bcp47_mv1(_ffi, value._utf8AllocIn(temp.arena), write._ffi); + final result = _icu4x_IanaParser_find_canonical_iana_from_bcp47_mv1(_ffi, value._utf8AllocIn(temp.arena), write._ffi); if (!result.isOk) { return null; } @@ -91,36 +91,36 @@ final class TimeZoneIdMapper implements ffi.Finalizable { } @meta.RecordUse() -@ffi.Native)>(isLeaf: true, symbol: 'icu4x_TimeZoneIdMapper_destroy_mv1') +@ffi.Native)>(isLeaf: true, symbol: 'icu4x_IanaParser_destroy_mv1') // ignore: non_constant_identifier_names -external void _icu4x_TimeZoneIdMapper_destroy_mv1(ffi.Pointer self); +external void _icu4x_IanaParser_destroy_mv1(ffi.Pointer self); @meta.RecordUse() -@ffi.Native Function()>(isLeaf: true, symbol: 'icu4x_TimeZoneIdMapper_create_mv1') +@ffi.Native Function()>(isLeaf: true, symbol: 'icu4x_IanaParser_create_mv1') // ignore: non_constant_identifier_names -external ffi.Pointer _icu4x_TimeZoneIdMapper_create_mv1(); +external ffi.Pointer _icu4x_IanaParser_create_mv1(); @meta.RecordUse() -@ffi.Native<_ResultOpaqueInt32 Function(ffi.Pointer)>(isLeaf: true, symbol: 'icu4x_TimeZoneIdMapper_create_with_provider_mv1') +@ffi.Native<_ResultOpaqueInt32 Function(ffi.Pointer)>(isLeaf: true, symbol: 'icu4x_IanaParser_create_with_provider_mv1') // ignore: non_constant_identifier_names -external _ResultOpaqueInt32 _icu4x_TimeZoneIdMapper_create_with_provider_mv1(ffi.Pointer provider); +external _ResultOpaqueInt32 _icu4x_IanaParser_create_with_provider_mv1(ffi.Pointer provider); @meta.RecordUse() -@ffi.Native, _SliceUtf8, ffi.Pointer)>(isLeaf: true, symbol: 'icu4x_TimeZoneIdMapper_iana_to_bcp47_mv1') +@ffi.Native, _SliceUtf8, ffi.Pointer)>(isLeaf: true, symbol: 'icu4x_IanaParser_iana_to_bcp47_mv1') // ignore: non_constant_identifier_names -external void _icu4x_TimeZoneIdMapper_iana_to_bcp47_mv1(ffi.Pointer self, _SliceUtf8 value, ffi.Pointer write); +external void _icu4x_IanaParser_iana_to_bcp47_mv1(ffi.Pointer self, _SliceUtf8 value, ffi.Pointer write); @meta.RecordUse() -@ffi.Native<_ResultVoidVoid Function(ffi.Pointer, _SliceUtf8, ffi.Pointer)>(isLeaf: true, symbol: 'icu4x_TimeZoneIdMapper_normalize_iana_mv1') +@ffi.Native<_ResultVoidVoid Function(ffi.Pointer, _SliceUtf8, ffi.Pointer)>(isLeaf: true, symbol: 'icu4x_IanaParser_normalize_iana_mv1') // ignore: non_constant_identifier_names -external _ResultVoidVoid _icu4x_TimeZoneIdMapper_normalize_iana_mv1(ffi.Pointer self, _SliceUtf8 value, ffi.Pointer write); +external _ResultVoidVoid _icu4x_IanaParser_normalize_iana_mv1(ffi.Pointer self, _SliceUtf8 value, ffi.Pointer write); @meta.RecordUse() -@ffi.Native<_ResultVoidVoid Function(ffi.Pointer, _SliceUtf8, ffi.Pointer)>(isLeaf: true, symbol: 'icu4x_TimeZoneIdMapper_canonicalize_iana_mv1') +@ffi.Native<_ResultVoidVoid Function(ffi.Pointer, _SliceUtf8, ffi.Pointer)>(isLeaf: true, symbol: 'icu4x_IanaParser_canonicalize_iana_mv1') // ignore: non_constant_identifier_names -external _ResultVoidVoid _icu4x_TimeZoneIdMapper_canonicalize_iana_mv1(ffi.Pointer self, _SliceUtf8 value, ffi.Pointer write); +external _ResultVoidVoid _icu4x_IanaParser_canonicalize_iana_mv1(ffi.Pointer self, _SliceUtf8 value, ffi.Pointer write); @meta.RecordUse() -@ffi.Native<_ResultVoidVoid Function(ffi.Pointer, _SliceUtf8, ffi.Pointer)>(isLeaf: true, symbol: 'icu4x_TimeZoneIdMapper_find_canonical_iana_from_bcp47_mv1') +@ffi.Native<_ResultVoidVoid Function(ffi.Pointer, _SliceUtf8, ffi.Pointer)>(isLeaf: true, symbol: 'icu4x_IanaParser_find_canonical_iana_from_bcp47_mv1') // ignore: non_constant_identifier_names -external _ResultVoidVoid _icu4x_TimeZoneIdMapper_find_canonical_iana_from_bcp47_mv1(ffi.Pointer self, _SliceUtf8 value, ffi.Pointer write); +external _ResultVoidVoid _icu4x_IanaParser_find_canonical_iana_from_bcp47_mv1(ffi.Pointer self, _SliceUtf8 value, ffi.Pointer write); diff --git a/ffi/capi/bindings/dart/IanaParserExtended.g.dart b/ffi/capi/bindings/dart/IanaParserExtended.g.dart new file mode 100644 index 00000000000..e4d547e0536 --- /dev/null +++ b/ffi/capi/bindings/dart/IanaParserExtended.g.dart @@ -0,0 +1,101 @@ +// generated by diplomat-tool + +part of 'lib.g.dart'; + +/// A mapper between IANA time zone identifiers and BCP-47 time zone identifiers. +/// +/// This mapper supports two-way mapping, but it is optimized for the case of IANA to BCP-47. +/// It also supports normalizing and canonicalizing the IANA strings. +/// +/// See the [Rust documentation for `IanaParserExtended`](https://docs.rs/icu/latest/icu/time/zone/iana/struct.IanaParserExtended.html) for more information. +final class IanaParserExtended implements ffi.Finalizable { + final ffi.Pointer _ffi; + + // These are "used" in the sense that they keep dependencies alive + // ignore: unused_field + final core.List _selfEdge; + + // This takes in a list of lifetime edges (including for &self borrows) + // corresponding to data this may borrow from. These should be flat arrays containing + // references to objects, and this object will hold on to them to keep them alive and + // maintain borrow validity. + IanaParserExtended._fromFfi(this._ffi, this._selfEdge) { + if (_selfEdge.isEmpty) { + _finalizer.attach(this, _ffi.cast()); + } + } + + static final _finalizer = ffi.NativeFinalizer(ffi.Native.addressOf(_icu4x_IanaParserExtended_destroy_mv1)); + + /// Create a new [`IanaParserExtended`] using compiled data + /// + /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/time/zone/iana/struct.IanaParserExtended.html#method.new) for more information. + /// + /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/time/zone/iana/struct.IanaParserExtendedBorrowed.html#method.new) for more information. + factory IanaParserExtended() { + final result = _icu4x_IanaParserExtended_create_mv1(); + return IanaParserExtended._fromFfi(result, []); + } + + /// Create a new [`IanaParserExtended`] using a particular data source + /// + /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/time/zone/iana/struct.IanaParserExtended.html#method.new) for more information. + /// + /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/time/zone/iana/struct.IanaParserExtendedBorrowed.html#method.new) for more information. + /// + /// Throws [DataError] on failure. + factory IanaParserExtended.withProvider(DataProvider provider) { + final result = _icu4x_IanaParserExtended_create_with_provider_mv1(provider._ffi); + if (!result.isOk) { + throw DataError.values[result.union.err]; + } + return IanaParserExtended._fromFfi(result.union.ok, []); + } + + /// See the [Rust documentation for `canonicalize_iana`](https://docs.rs/icu/latest/icu/time/zone/iana/struct.IanaParserExtendedBorrowed.html#method.canonicalize_iana) for more information. + String? canonicalizeIana(String value) { + final temp = _FinalizedArena(); + final write = _Write(); + final result = _icu4x_IanaParserExtended_canonicalize_iana_mv1(_ffi, value._utf8AllocIn(temp.arena), write._ffi); + if (!result.isOk) { + return null; + } + return write.finalize(); + } + + /// See the [Rust documentation for `canonical_iana_from_bcp47`](https://docs.rs/icu/latest/icu/time/zone/iana/struct.IanaParserExtendedBorrowed.html#method.canonical_iana_from_bcp47) for more information. + String? canonicalIanaFromBcp47(String value) { + final temp = _FinalizedArena(); + final write = _Write(); + final result = _icu4x_IanaParserExtended_canonical_iana_from_bcp47_mv1(_ffi, value._utf8AllocIn(temp.arena), write._ffi); + if (!result.isOk) { + return null; + } + return write.finalize(); + } +} + +@meta.RecordUse() +@ffi.Native)>(isLeaf: true, symbol: 'icu4x_IanaParserExtended_destroy_mv1') +// ignore: non_constant_identifier_names +external void _icu4x_IanaParserExtended_destroy_mv1(ffi.Pointer self); + +@meta.RecordUse() +@ffi.Native Function()>(isLeaf: true, symbol: 'icu4x_IanaParserExtended_create_mv1') +// ignore: non_constant_identifier_names +external ffi.Pointer _icu4x_IanaParserExtended_create_mv1(); + +@meta.RecordUse() +@ffi.Native<_ResultOpaqueInt32 Function(ffi.Pointer)>(isLeaf: true, symbol: 'icu4x_IanaParserExtended_create_with_provider_mv1') +// ignore: non_constant_identifier_names +external _ResultOpaqueInt32 _icu4x_IanaParserExtended_create_with_provider_mv1(ffi.Pointer provider); + +@meta.RecordUse() +@ffi.Native<_ResultVoidVoid Function(ffi.Pointer, _SliceUtf8, ffi.Pointer)>(isLeaf: true, symbol: 'icu4x_IanaParserExtended_canonicalize_iana_mv1') +// ignore: non_constant_identifier_names +external _ResultVoidVoid _icu4x_IanaParserExtended_canonicalize_iana_mv1(ffi.Pointer self, _SliceUtf8 value, ffi.Pointer write); + +@meta.RecordUse() +@ffi.Native<_ResultVoidVoid Function(ffi.Pointer, _SliceUtf8, ffi.Pointer)>(isLeaf: true, symbol: 'icu4x_IanaParserExtended_canonical_iana_from_bcp47_mv1') +// ignore: non_constant_identifier_names +external _ResultVoidVoid _icu4x_IanaParserExtended_canonical_iana_from_bcp47_mv1(ffi.Pointer self, _SliceUtf8 value, ffi.Pointer write); diff --git a/ffi/capi/bindings/dart/IsoDateTime.g.dart b/ffi/capi/bindings/dart/IsoDateTime.g.dart index 8958c1702d7..bbb741d3ba8 100644 --- a/ffi/capi/bindings/dart/IsoDateTime.g.dart +++ b/ffi/capi/bindings/dart/IsoDateTime.g.dart @@ -9,7 +9,7 @@ final class _IsoDateTimeFfi extends ffi.Struct { /// An ICU4X DateTime object capable of containing a ISO-8601 date and time. /// -/// See the [Rust documentation for `DateTime`](https://docs.rs/icu/latest/icu/timezone/struct.DateTime.html) for more information. +/// See the [Rust documentation for `DateTime`](https://docs.rs/icu/latest/icu/time/struct.DateTime.html) for more information. final class IsoDateTime { final IsoDate date; final Time time; @@ -34,7 +34,7 @@ final class IsoDateTime { /// Creates a new [`IsoDateTime`] from an IXDTF string. /// - /// See the [Rust documentation for `try_from_str`](https://docs.rs/icu/latest/icu/timezone/struct.DateTime.html#method.try_from_str) for more information. + /// See the [Rust documentation for `try_from_str`](https://docs.rs/icu/latest/icu/time/struct.DateTime.html#method.try_from_str) for more information. /// /// Throws [CalendarParseError] on failure. factory IsoDateTime.fromString(String v) { diff --git a/ffi/capi/bindings/dart/Time.g.dart b/ffi/capi/bindings/dart/Time.g.dart index 8bb14a50408..571a0f12c25 100644 --- a/ffi/capi/bindings/dart/Time.g.dart +++ b/ffi/capi/bindings/dart/Time.g.dart @@ -4,7 +4,7 @@ part of 'lib.g.dart'; /// An ICU4X Time object representing a time in terms of hour, minute, second, nanosecond /// -/// See the [Rust documentation for `Time`](https://docs.rs/icu/latest/icu/timezone/struct.Time.html) for more information. +/// See the [Rust documentation for `Time`](https://docs.rs/icu/latest/icu/time/struct.Time.html) for more information. final class Time implements ffi.Finalizable { final ffi.Pointer _ffi; @@ -26,11 +26,11 @@ final class Time implements ffi.Finalizable { /// Creates a new [`Time`] given field values /// - /// See the [Rust documentation for `try_new`](https://docs.rs/icu/latest/icu/timezone/struct.Time.html#method.try_new) for more information. + /// See the [Rust documentation for `try_new`](https://docs.rs/icu/latest/icu/time/struct.Time.html#method.try_new) for more information. /// /// Throws [CalendarError] on failure. - factory Time(int hour, int minute, int second, int nanosecond) { - final result = _icu4x_Time_create_mv1(hour, minute, second, nanosecond); + factory Time(int hour, int minute, int second, int subsecond) { + final result = _icu4x_Time_create_mv1(hour, minute, second, subsecond); if (!result.isOk) { throw CalendarError.values[result.union.err]; } @@ -39,7 +39,7 @@ final class Time implements ffi.Finalizable { /// Creates a new [`Time`] from an IXDTF string. /// - /// See the [Rust documentation for `try_from_str`](https://docs.rs/icu/latest/icu/timezone/struct.Time.html#method.try_from_str) for more information. + /// See the [Rust documentation for `try_from_str`](https://docs.rs/icu/latest/icu/time/struct.Time.html#method.try_from_str) for more information. /// /// Throws [CalendarParseError] on failure. factory Time.fromString(String v) { @@ -53,7 +53,7 @@ final class Time implements ffi.Finalizable { /// Creates a new [`Time`] representing midnight (00:00.000). /// - /// See the [Rust documentation for `midnight`](https://docs.rs/icu/latest/icu/timezone/struct.Time.html#method.midnight) for more information. + /// See the [Rust documentation for `midnight`](https://docs.rs/icu/latest/icu/time/struct.Time.html#method.midnight) for more information. /// /// Throws [CalendarError] on failure. factory Time.midnight() { @@ -66,7 +66,7 @@ final class Time implements ffi.Finalizable { /// Returns the hour in this time /// - /// See the [Rust documentation for `hour`](https://docs.rs/icu/latest/icu/timezone/struct.Time.html#structfield.hour) for more information. + /// See the [Rust documentation for `hour`](https://docs.rs/icu/latest/icu/time/struct.Time.html#structfield.hour) for more information. int get hour { final result = _icu4x_Time_hour_mv1(_ffi); return result; @@ -74,7 +74,7 @@ final class Time implements ffi.Finalizable { /// Returns the minute in this time /// - /// See the [Rust documentation for `minute`](https://docs.rs/icu/latest/icu/timezone/struct.Time.html#structfield.minute) for more information. + /// See the [Rust documentation for `minute`](https://docs.rs/icu/latest/icu/time/struct.Time.html#structfield.minute) for more information. int get minute { final result = _icu4x_Time_minute_mv1(_ffi); return result; @@ -82,17 +82,17 @@ final class Time implements ffi.Finalizable { /// Returns the second in this time /// - /// See the [Rust documentation for `second`](https://docs.rs/icu/latest/icu/timezone/struct.Time.html#structfield.second) for more information. + /// See the [Rust documentation for `second`](https://docs.rs/icu/latest/icu/time/struct.Time.html#structfield.second) for more information. int get second { final result = _icu4x_Time_second_mv1(_ffi); return result; } - /// Returns the nanosecond in this time + /// Returns the subsecond in this time as nanoseconds /// - /// See the [Rust documentation for `nanosecond`](https://docs.rs/icu/latest/icu/timezone/struct.Time.html#structfield.nanosecond) for more information. - int get nanosecond { - final result = _icu4x_Time_nanosecond_mv1(_ffi); + /// See the [Rust documentation for `subsecond`](https://docs.rs/icu/latest/icu/time/struct.Time.html#structfield.subsecond) for more information. + int get subsecond { + final result = _icu4x_Time_subsecond_mv1(_ffi); return result; } } @@ -105,7 +105,7 @@ external void _icu4x_Time_destroy_mv1(ffi.Pointer self); @meta.RecordUse() @ffi.Native<_ResultOpaqueInt32 Function(ffi.Uint8, ffi.Uint8, ffi.Uint8, ffi.Uint32)>(isLeaf: true, symbol: 'icu4x_Time_create_mv1') // ignore: non_constant_identifier_names -external _ResultOpaqueInt32 _icu4x_Time_create_mv1(int hour, int minute, int second, int nanosecond); +external _ResultOpaqueInt32 _icu4x_Time_create_mv1(int hour, int minute, int second, int subsecond); @meta.RecordUse() @ffi.Native<_ResultOpaqueInt32 Function(_SliceUtf8)>(isLeaf: true, symbol: 'icu4x_Time_from_string_mv1') @@ -133,6 +133,6 @@ external int _icu4x_Time_minute_mv1(ffi.Pointer self); external int _icu4x_Time_second_mv1(ffi.Pointer self); @meta.RecordUse() -@ffi.Native)>(isLeaf: true, symbol: 'icu4x_Time_nanosecond_mv1') +@ffi.Native)>(isLeaf: true, symbol: 'icu4x_Time_subsecond_mv1') // ignore: non_constant_identifier_names -external int _icu4x_Time_nanosecond_mv1(ffi.Pointer self); +external int _icu4x_Time_subsecond_mv1(ffi.Pointer self); diff --git a/ffi/capi/bindings/dart/TimeZoneIdMapperWithFastCanonicalization.g.dart b/ffi/capi/bindings/dart/TimeZoneIdMapperWithFastCanonicalization.g.dart deleted file mode 100644 index 2c7618ceb0c..00000000000 --- a/ffi/capi/bindings/dart/TimeZoneIdMapperWithFastCanonicalization.g.dart +++ /dev/null @@ -1,101 +0,0 @@ -// generated by diplomat-tool - -part of 'lib.g.dart'; - -/// A mapper between IANA time zone identifiers and BCP-47 time zone identifiers. -/// -/// This mapper supports two-way mapping, but it is optimized for the case of IANA to BCP-47. -/// It also supports normalizing and canonicalizing the IANA strings. -/// -/// See the [Rust documentation for `TimeZoneIdMapperWithFastCanonicalization`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapperWithFastCanonicalization.html) for more information. -final class TimeZoneIdMapperWithFastCanonicalization implements ffi.Finalizable { - final ffi.Pointer _ffi; - - // These are "used" in the sense that they keep dependencies alive - // ignore: unused_field - final core.List _selfEdge; - - // This takes in a list of lifetime edges (including for &self borrows) - // corresponding to data this may borrow from. These should be flat arrays containing - // references to objects, and this object will hold on to them to keep them alive and - // maintain borrow validity. - TimeZoneIdMapperWithFastCanonicalization._fromFfi(this._ffi, this._selfEdge) { - if (_selfEdge.isEmpty) { - _finalizer.attach(this, _ffi.cast()); - } - } - - static final _finalizer = ffi.NativeFinalizer(ffi.Native.addressOf(_icu4x_TimeZoneIdMapperWithFastCanonicalization_destroy_mv1)); - - /// Create a new [`TimeZoneIdMapperWithFastCanonicalization`] using compiled data - /// - /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapperWithFastCanonicalization.html#method.new) for more information. - /// - /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapperWithFastCanonicalizationBorrowed.html#method.new) for more information. - factory TimeZoneIdMapperWithFastCanonicalization() { - final result = _icu4x_TimeZoneIdMapperWithFastCanonicalization_create_mv1(); - return TimeZoneIdMapperWithFastCanonicalization._fromFfi(result, []); - } - - /// Create a new [`TimeZoneIdMapperWithFastCanonicalization`] using a particular data source - /// - /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapperWithFastCanonicalization.html#method.new) for more information. - /// - /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapperWithFastCanonicalizationBorrowed.html#method.new) for more information. - /// - /// Throws [DataError] on failure. - factory TimeZoneIdMapperWithFastCanonicalization.withProvider(DataProvider provider) { - final result = _icu4x_TimeZoneIdMapperWithFastCanonicalization_create_with_provider_mv1(provider._ffi); - if (!result.isOk) { - 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. - String? canonicalizeIana(String value) { - final temp = _FinalizedArena(); - final write = _Write(); - final result = _icu4x_TimeZoneIdMapperWithFastCanonicalization_canonicalize_iana_mv1(_ffi, value._utf8AllocIn(temp.arena), write._ffi); - if (!result.isOk) { - return null; - } - 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. - String? canonicalIanaFromBcp47(String value) { - final temp = _FinalizedArena(); - final write = _Write(); - final result = _icu4x_TimeZoneIdMapperWithFastCanonicalization_canonical_iana_from_bcp47_mv1(_ffi, value._utf8AllocIn(temp.arena), write._ffi); - if (!result.isOk) { - return null; - } - return write.finalize(); - } -} - -@meta.RecordUse() -@ffi.Native)>(isLeaf: true, symbol: 'icu4x_TimeZoneIdMapperWithFastCanonicalization_destroy_mv1') -// ignore: non_constant_identifier_names -external void _icu4x_TimeZoneIdMapperWithFastCanonicalization_destroy_mv1(ffi.Pointer self); - -@meta.RecordUse() -@ffi.Native Function()>(isLeaf: true, symbol: 'icu4x_TimeZoneIdMapperWithFastCanonicalization_create_mv1') -// ignore: non_constant_identifier_names -external ffi.Pointer _icu4x_TimeZoneIdMapperWithFastCanonicalization_create_mv1(); - -@meta.RecordUse() -@ffi.Native<_ResultOpaqueInt32 Function(ffi.Pointer)>(isLeaf: true, symbol: 'icu4x_TimeZoneIdMapperWithFastCanonicalization_create_with_provider_mv1') -// ignore: non_constant_identifier_names -external _ResultOpaqueInt32 _icu4x_TimeZoneIdMapperWithFastCanonicalization_create_with_provider_mv1(ffi.Pointer provider); - -@meta.RecordUse() -@ffi.Native<_ResultVoidVoid Function(ffi.Pointer, _SliceUtf8, ffi.Pointer)>(isLeaf: true, symbol: 'icu4x_TimeZoneIdMapperWithFastCanonicalization_canonicalize_iana_mv1') -// ignore: non_constant_identifier_names -external _ResultVoidVoid _icu4x_TimeZoneIdMapperWithFastCanonicalization_canonicalize_iana_mv1(ffi.Pointer self, _SliceUtf8 value, ffi.Pointer write); - -@meta.RecordUse() -@ffi.Native<_ResultVoidVoid Function(ffi.Pointer, _SliceUtf8, ffi.Pointer)>(isLeaf: true, symbol: 'icu4x_TimeZoneIdMapperWithFastCanonicalization_canonical_iana_from_bcp47_mv1') -// ignore: non_constant_identifier_names -external _ResultVoidVoid _icu4x_TimeZoneIdMapperWithFastCanonicalization_canonical_iana_from_bcp47_mv1(ffi.Pointer self, _SliceUtf8 value, ffi.Pointer write); diff --git a/ffi/capi/bindings/dart/TimeZoneInfo.g.dart b/ffi/capi/bindings/dart/TimeZoneInfo.g.dart index c042599d72d..518e2031a5c 100644 --- a/ffi/capi/bindings/dart/TimeZoneInfo.g.dart +++ b/ffi/capi/bindings/dart/TimeZoneInfo.g.dart @@ -2,7 +2,7 @@ part of 'lib.g.dart'; -/// See the [Rust documentation for `TimeZoneInfo`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneInfo.html) for more information. +/// See the [Rust documentation for `TimeZoneInfo`](https://docs.rs/icu/latest/icu/time/struct.TimeZoneInfo.html) for more information. final class TimeZoneInfo implements ffi.Finalizable { final ffi.Pointer _ffi; @@ -24,7 +24,7 @@ final class TimeZoneInfo implements ffi.Finalizable { /// Creates a time zone with no information. /// - /// See the [Rust documentation for `unknown`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneInfo.html#method.unknown) for more information. + /// See the [Rust documentation for `unknown`](https://docs.rs/icu/latest/icu/time/struct.TimeZoneInfo.html#method.unknown) for more information. factory TimeZoneInfo.unknown() { final result = _icu4x_TimeZoneInfo_unknown_mv1(); return TimeZoneInfo._fromFfi(result, []); @@ -32,7 +32,7 @@ final class TimeZoneInfo implements ffi.Finalizable { /// Creates a time zone for UTC (Coordinated Universal Time). /// - /// See the [Rust documentation for `utc`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneInfo.html#method.utc) for more information. + /// See the [Rust documentation for `utc`](https://docs.rs/icu/latest/icu/time/struct.TimeZoneInfo.html#method.utc) for more information. factory TimeZoneInfo.utc() { final result = _icu4x_TimeZoneInfo_utc_mv1(); return TimeZoneInfo._fromFfi(result, []); @@ -49,11 +49,11 @@ final class TimeZoneInfo implements ffi.Finalizable { /// /// Errors if the offset seconds are out of range. /// - /// See the [Rust documentation for `with_offset`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneBcp47Id.html#method.with_offset) for more information. + /// See the [Rust documentation for `with_offset`](https://docs.rs/icu/latest/icu/time/struct.TimeZone.html#method.with_offset) for more information. /// - /// See the [Rust documentation for `try_from_seconds`](https://docs.rs/icu/latest/icu/timezone/struct.UtcOffset.html#method.try_from_seconds) for more information. + /// See the [Rust documentation for `try_from_seconds`](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html#method.try_from_seconds) for more information. /// - /// Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.UtcOffset.html) + /// Additional information: [1](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html) /// /// Throws [TimeZoneInvalidOffsetError] on failure. void trySetOffsetSeconds(int offsetSeconds) { @@ -66,22 +66,22 @@ final class TimeZoneInfo implements ffi.Finalizable { /// Sets the `offset` field from offset as eighths of an hour. /// - /// See the [Rust documentation for `with_offset`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneBcp47Id.html#method.with_offset) for more information. + /// See the [Rust documentation for `with_offset`](https://docs.rs/icu/latest/icu/time/struct.TimeZone.html#method.with_offset) for more information. /// - /// See the [Rust documentation for `from_eighths_of_hour`](https://docs.rs/icu/latest/icu/timezone/struct.UtcOffset.html#method.from_eighths_of_hour) for more information. + /// See the [Rust documentation for `from_eighths_of_hour`](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html#method.from_eighths_of_hour) for more information. /// - /// Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.UtcOffset.html) + /// Additional information: [1](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html) void setOffsetEighthsOfHour(int offsetEighthsOfHour) { _icu4x_TimeZoneInfo_set_offset_eighths_of_hour_mv1(_ffi, offsetEighthsOfHour); } /// Sets the `offset` field from a string. /// - /// See the [Rust documentation for `with_offset`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneBcp47Id.html#method.with_offset) for more information. + /// See the [Rust documentation for `with_offset`](https://docs.rs/icu/latest/icu/time/struct.TimeZone.html#method.with_offset) for more information. /// - /// See the [Rust documentation for `try_from_str`](https://docs.rs/icu/latest/icu/timezone/struct.UtcOffset.html#method.try_from_str) for more information. + /// See the [Rust documentation for `try_from_str`](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html#method.try_from_str) for more information. /// - /// Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.UtcOffset.html) + /// Additional information: [1](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html) /// /// Throws [TimeZoneInvalidOffsetError] on failure. void trySetOffsetStr(String offset) { @@ -95,7 +95,7 @@ final class TimeZoneInfo implements ffi.Finalizable { /// Gets the `offset` field from offset as eighths of an hour. /// - /// See the [Rust documentation for `to_eighths_of_hour`](https://docs.rs/icu/latest/icu/timezone/struct.UtcOffset.html#method.to_eighths_of_hour) for more information. + /// See the [Rust documentation for `to_eighths_of_hour`](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html#method.to_eighths_of_hour) for more information. int? offsetEighthsOfHour() { final result = _icu4x_TimeZoneInfo_offset_eighths_of_hour_mv1(_ffi); if (!result.isOk) { @@ -106,9 +106,9 @@ final class TimeZoneInfo implements ffi.Finalizable { /// Clears the `offset` field. /// - /// See the [Rust documentation for `offset_seconds`](https://docs.rs/icu/latest/icu/timezone/struct.UtcOffset.html#method.offset_seconds) for more information. + /// See the [Rust documentation for `offset_seconds`](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html#method.offset_seconds) for more information. /// - /// Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.UtcOffset.html), [2](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneBcp47Id.html#method.without_offset) + /// Additional information: [1](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html), [2](https://docs.rs/icu/latest/icu/time/struct.TimeZone.html#method.without_offset) void clearOffset() { _icu4x_TimeZoneInfo_clear_offset_mv1(_ffi); } @@ -117,11 +117,11 @@ final class TimeZoneInfo implements ffi.Finalizable { /// /// Returns null if the `offset` field is empty. /// - /// See the [Rust documentation for `offset`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneInfo.html#method.offset) for more information. + /// See the [Rust documentation for `offset`](https://docs.rs/icu/latest/icu/time/struct.TimeZoneInfo.html#method.offset) for more information. /// - /// See the [Rust documentation for `to_seconds`](https://docs.rs/icu/latest/icu/timezone/struct.UtcOffset.html#method.to_seconds) for more information. + /// See the [Rust documentation for `to_seconds`](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html#method.to_seconds) for more information. /// - /// Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.UtcOffset.html) + /// Additional information: [1](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html) int? get offsetSeconds { final result = _icu4x_TimeZoneInfo_offset_seconds_mv1(_ffi); if (!result.isOk) { @@ -134,7 +134,7 @@ final class TimeZoneInfo implements ffi.Finalizable { /// /// Returns null if the `offset` field is empty. /// - /// See the [Rust documentation for `is_non_negative`](https://docs.rs/icu/latest/icu/timezone/struct.UtcOffset.html#method.is_non_negative) for more information. + /// See the [Rust documentation for `is_non_negative`](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html#method.is_non_negative) for more information. bool? get isOffsetNonNegative { final result = _icu4x_TimeZoneInfo_is_offset_non_negative_mv1(_ffi); if (!result.isOk) { @@ -147,7 +147,7 @@ final class TimeZoneInfo implements ffi.Finalizable { /// /// Returns null if the `offset` field is empty (which is not the same as zero). /// - /// See the [Rust documentation for `is_zero`](https://docs.rs/icu/latest/icu/timezone/struct.UtcOffset.html#method.is_zero) for more information. + /// See the [Rust documentation for `is_zero`](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html#method.is_zero) for more information. bool? get isOffsetZero { final result = _icu4x_TimeZoneInfo_is_offset_zero_mv1(_ffi); if (!result.isOk) { @@ -160,7 +160,7 @@ final class TimeZoneInfo implements ffi.Finalizable { /// /// Returns null if the `offset` field is empty. /// - /// See the [Rust documentation for `hours_part`](https://docs.rs/icu/latest/icu/timezone/struct.UtcOffset.html#method.hours_part) for more information. + /// See the [Rust documentation for `hours_part`](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html#method.hours_part) for more information. int? get offsetHoursPart { final result = _icu4x_TimeZoneInfo_offset_hours_part_mv1(_ffi); if (!result.isOk) { @@ -173,7 +173,7 @@ final class TimeZoneInfo implements ffi.Finalizable { /// /// Returns null if the `offset` field is empty. /// - /// See the [Rust documentation for `minutes_part`](https://docs.rs/icu/latest/icu/timezone/struct.UtcOffset.html#method.minutes_part) for more information. + /// See the [Rust documentation for `minutes_part`](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html#method.minutes_part) for more information. int? get offsetMinutesPart { final result = _icu4x_TimeZoneInfo_offset_minutes_part_mv1(_ffi); if (!result.isOk) { @@ -186,7 +186,7 @@ final class TimeZoneInfo implements ffi.Finalizable { /// /// Returns null if the `offset` field is empty. /// - /// See the [Rust documentation for `seconds_part`](https://docs.rs/icu/latest/icu/timezone/struct.UtcOffset.html#method.seconds_part) for more information. + /// See the [Rust documentation for `seconds_part`](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html#method.seconds_part) for more information. int? get offsetSecondsPart { final result = _icu4x_TimeZoneInfo_offset_seconds_part_mv1(_ffi); if (!result.isOk) { @@ -199,7 +199,7 @@ final class TimeZoneInfo implements ffi.Finalizable { /// /// Errors if the string is not a valid BCP-47 time zone ID. /// - /// Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneBcp47Id.html) + /// Additional information: [1](https://docs.rs/icu/latest/icu/time/struct.TimeZone.html) void setTimeZoneId(String id) { final temp = _FinalizedArena(); _icu4x_TimeZoneInfo_set_time_zone_id_mv1(_ffi, id._utf8AllocIn(temp.arena)); @@ -207,7 +207,7 @@ final class TimeZoneInfo implements ffi.Finalizable { /// Sets the `time_zone_id` field from an IANA string by looking up /// the corresponding BCP-47 string. - void setIanaTimeZoneId(TimeZoneIdMapper mapper, String id) { + void setIanaTimeZoneId(IanaParser mapper, String id) { final temp = _FinalizedArena(); _icu4x_TimeZoneInfo_set_iana_time_zone_id_mv1(_ffi, mapper._ffi, id._utf8AllocIn(temp.arena)); } @@ -216,9 +216,9 @@ final class TimeZoneInfo implements ffi.Finalizable { /// /// Returns null if the `time_zone_id` field is empty. /// - /// See the [Rust documentation for `time_zone_id`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneInfo.html#method.time_zone_id) for more information. + /// See the [Rust documentation for `time_zone_id`](https://docs.rs/icu/latest/icu/time/struct.TimeZoneInfo.html#method.time_zone_id) for more information. /// - /// Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneBcp47Id.html) + /// Additional information: [1](https://docs.rs/icu/latest/icu/time/struct.TimeZone.html) String get timeZoneId { final write = _Write(); _icu4x_TimeZoneInfo_time_zone_id_mv1(_ffi, write._ffi); @@ -227,7 +227,7 @@ final class TimeZoneInfo implements ffi.Finalizable { /// Clears the `zone_variant` field. /// - /// Additional information: [1](https://docs.rs/icu/latest/icu/timezone/enum.ZoneVariant.html) + /// Additional information: [1](https://docs.rs/icu/latest/icu/time/enum.TimeZoneVariant.html) void clearZoneVariant() { _icu4x_TimeZoneInfo_clear_zone_variant_mv1(_ffi); } @@ -235,9 +235,9 @@ final class TimeZoneInfo implements ffi.Finalizable { /// Sets the `zone_variant` field to standard time, which may or may /// not correspond to a display name with Standard in its name. /// - /// See the [Rust documentation for `Standard`](https://docs.rs/icu/latest/icu/timezone/enum.ZoneVariant.html#variant.Standard) for more information. + /// See the [Rust documentation for `Standard`](https://docs.rs/icu/latest/icu/time/enum.TimeZoneVariant.html#variant.Standard) for more information. /// - /// See the [Rust documentation for `with_zone_variant`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneInfo.html#method.with_zone_variant) for more information. + /// See the [Rust documentation for `with_zone_variant`](https://docs.rs/icu/latest/icu/time/struct.TimeZoneInfo.html#method.with_zone_variant) for more information. void setStandardTime() { _icu4x_TimeZoneInfo_set_standard_time_mv1(_ffi); } @@ -245,9 +245,9 @@ final class TimeZoneInfo implements ffi.Finalizable { /// Sets the `zone_variant` field to "daylight" time, which may or may /// not correspond to a display name with "Daylight" in its name. /// - /// See the [Rust documentation for `Daylight`](https://docs.rs/icu/latest/icu/timezone/enum.ZoneVariant.html#variant.Daylight) for more information. + /// See the [Rust documentation for `Daylight`](https://docs.rs/icu/latest/icu/time/enum.TimeZoneVariant.html#variant.Daylight) for more information. /// - /// See the [Rust documentation for `with_zone_variant`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneInfo.html#method.with_zone_variant) for more information. + /// See the [Rust documentation for `with_zone_variant`](https://docs.rs/icu/latest/icu/time/struct.TimeZoneInfo.html#method.with_zone_variant) for more information. void setDaylightTime() { _icu4x_TimeZoneInfo_set_daylight_time_mv1(_ffi); } @@ -256,9 +256,9 @@ final class TimeZoneInfo implements ffi.Finalizable { /// /// Returns null if the `zone_variant` field is empty. /// - /// See the [Rust documentation for `Standard`](https://docs.rs/icu/latest/icu/timezone/enum.ZoneVariant.html#variant.Standard) for more information. + /// See the [Rust documentation for `Standard`](https://docs.rs/icu/latest/icu/time/enum.TimeZoneVariant.html#variant.Standard) for more information. /// - /// Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneInfo.html#method.zone_variant) + /// Additional information: [1](https://docs.rs/icu/latest/icu/time/struct.TimeZoneInfo.html#method.zone_variant) bool? get isStandardTime { final result = _icu4x_TimeZoneInfo_is_standard_time_mv1(_ffi); if (!result.isOk) { @@ -271,9 +271,9 @@ final class TimeZoneInfo implements ffi.Finalizable { /// /// Returns null if the `zone_variant` field is empty. /// - /// See the [Rust documentation for `Daylight`](https://docs.rs/icu/latest/icu/timezone/enum.ZoneVariant.html#variant.Daylight) for more information. + /// See the [Rust documentation for `Daylight`](https://docs.rs/icu/latest/icu/time/enum.TimeZoneVariant.html#variant.Daylight) for more information. /// - /// Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneInfo.html#method.zone_variant) + /// Additional information: [1](https://docs.rs/icu/latest/icu/time/struct.TimeZoneInfo.html#method.zone_variant) bool? get isDaylightTime { final result = _icu4x_TimeZoneInfo_is_daylight_time_mv1(_ffi); if (!result.isOk) { @@ -284,7 +284,7 @@ final class TimeZoneInfo implements ffi.Finalizable { /// Sets the `local_time` field. /// - /// See the [Rust documentation for `at_time`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneInfo.html#method.at_time) for more information. + /// See the [Rust documentation for `at_time`](https://docs.rs/icu/latest/icu/time/struct.TimeZoneInfo.html#method.at_time) for more information. void setLocalTime(IsoDate date, Time time) { _icu4x_TimeZoneInfo_set_local_time_mv1(_ffi, date._ffi, time._ffi); } @@ -296,7 +296,7 @@ final class TimeZoneInfo implements ffi.Finalizable { /// Returns a copy of the `local_time` field. /// - /// See the [Rust documentation for `local_time`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneInfo.html#method.local_time) for more information. + /// See the [Rust documentation for `local_time`](https://docs.rs/icu/latest/icu/time/struct.TimeZoneInfo.html#method.local_time) for more information. IsoDateTime? get getLocalTime { final result = _icu4x_TimeZoneInfo_get_local_time_mv1(_ffi); if (!result.isOk) { diff --git a/ffi/capi/bindings/dart/TimeZoneInvalidOffsetError.g.dart b/ffi/capi/bindings/dart/TimeZoneInvalidOffsetError.g.dart index 754e880cda1..3c5f2da98d9 100644 --- a/ffi/capi/bindings/dart/TimeZoneInvalidOffsetError.g.dart +++ b/ffi/capi/bindings/dart/TimeZoneInvalidOffsetError.g.dart @@ -2,7 +2,7 @@ part of 'lib.g.dart'; -/// Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.InvalidOffsetError.html) +/// Additional information: [1](https://docs.rs/icu/latest/icu/time/struct.InvalidOffsetError.html) final class TimeZoneInvalidOffsetError { TimeZoneInvalidOffsetError(); diff --git a/ffi/capi/bindings/dart/ZonedDateTime.g.dart b/ffi/capi/bindings/dart/ZonedDateTime.g.dart index 776e79c1e37..618b35413e6 100644 --- a/ffi/capi/bindings/dart/ZonedDateTime.g.dart +++ b/ffi/capi/bindings/dart/ZonedDateTime.g.dart @@ -10,7 +10,7 @@ final class _ZonedDateTimeFfi extends ffi.Struct { /// An ICU4X DateTime object capable of containing a date, time, and zone for any calendar. /// -/// See the [Rust documentation for `ZonedDateTime`](https://docs.rs/icu/latest/icu/timezone/struct.ZonedDateTime.html) for more information. +/// See the [Rust documentation for `ZonedDateTime`](https://docs.rs/icu/latest/icu/time/struct.ZonedDateTime.html) for more information. final class ZonedDateTime { final Date date; final Time time; diff --git a/ffi/capi/bindings/dart/ZonedDateTimeParser.g.dart b/ffi/capi/bindings/dart/ZonedDateTimeParser.g.dart index 16f17af5b19..60d4bbd6aba 100644 --- a/ffi/capi/bindings/dart/ZonedDateTimeParser.g.dart +++ b/ffi/capi/bindings/dart/ZonedDateTimeParser.g.dart @@ -2,7 +2,7 @@ part of 'lib.g.dart'; -/// See the [Rust documentation for `ZonedDateTimeParser`](https://docs.rs/icu/latest/icu/timezone/struct.ZonedDateTimeParser.html) for more information. +/// See the [Rust documentation for `ZonedDateTimeParser`](https://docs.rs/icu/latest/icu/time/struct.ZonedDateTimeParser.html) for more information. final class ZonedDateTimeParser implements ffi.Finalizable { final ffi.Pointer _ffi; @@ -24,7 +24,7 @@ final class ZonedDateTimeParser implements ffi.Finalizable { /// Construct a new [`ZonedDateTimeParser`] instance using compiled data. /// - /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/timezone/struct.ZonedDateTimeParser.html#method.new) for more information. + /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/time/struct.ZonedDateTimeParser.html#method.new) for more information. factory ZonedDateTimeParser() { final result = _icu4x_ZonedDateTimeParser_create_mv1(); return ZonedDateTimeParser._fromFfi(result, []); @@ -32,7 +32,7 @@ final class ZonedDateTimeParser implements ffi.Finalizable { /// Construct a new [`ZonedDateTimeParser`] instance using a particular data source. /// - /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/timezone/struct.ZonedDateTimeParser.html#method.new) for more information. + /// See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/time/struct.ZonedDateTimeParser.html#method.new) for more information. /// /// Throws [DataError] on failure. factory ZonedDateTimeParser.withProvider(DataProvider provider) { @@ -45,7 +45,7 @@ final class ZonedDateTimeParser implements ffi.Finalizable { /// Creates a new [`ZonedIsoDateTime`] from an IXDTF string. /// - /// See the [Rust documentation for `try_from_str`](https://docs.rs/icu/latest/icu/timezone/struct.ZonedDateTime.html#method.try_from_str) for more information. + /// See the [Rust documentation for `try_from_str`](https://docs.rs/icu/latest/icu/time/struct.ZonedDateTime.html#method.try_from_str) for more information. /// /// Throws [CalendarParseError] on failure. ZonedIsoDateTime tryIsoFromStr(String v) { @@ -59,7 +59,7 @@ final class ZonedDateTimeParser implements ffi.Finalizable { /// Creates a new [`ZonedDateTime`] from an IXDTF string. /// - /// See the [Rust documentation for `try_from_str`](https://docs.rs/icu/latest/icu/timezone/struct.DateTime.html#method.try_from_str) for more information. + /// See the [Rust documentation for `try_from_str`](https://docs.rs/icu/latest/icu/time/struct.DateTime.html#method.try_from_str) for more information. /// /// Throws [CalendarParseError] on failure. ZonedDateTime tryFromStr(String v, Calendar calendar) { diff --git a/ffi/capi/bindings/dart/ZonedIsoDateTime.g.dart b/ffi/capi/bindings/dart/ZonedIsoDateTime.g.dart index ed4d4fe168e..de86b3eec10 100644 --- a/ffi/capi/bindings/dart/ZonedIsoDateTime.g.dart +++ b/ffi/capi/bindings/dart/ZonedIsoDateTime.g.dart @@ -10,7 +10,7 @@ final class _ZonedIsoDateTimeFfi extends ffi.Struct { /// An ICU4X ZonedDateTime object capable of containing a ISO-8601 date, time, and zone. /// -/// See the [Rust documentation for `ZonedDateTime`](https://docs.rs/icu/latest/icu/timezone/struct.ZonedDateTime.html) for more information. +/// See the [Rust documentation for `ZonedDateTime`](https://docs.rs/icu/latest/icu/time/struct.ZonedDateTime.html) for more information. final class ZonedIsoDateTime { final IsoDate date; final Time time; diff --git a/ffi/capi/bindings/dart/lib.g.dart b/ffi/capi/bindings/dart/lib.g.dart index c7874721fe1..709dbfef3a4 100644 --- a/ffi/capi/bindings/dart/lib.g.dart +++ b/ffi/capi/bindings/dart/lib.g.dart @@ -81,6 +81,8 @@ part 'GraphemeClusterSegmenter.g.dart'; part 'GregorianDateFormatter.g.dart'; part 'GregorianZonedDateTimeFormatter.g.dart'; part 'HangulSyllableType.g.dart'; +part 'IanaParser.g.dart'; +part 'IanaParserExtended.g.dart'; part 'IndicSyllabicCategory.g.dart'; part 'IsoDate.g.dart'; part 'IsoDateTime.g.dart'; @@ -134,8 +136,6 @@ part 'SignedFixedDecimal.g.dart'; part 'Time.g.dart'; part 'TimeFormatter.g.dart'; part 'TimePrecision.g.dart'; -part 'TimeZoneIdMapper.g.dart'; -part 'TimeZoneIdMapperWithFastCanonicalization.g.dart'; part 'TimeZoneInfo.g.dart'; part 'TimeZoneInvalidOffsetError.g.dart'; part 'TitlecaseMapper.g.dart'; diff --git a/ffi/capi/bindings/demo_gen/DateTimeFormatter.d.ts b/ffi/capi/bindings/demo_gen/DateTimeFormatter.d.ts index 5c41bec495b..e2029d876a5 100644 --- a/ffi/capi/bindings/demo_gen/DateTimeFormatter.d.ts +++ b/ffi/capi/bindings/demo_gen/DateTimeFormatter.d.ts @@ -4,5 +4,5 @@ import { DateTimeFormatter } from "icu4x" import { IsoDate } from "icu4x" import { Locale } from "icu4x" import { Time } from "icu4x" -export function formatIso(dateTimeFormatterLocaleName: string, dateTimeFormatterLength: DateTimeLength, dateTimeFormatterTimePrecision: TimePrecision, dateTimeFormatterAlignment: DateTimeAlignment, dateTimeFormatterYearStyle: YearStyle, dateYear: number, dateMonth: number, dateDay: number, timeHour: number, timeMinute: number, timeSecond: number, timeNanosecond: number); -export function formatSameCalendar(dateTimeFormatterLocaleName: string, dateTimeFormatterLength: DateTimeLength, dateTimeFormatterTimePrecision: TimePrecision, dateTimeFormatterAlignment: DateTimeAlignment, dateTimeFormatterYearStyle: YearStyle, dateYear: number, dateMonth: number, dateDay: number, dateCalendarLocaleName: string, timeHour: number, timeMinute: number, timeSecond: number, timeNanosecond: number); +export function formatIso(dateTimeFormatterLocaleName: string, dateTimeFormatterLength: DateTimeLength, dateTimeFormatterTimePrecision: TimePrecision, dateTimeFormatterAlignment: DateTimeAlignment, dateTimeFormatterYearStyle: YearStyle, dateYear: number, dateMonth: number, dateDay: number, timeHour: number, timeMinute: number, timeSecond: number, timeSubsecond: number); +export function formatSameCalendar(dateTimeFormatterLocaleName: string, dateTimeFormatterLength: DateTimeLength, dateTimeFormatterTimePrecision: TimePrecision, dateTimeFormatterAlignment: DateTimeAlignment, dateTimeFormatterYearStyle: YearStyle, dateYear: number, dateMonth: number, dateDay: number, dateCalendarLocaleName: string, timeHour: number, timeMinute: number, timeSecond: number, timeSubsecond: number); diff --git a/ffi/capi/bindings/demo_gen/DateTimeFormatter.mjs b/ffi/capi/bindings/demo_gen/DateTimeFormatter.mjs index 943a49dfcc8..ce55cbe028e 100644 --- a/ffi/capi/bindings/demo_gen/DateTimeFormatter.mjs +++ b/ffi/capi/bindings/demo_gen/DateTimeFormatter.mjs @@ -4,7 +4,7 @@ import { DateTimeFormatter } from "icu4x" import { IsoDate } from "icu4x" import { Locale } from "icu4x" import { Time } from "icu4x" -export function formatIso(dateTimeFormatterLocaleName, dateTimeFormatterLength, dateTimeFormatterTimePrecision, dateTimeFormatterAlignment, dateTimeFormatterYearStyle, dateYear, dateMonth, dateDay, timeHour, timeMinute, timeSecond, timeNanosecond) { +export function formatIso(dateTimeFormatterLocaleName, dateTimeFormatterLength, dateTimeFormatterTimePrecision, dateTimeFormatterAlignment, dateTimeFormatterYearStyle, dateYear, dateMonth, dateDay, timeHour, timeMinute, timeSecond, timeSubsecond) { let dateTimeFormatterLocale = Locale.fromString(dateTimeFormatterLocaleName); @@ -12,14 +12,14 @@ export function formatIso(dateTimeFormatterLocaleName, dateTimeFormatterLength, let date = new IsoDate(dateYear,dateMonth,dateDay); - let time = new Time(timeHour,timeMinute,timeSecond,timeNanosecond); + let time = new Time(timeHour,timeMinute,timeSecond,timeSubsecond); let out = dateTimeFormatter.formatIso(date,time); return out; } -export function formatSameCalendar(dateTimeFormatterLocaleName, dateTimeFormatterLength, dateTimeFormatterTimePrecision, dateTimeFormatterAlignment, dateTimeFormatterYearStyle, dateYear, dateMonth, dateDay, dateCalendarLocaleName, timeHour, timeMinute, timeSecond, timeNanosecond) { +export function formatSameCalendar(dateTimeFormatterLocaleName, dateTimeFormatterLength, dateTimeFormatterTimePrecision, dateTimeFormatterAlignment, dateTimeFormatterYearStyle, dateYear, dateMonth, dateDay, dateCalendarLocaleName, timeHour, timeMinute, timeSecond, timeSubsecond) { let dateTimeFormatterLocale = Locale.fromString(dateTimeFormatterLocaleName); @@ -31,7 +31,7 @@ export function formatSameCalendar(dateTimeFormatterLocaleName, dateTimeFormatte let date = Date.fromIsoInCalendar(dateYear,dateMonth,dateDay,dateCalendar); - let time = new Time(timeHour,timeMinute,timeSecond,timeNanosecond); + let time = new Time(timeHour,timeMinute,timeSecond,timeSubsecond); let out = dateTimeFormatter.formatSameCalendar(date,time); diff --git a/ffi/capi/bindings/demo_gen/DateTimeFormatterGregorian.d.ts b/ffi/capi/bindings/demo_gen/DateTimeFormatterGregorian.d.ts index 0a533b9a5d6..7e7ea3d81db 100644 --- a/ffi/capi/bindings/demo_gen/DateTimeFormatterGregorian.d.ts +++ b/ffi/capi/bindings/demo_gen/DateTimeFormatterGregorian.d.ts @@ -2,4 +2,4 @@ import { DateTimeFormatterGregorian } from "icu4x" import { IsoDate } from "icu4x" import { Locale } from "icu4x" import { Time } from "icu4x" -export function formatIso(dateTimeFormatterGregorianLocaleName: string, dateTimeFormatterGregorianLength: DateTimeLength, dateTimeFormatterGregorianTimePrecision: TimePrecision, dateTimeFormatterGregorianAlignment: DateTimeAlignment, dateTimeFormatterGregorianYearStyle: YearStyle, dateYear: number, dateMonth: number, dateDay: number, timeHour: number, timeMinute: number, timeSecond: number, timeNanosecond: number); +export function formatIso(dateTimeFormatterGregorianLocaleName: string, dateTimeFormatterGregorianLength: DateTimeLength, dateTimeFormatterGregorianTimePrecision: TimePrecision, dateTimeFormatterGregorianAlignment: DateTimeAlignment, dateTimeFormatterGregorianYearStyle: YearStyle, dateYear: number, dateMonth: number, dateDay: number, timeHour: number, timeMinute: number, timeSecond: number, timeSubsecond: number); diff --git a/ffi/capi/bindings/demo_gen/DateTimeFormatterGregorian.mjs b/ffi/capi/bindings/demo_gen/DateTimeFormatterGregorian.mjs index aa5ff8265a2..90a8025f766 100644 --- a/ffi/capi/bindings/demo_gen/DateTimeFormatterGregorian.mjs +++ b/ffi/capi/bindings/demo_gen/DateTimeFormatterGregorian.mjs @@ -2,7 +2,7 @@ import { DateTimeFormatterGregorian } from "icu4x" import { IsoDate } from "icu4x" import { Locale } from "icu4x" import { Time } from "icu4x" -export function formatIso(dateTimeFormatterGregorianLocaleName, dateTimeFormatterGregorianLength, dateTimeFormatterGregorianTimePrecision, dateTimeFormatterGregorianAlignment, dateTimeFormatterGregorianYearStyle, dateYear, dateMonth, dateDay, timeHour, timeMinute, timeSecond, timeNanosecond) { +export function formatIso(dateTimeFormatterGregorianLocaleName, dateTimeFormatterGregorianLength, dateTimeFormatterGregorianTimePrecision, dateTimeFormatterGregorianAlignment, dateTimeFormatterGregorianYearStyle, dateYear, dateMonth, dateDay, timeHour, timeMinute, timeSecond, timeSubsecond) { let dateTimeFormatterGregorianLocale = Locale.fromString(dateTimeFormatterGregorianLocaleName); @@ -10,7 +10,7 @@ export function formatIso(dateTimeFormatterGregorianLocaleName, dateTimeFormatte let date = new IsoDate(dateYear,dateMonth,dateDay); - let time = new Time(timeHour,timeMinute,timeSecond,timeNanosecond); + let time = new Time(timeHour,timeMinute,timeSecond,timeSubsecond); let out = dateTimeFormatterGregorian.formatIso(date,time); diff --git a/ffi/capi/bindings/demo_gen/GregorianZonedDateTimeFormatter.d.ts b/ffi/capi/bindings/demo_gen/GregorianZonedDateTimeFormatter.d.ts index 0a860f5b4c8..abca6867037 100644 --- a/ffi/capi/bindings/demo_gen/GregorianZonedDateTimeFormatter.d.ts +++ b/ffi/capi/bindings/demo_gen/GregorianZonedDateTimeFormatter.d.ts @@ -3,4 +3,4 @@ import { IsoDate } from "icu4x" import { Locale } from "icu4x" import { Time } from "icu4x" import { TimeZoneInfo } from "icu4x" -export function formatIso(gregorianZonedDateTimeFormatterLocaleName: string, gregorianZonedDateTimeFormatterLength: DateTimeLength, dateYear: number, dateMonth: number, dateDay: number, timeHour: number, timeMinute: number, timeSecond: number, timeNanosecond: number, zoneBcp47Id: string, zoneOffsetSeconds: number, zoneDst: boolean); +export function formatIso(gregorianZonedDateTimeFormatterLocaleName: string, gregorianZonedDateTimeFormatterLength: DateTimeLength, dateYear: number, dateMonth: number, dateDay: number, timeHour: number, timeMinute: number, timeSecond: number, timeSubsecond: number, zoneBcp47Id: string, zoneOffsetSeconds: number, zoneDst: boolean); diff --git a/ffi/capi/bindings/demo_gen/GregorianZonedDateTimeFormatter.mjs b/ffi/capi/bindings/demo_gen/GregorianZonedDateTimeFormatter.mjs index 7d4f57f8bac..0c217ee8efd 100644 --- a/ffi/capi/bindings/demo_gen/GregorianZonedDateTimeFormatter.mjs +++ b/ffi/capi/bindings/demo_gen/GregorianZonedDateTimeFormatter.mjs @@ -3,7 +3,7 @@ import { IsoDate } from "icu4x" import { Locale } from "icu4x" import { Time } from "icu4x" import { TimeZoneInfo } from "icu4x" -export function formatIso(gregorianZonedDateTimeFormatterLocaleName, gregorianZonedDateTimeFormatterLength, dateYear, dateMonth, dateDay, timeHour, timeMinute, timeSecond, timeNanosecond, zoneBcp47Id, zoneOffsetSeconds, zoneDst) { +export function formatIso(gregorianZonedDateTimeFormatterLocaleName, gregorianZonedDateTimeFormatterLength, dateYear, dateMonth, dateDay, timeHour, timeMinute, timeSecond, timeSubsecond, zoneBcp47Id, zoneOffsetSeconds, zoneDst) { let gregorianZonedDateTimeFormatterLocale = Locale.fromString(gregorianZonedDateTimeFormatterLocaleName); @@ -11,7 +11,7 @@ export function formatIso(gregorianZonedDateTimeFormatterLocaleName, gregorianZo let date = new IsoDate(dateYear,dateMonth,dateDay); - let time = new Time(timeHour,timeMinute,timeSecond,timeNanosecond); + let time = new Time(timeHour,timeMinute,timeSecond,timeSubsecond); let zone = new TimeZoneInfo(zoneBcp47Id,zoneOffsetSeconds,zoneDst); diff --git a/ffi/capi/bindings/demo_gen/TimeZoneIdMapper.d.ts b/ffi/capi/bindings/demo_gen/IanaParser.d.ts similarity index 82% rename from ffi/capi/bindings/demo_gen/TimeZoneIdMapper.d.ts rename to ffi/capi/bindings/demo_gen/IanaParser.d.ts index c9ed1308d9e..9eab5640fad 100644 --- a/ffi/capi/bindings/demo_gen/TimeZoneIdMapper.d.ts +++ b/ffi/capi/bindings/demo_gen/IanaParser.d.ts @@ -1,4 +1,4 @@ -import { TimeZoneIdMapper } from "icu4x" +import { IanaParser } from "icu4x" export function ianaToBcp47(value: string); export function normalizeIana(value: string); export function canonicalizeIana(value: string); diff --git a/ffi/capi/bindings/demo_gen/IanaParser.mjs b/ffi/capi/bindings/demo_gen/IanaParser.mjs new file mode 100644 index 00000000000..558b07d317f --- /dev/null +++ b/ffi/capi/bindings/demo_gen/IanaParser.mjs @@ -0,0 +1,37 @@ +import { IanaParser } from "icu4x" +export function ianaToBcp47(value) { + + let ianaParser = new IanaParser(); + + let out = ianaParser.ianaToBcp47(value); + + + return out; +} +export function normalizeIana(value) { + + let ianaParser = new IanaParser(); + + let out = ianaParser.normalizeIana(value); + + + return out; +} +export function canonicalizeIana(value) { + + let ianaParser = new IanaParser(); + + let out = ianaParser.canonicalizeIana(value); + + + return out; +} +export function findCanonicalIanaFromBcp47(value) { + + let ianaParser = new IanaParser(); + + let out = ianaParser.findCanonicalIanaFromBcp47(value); + + + return out; +} diff --git a/ffi/capi/bindings/demo_gen/TimeZoneIdMapperWithFastCanonicalization.d.ts b/ffi/capi/bindings/demo_gen/IanaParserExtended.d.ts similarity index 61% rename from ffi/capi/bindings/demo_gen/TimeZoneIdMapperWithFastCanonicalization.d.ts rename to ffi/capi/bindings/demo_gen/IanaParserExtended.d.ts index 452123972bb..abe1bbc78e5 100644 --- a/ffi/capi/bindings/demo_gen/TimeZoneIdMapperWithFastCanonicalization.d.ts +++ b/ffi/capi/bindings/demo_gen/IanaParserExtended.d.ts @@ -1,3 +1,3 @@ -import { TimeZoneIdMapperWithFastCanonicalization } from "icu4x" +import { IanaParserExtended } from "icu4x" export function canonicalizeIana(value: string); export function canonicalIanaFromBcp47(value: string); diff --git a/ffi/capi/bindings/demo_gen/IanaParserExtended.mjs b/ffi/capi/bindings/demo_gen/IanaParserExtended.mjs new file mode 100644 index 00000000000..aaa43171143 --- /dev/null +++ b/ffi/capi/bindings/demo_gen/IanaParserExtended.mjs @@ -0,0 +1,19 @@ +import { IanaParserExtended } from "icu4x" +export function canonicalizeIana(value) { + + let ianaParserExtended = new IanaParserExtended(); + + let out = ianaParserExtended.canonicalizeIana(value); + + + return out; +} +export function canonicalIanaFromBcp47(value) { + + let ianaParserExtended = new IanaParserExtended(); + + let out = ianaParserExtended.canonicalIanaFromBcp47(value); + + + return out; +} diff --git a/ffi/capi/bindings/demo_gen/TimeFormatter.d.ts b/ffi/capi/bindings/demo_gen/TimeFormatter.d.ts index 12594085025..c1956918bfc 100644 --- a/ffi/capi/bindings/demo_gen/TimeFormatter.d.ts +++ b/ffi/capi/bindings/demo_gen/TimeFormatter.d.ts @@ -1,4 +1,4 @@ import { Locale } from "icu4x" import { Time } from "icu4x" import { TimeFormatter } from "icu4x" -export function format(timeFormatterLocaleName: string, timeFormatterLength: DateTimeLength, valueHour: number, valueMinute: number, valueSecond: number, valueNanosecond: number); +export function format(timeFormatterLocaleName: string, timeFormatterLength: DateTimeLength, valueHour: number, valueMinute: number, valueSecond: number, valueSubsecond: number); diff --git a/ffi/capi/bindings/demo_gen/TimeFormatter.mjs b/ffi/capi/bindings/demo_gen/TimeFormatter.mjs index 7c249f6b104..a3703d5c124 100644 --- a/ffi/capi/bindings/demo_gen/TimeFormatter.mjs +++ b/ffi/capi/bindings/demo_gen/TimeFormatter.mjs @@ -1,13 +1,13 @@ import { Locale } from "icu4x" import { Time } from "icu4x" import { TimeFormatter } from "icu4x" -export function format(timeFormatterLocaleName, timeFormatterLength, valueHour, valueMinute, valueSecond, valueNanosecond) { +export function format(timeFormatterLocaleName, timeFormatterLength, valueHour, valueMinute, valueSecond, valueSubsecond) { let timeFormatterLocale = Locale.fromString(timeFormatterLocaleName); let timeFormatter = TimeFormatter.createWithLength(timeFormatterLocale,timeFormatterLength); - let value = new Time(valueHour,valueMinute,valueSecond,valueNanosecond); + let value = new Time(valueHour,valueMinute,valueSecond,valueSubsecond); let out = timeFormatter.format(value); diff --git a/ffi/capi/bindings/demo_gen/TimeZoneIdMapper.mjs b/ffi/capi/bindings/demo_gen/TimeZoneIdMapper.mjs deleted file mode 100644 index 896ea834c80..00000000000 --- a/ffi/capi/bindings/demo_gen/TimeZoneIdMapper.mjs +++ /dev/null @@ -1,37 +0,0 @@ -import { TimeZoneIdMapper } from "icu4x" -export function ianaToBcp47(value) { - - let timeZoneIdMapper = new TimeZoneIdMapper(); - - let out = timeZoneIdMapper.ianaToBcp47(value); - - - return out; -} -export function normalizeIana(value) { - - let timeZoneIdMapper = new TimeZoneIdMapper(); - - let out = timeZoneIdMapper.normalizeIana(value); - - - return out; -} -export function canonicalizeIana(value) { - - let timeZoneIdMapper = new TimeZoneIdMapper(); - - let out = timeZoneIdMapper.canonicalizeIana(value); - - - return out; -} -export function findCanonicalIanaFromBcp47(value) { - - let timeZoneIdMapper = new TimeZoneIdMapper(); - - let out = timeZoneIdMapper.findCanonicalIanaFromBcp47(value); - - - return out; -} diff --git a/ffi/capi/bindings/demo_gen/TimeZoneIdMapperWithFastCanonicalization.mjs b/ffi/capi/bindings/demo_gen/TimeZoneIdMapperWithFastCanonicalization.mjs deleted file mode 100644 index 3fd45660628..00000000000 --- a/ffi/capi/bindings/demo_gen/TimeZoneIdMapperWithFastCanonicalization.mjs +++ /dev/null @@ -1,19 +0,0 @@ -import { TimeZoneIdMapperWithFastCanonicalization } from "icu4x" -export function canonicalizeIana(value) { - - let timeZoneIdMapperWithFastCanonicalization = new TimeZoneIdMapperWithFastCanonicalization(); - - let out = timeZoneIdMapperWithFastCanonicalization.canonicalizeIana(value); - - - return out; -} -export function canonicalIanaFromBcp47(value) { - - let timeZoneIdMapperWithFastCanonicalization = new TimeZoneIdMapperWithFastCanonicalization(); - - let out = timeZoneIdMapperWithFastCanonicalization.canonicalIanaFromBcp47(value); - - - return out; -} diff --git a/ffi/capi/bindings/demo_gen/ZonedDateTimeFormatter.d.ts b/ffi/capi/bindings/demo_gen/ZonedDateTimeFormatter.d.ts index 4b250015afd..e185accb81c 100644 --- a/ffi/capi/bindings/demo_gen/ZonedDateTimeFormatter.d.ts +++ b/ffi/capi/bindings/demo_gen/ZonedDateTimeFormatter.d.ts @@ -5,5 +5,5 @@ import { Locale } from "icu4x" import { Time } from "icu4x" import { TimeZoneInfo } from "icu4x" import { ZonedDateTimeFormatter } from "icu4x" -export function format(zonedDateTimeFormatterLocaleName: string, zonedDateTimeFormatterLength: DateTimeLength, dateYear: number, dateMonth: number, dateDay: number, dateCalendarLocaleName: string, timeHour: number, timeMinute: number, timeSecond: number, timeNanosecond: number, zoneBcp47Id: string, zoneOffsetSeconds: number, zoneDst: boolean); -export function formatIso(zonedDateTimeFormatterLocaleName: string, zonedDateTimeFormatterLength: DateTimeLength, dateYear: number, dateMonth: number, dateDay: number, timeHour: number, timeMinute: number, timeSecond: number, timeNanosecond: number, zoneBcp47Id: string, zoneOffsetSeconds: number, zoneDst: boolean); +export function format(zonedDateTimeFormatterLocaleName: string, zonedDateTimeFormatterLength: DateTimeLength, dateYear: number, dateMonth: number, dateDay: number, dateCalendarLocaleName: string, timeHour: number, timeMinute: number, timeSecond: number, timeSubsecond: number, zoneBcp47Id: string, zoneOffsetSeconds: number, zoneDst: boolean); +export function formatIso(zonedDateTimeFormatterLocaleName: string, zonedDateTimeFormatterLength: DateTimeLength, dateYear: number, dateMonth: number, dateDay: number, timeHour: number, timeMinute: number, timeSecond: number, timeSubsecond: number, zoneBcp47Id: string, zoneOffsetSeconds: number, zoneDst: boolean); diff --git a/ffi/capi/bindings/demo_gen/ZonedDateTimeFormatter.mjs b/ffi/capi/bindings/demo_gen/ZonedDateTimeFormatter.mjs index 7beb59b909b..bdc1d951ddb 100644 --- a/ffi/capi/bindings/demo_gen/ZonedDateTimeFormatter.mjs +++ b/ffi/capi/bindings/demo_gen/ZonedDateTimeFormatter.mjs @@ -5,7 +5,7 @@ import { Locale } from "icu4x" import { Time } from "icu4x" import { TimeZoneInfo } from "icu4x" import { ZonedDateTimeFormatter } from "icu4x" -export function format(zonedDateTimeFormatterLocaleName, zonedDateTimeFormatterLength, dateYear, dateMonth, dateDay, dateCalendarLocaleName, timeHour, timeMinute, timeSecond, timeNanosecond, zoneBcp47Id, zoneOffsetSeconds, zoneDst) { +export function format(zonedDateTimeFormatterLocaleName, zonedDateTimeFormatterLength, dateYear, dateMonth, dateDay, dateCalendarLocaleName, timeHour, timeMinute, timeSecond, timeSubsecond, zoneBcp47Id, zoneOffsetSeconds, zoneDst) { let zonedDateTimeFormatterLocale = Locale.fromString(zonedDateTimeFormatterLocaleName); @@ -17,7 +17,7 @@ export function format(zonedDateTimeFormatterLocaleName, zonedDateTimeFormatterL let date = Date.fromIsoInCalendar(dateYear,dateMonth,dateDay,dateCalendar); - let time = new Time(timeHour,timeMinute,timeSecond,timeNanosecond); + let time = new Time(timeHour,timeMinute,timeSecond,timeSubsecond); let zone = new TimeZoneInfo(zoneBcp47Id,zoneOffsetSeconds,zoneDst); @@ -26,7 +26,7 @@ export function format(zonedDateTimeFormatterLocaleName, zonedDateTimeFormatterL return out; } -export function formatIso(zonedDateTimeFormatterLocaleName, zonedDateTimeFormatterLength, dateYear, dateMonth, dateDay, timeHour, timeMinute, timeSecond, timeNanosecond, zoneBcp47Id, zoneOffsetSeconds, zoneDst) { +export function formatIso(zonedDateTimeFormatterLocaleName, zonedDateTimeFormatterLength, dateYear, dateMonth, dateDay, timeHour, timeMinute, timeSecond, timeSubsecond, zoneBcp47Id, zoneOffsetSeconds, zoneDst) { let zonedDateTimeFormatterLocale = Locale.fromString(zonedDateTimeFormatterLocaleName); @@ -34,7 +34,7 @@ export function formatIso(zonedDateTimeFormatterLocaleName, zonedDateTimeFormatt let date = new IsoDate(dateYear,dateMonth,dateDay); - let time = new Time(timeHour,timeMinute,timeSecond,timeNanosecond); + let time = new Time(timeHour,timeMinute,timeSecond,timeSubsecond); let zone = new TimeZoneInfo(zoneBcp47Id,zoneOffsetSeconds,zoneDst); diff --git a/ffi/capi/bindings/demo_gen/index.mjs b/ffi/capi/bindings/demo_gen/index.mjs index 4d4637daa86..797d0531dd6 100644 --- a/ffi/capi/bindings/demo_gen/index.mjs +++ b/ffi/capi/bindings/demo_gen/index.mjs @@ -29,10 +29,10 @@ import * as DecomposingNormalizerDemo from "./DecomposingNormalizer.mjs"; export * as DecomposingNormalizerDemo from "./DecomposingNormalizer.mjs"; import * as TimeZoneInfoDemo from "./TimeZoneInfo.mjs"; export * as TimeZoneInfoDemo from "./TimeZoneInfo.mjs"; -import * as TimeZoneIdMapperDemo from "./TimeZoneIdMapper.mjs"; -export * as TimeZoneIdMapperDemo from "./TimeZoneIdMapper.mjs"; -import * as TimeZoneIdMapperWithFastCanonicalizationDemo from "./TimeZoneIdMapperWithFastCanonicalization.mjs"; -export * as TimeZoneIdMapperWithFastCanonicalizationDemo from "./TimeZoneIdMapperWithFastCanonicalization.mjs"; +import * as IanaParserDemo from "./IanaParser.mjs"; +export * as IanaParserDemo from "./IanaParser.mjs"; +import * as IanaParserExtendedDemo from "./IanaParserExtended.mjs"; +export * as IanaParserExtendedDemo from "./IanaParserExtended.mjs"; import * as GregorianZonedDateTimeFormatterDemo from "./GregorianZonedDateTimeFormatter.mjs"; export * as GregorianZonedDateTimeFormatterDemo from "./GregorianZonedDateTimeFormatter.mjs"; import * as ZonedDateTimeFormatterDemo from "./ZonedDateTimeFormatter.mjs"; @@ -408,7 +408,7 @@ let termini = Object.assign({ }, { - name: "Value:Nanosecond", + name: "Value:Subsecond", type: "number", typeUse: "number" } @@ -681,7 +681,7 @@ let termini = Object.assign({ }, { - name: "Time:Nanosecond", + name: "Time:Subsecond", type: "number", typeUse: "number" } @@ -768,7 +768,7 @@ let termini = Object.assign({ }, { - name: "Time:Nanosecond", + name: "Time:Subsecond", type: "number", typeUse: "number" } @@ -849,7 +849,7 @@ let termini = Object.assign({ }, { - name: "Time:Nanosecond", + name: "Time:Subsecond", type: "number", typeUse: "number" } @@ -914,10 +914,10 @@ let termini = Object.assign({ ] }, - "TimeZoneIdMapper.ianaToBcp47": { - func: TimeZoneIdMapperDemo.ianaToBcp47, + "IanaParser.ianaToBcp47": { + func: IanaParserDemo.ianaToBcp47, // For avoiding webpacking minifying issues: - funcName: "TimeZoneIdMapper.ianaToBcp47", + funcName: "IanaParser.ianaToBcp47", parameters: [ { @@ -929,10 +929,10 @@ let termini = Object.assign({ ] }, - "TimeZoneIdMapper.normalizeIana": { - func: TimeZoneIdMapperDemo.normalizeIana, + "IanaParser.normalizeIana": { + func: IanaParserDemo.normalizeIana, // For avoiding webpacking minifying issues: - funcName: "TimeZoneIdMapper.normalizeIana", + funcName: "IanaParser.normalizeIana", parameters: [ { @@ -944,10 +944,10 @@ let termini = Object.assign({ ] }, - "TimeZoneIdMapper.canonicalizeIana": { - func: TimeZoneIdMapperDemo.canonicalizeIana, + "IanaParser.canonicalizeIana": { + func: IanaParserDemo.canonicalizeIana, // For avoiding webpacking minifying issues: - funcName: "TimeZoneIdMapper.canonicalizeIana", + funcName: "IanaParser.canonicalizeIana", parameters: [ { @@ -959,10 +959,10 @@ let termini = Object.assign({ ] }, - "TimeZoneIdMapper.findCanonicalIanaFromBcp47": { - func: TimeZoneIdMapperDemo.findCanonicalIanaFromBcp47, + "IanaParser.findCanonicalIanaFromBcp47": { + func: IanaParserDemo.findCanonicalIanaFromBcp47, // For avoiding webpacking minifying issues: - funcName: "TimeZoneIdMapper.findCanonicalIanaFromBcp47", + funcName: "IanaParser.findCanonicalIanaFromBcp47", parameters: [ { @@ -974,10 +974,10 @@ let termini = Object.assign({ ] }, - "TimeZoneIdMapperWithFastCanonicalization.canonicalizeIana": { - func: TimeZoneIdMapperWithFastCanonicalizationDemo.canonicalizeIana, + "IanaParserExtended.canonicalizeIana": { + func: IanaParserExtendedDemo.canonicalizeIana, // For avoiding webpacking minifying issues: - funcName: "TimeZoneIdMapperWithFastCanonicalization.canonicalizeIana", + funcName: "IanaParserExtended.canonicalizeIana", parameters: [ { @@ -989,10 +989,10 @@ let termini = Object.assign({ ] }, - "TimeZoneIdMapperWithFastCanonicalization.canonicalIanaFromBcp47": { - func: TimeZoneIdMapperWithFastCanonicalizationDemo.canonicalIanaFromBcp47, + "IanaParserExtended.canonicalIanaFromBcp47": { + func: IanaParserExtendedDemo.canonicalIanaFromBcp47, // For avoiding webpacking minifying issues: - funcName: "TimeZoneIdMapperWithFastCanonicalization.canonicalIanaFromBcp47", + funcName: "IanaParserExtended.canonicalIanaFromBcp47", parameters: [ { @@ -1059,7 +1059,7 @@ let termini = Object.assign({ }, { - name: "Time:Nanosecond", + name: "Time:Subsecond", type: "number", typeUse: "number" }, @@ -1146,7 +1146,7 @@ let termini = Object.assign({ }, { - name: "Time:Nanosecond", + name: "Time:Subsecond", type: "number", typeUse: "number" }, @@ -1227,7 +1227,7 @@ let termini = Object.assign({ }, { - name: "Time:Nanosecond", + name: "Time:Subsecond", type: "number", typeUse: "number" }, diff --git a/ffi/capi/bindings/js/CalendarParseError.d.ts b/ffi/capi/bindings/js/CalendarParseError.d.ts index ed387f222e8..56d26b93f1f 100644 --- a/ffi/capi/bindings/js/CalendarParseError.d.ts +++ b/ffi/capi/bindings/js/CalendarParseError.d.ts @@ -2,7 +2,7 @@ import type { pointer, codepoint } from "./diplomat-runtime.d.ts"; -/** Additional information: [1](https://docs.rs/icu/latest/icu/calendar/enum.ParseError.html), [2](https://docs.rs/icu/latest/icu/timezone/enum.ParseError.html) +/** Additional information: [1](https://docs.rs/icu/latest/icu/calendar/enum.ParseError.html), [2](https://docs.rs/icu/latest/icu/time/enum.ParseError.html) */ diff --git a/ffi/capi/bindings/js/CalendarParseError.mjs b/ffi/capi/bindings/js/CalendarParseError.mjs index 86f03adfef7..f1f060412de 100644 --- a/ffi/capi/bindings/js/CalendarParseError.mjs +++ b/ffi/capi/bindings/js/CalendarParseError.mjs @@ -3,7 +3,7 @@ import wasm from "./diplomat-wasm.mjs"; import * as diplomatRuntime from "./diplomat-runtime.mjs"; -/** Additional information: [1](https://docs.rs/icu/latest/icu/calendar/enum.ParseError.html), [2](https://docs.rs/icu/latest/icu/timezone/enum.ParseError.html) +/** Additional information: [1](https://docs.rs/icu/latest/icu/calendar/enum.ParseError.html), [2](https://docs.rs/icu/latest/icu/time/enum.ParseError.html) */ diff --git a/ffi/capi/bindings/js/DateTime.d.ts b/ffi/capi/bindings/js/DateTime.d.ts index 0d877f40ede..f6f6b593b3a 100644 --- a/ffi/capi/bindings/js/DateTime.d.ts +++ b/ffi/capi/bindings/js/DateTime.d.ts @@ -8,7 +8,7 @@ import type { pointer, codepoint } from "./diplomat-runtime.d.ts"; /** An ICU4X DateTime object capable of containing a date and time for any calendar. * -*See the [Rust documentation for `DateTime`](https://docs.rs/icu/latest/icu/timezone/struct.DateTime.html) for more information. +*See the [Rust documentation for `DateTime`](https://docs.rs/icu/latest/icu/time/struct.DateTime.html) for more information. */ diff --git a/ffi/capi/bindings/js/DateTime.mjs b/ffi/capi/bindings/js/DateTime.mjs index eb38e8dab5b..80a93b46d8b 100644 --- a/ffi/capi/bindings/js/DateTime.mjs +++ b/ffi/capi/bindings/js/DateTime.mjs @@ -9,7 +9,7 @@ import * as diplomatRuntime from "./diplomat-runtime.mjs"; /** An ICU4X DateTime object capable of containing a date and time for any calendar. * -*See the [Rust documentation for `DateTime`](https://docs.rs/icu/latest/icu/timezone/struct.DateTime.html) for more information. +*See the [Rust documentation for `DateTime`](https://docs.rs/icu/latest/icu/time/struct.DateTime.html) for more information. */ diff --git a/ffi/capi/bindings/js/TimeZoneIdMapper.d.ts b/ffi/capi/bindings/js/IanaParser.d.ts similarity index 72% rename from ffi/capi/bindings/js/TimeZoneIdMapper.d.ts rename to ffi/capi/bindings/js/IanaParser.d.ts index d6d2d9bb931..103326b8745 100644 --- a/ffi/capi/bindings/js/TimeZoneIdMapper.d.ts +++ b/ffi/capi/bindings/js/IanaParser.d.ts @@ -9,15 +9,15 @@ import type { pointer, codepoint } from "./diplomat-runtime.d.ts"; *This mapper supports two-way mapping, but it is optimized for the case of IANA to BCP-47. *It also supports normalizing and canonicalizing the IANA strings. * -*See the [Rust documentation for `TimeZoneIdMapper`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapper.html) for more information. +*See the [Rust documentation for `IanaParser`](https://docs.rs/icu/latest/icu/time/zone/iana/struct.IanaParser.html) for more information. */ -export class TimeZoneIdMapper { +export class IanaParser { get ffiValue(): pointer; - static createWithProvider(provider: DataProvider): TimeZoneIdMapper; + static createWithProvider(provider: DataProvider): IanaParser; ianaToBcp47(value: string): string; diff --git a/ffi/capi/bindings/js/TimeZoneIdMapper.mjs b/ffi/capi/bindings/js/IanaParser.mjs similarity index 74% rename from ffi/capi/bindings/js/TimeZoneIdMapper.mjs rename to ffi/capi/bindings/js/IanaParser.mjs index bd1644dc6d5..bdbd3f84bf9 100644 --- a/ffi/capi/bindings/js/TimeZoneIdMapper.mjs +++ b/ffi/capi/bindings/js/IanaParser.mjs @@ -10,13 +10,13 @@ import * as diplomatRuntime from "./diplomat-runtime.mjs"; *This mapper supports two-way mapping, but it is optimized for the case of IANA to BCP-47. *It also supports normalizing and canonicalizing the IANA strings. * -*See the [Rust documentation for `TimeZoneIdMapper`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapper.html) for more information. +*See the [Rust documentation for `IanaParser`](https://docs.rs/icu/latest/icu/time/zone/iana/struct.IanaParser.html) for more information. */ -const TimeZoneIdMapper_box_destroy_registry = new FinalizationRegistry((ptr) => { - wasm.icu4x_TimeZoneIdMapper_destroy_mv1(ptr); +const IanaParser_box_destroy_registry = new FinalizationRegistry((ptr) => { + wasm.icu4x_IanaParser_destroy_mv1(ptr); }); -export class TimeZoneIdMapper { +export class IanaParser { // Internal ptr reference: #ptr = null; @@ -27,7 +27,7 @@ export class TimeZoneIdMapper { #internalConstructor(symbol, ptr, selfEdge) { if (symbol !== diplomatRuntime.internalConstructor) { - console.error("TimeZoneIdMapper is an Opaque type. You cannot call its constructor."); + console.error("IanaParser is an Opaque type. You cannot call its constructor."); return; } @@ -36,7 +36,7 @@ export class TimeZoneIdMapper { // Are we being borrowed? If not, we can register. if (this.#selfEdge.length === 0) { - TimeZoneIdMapper_box_destroy_registry.register(this, this.#ptr); + IanaParser_box_destroy_registry.register(this, this.#ptr); } return this; @@ -46,10 +46,10 @@ export class TimeZoneIdMapper { } #defaultConstructor() { - const result = wasm.icu4x_TimeZoneIdMapper_create_mv1(); + const result = wasm.icu4x_IanaParser_create_mv1(); try { - return new TimeZoneIdMapper(diplomatRuntime.internalConstructor, result, []); + return new IanaParser(diplomatRuntime.internalConstructor, result, []); } finally {} @@ -58,14 +58,14 @@ export class TimeZoneIdMapper { static createWithProvider(provider) { const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true); - const result = wasm.icu4x_TimeZoneIdMapper_create_with_provider_mv1(diplomatReceive.buffer, provider.ffiValue); + const result = wasm.icu4x_IanaParser_create_with_provider_mv1(diplomatReceive.buffer, provider.ffiValue); try { if (!diplomatReceive.resultFlag) { const cause = new DataError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer)); throw new globalThis.Error('DataError: ' + cause.value, { cause }); } - return new TimeZoneIdMapper(diplomatRuntime.internalConstructor, diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer), []); + return new IanaParser(diplomatRuntime.internalConstructor, diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer), []); } finally { @@ -79,7 +79,7 @@ export class TimeZoneIdMapper { const valueSlice = functionCleanupArena.alloc(diplomatRuntime.DiplomatBuf.str8(wasm, value)); const write = new diplomatRuntime.DiplomatWriteBuf(wasm); - wasm.icu4x_TimeZoneIdMapper_iana_to_bcp47_mv1(this.ffiValue, ...valueSlice.splat(), write.buffer); + wasm.icu4x_IanaParser_iana_to_bcp47_mv1(this.ffiValue, ...valueSlice.splat(), write.buffer); try { return write.readString8(); @@ -99,7 +99,7 @@ export class TimeZoneIdMapper { const write = new diplomatRuntime.DiplomatWriteBuf(wasm); - const result = wasm.icu4x_TimeZoneIdMapper_normalize_iana_mv1(this.ffiValue, ...valueSlice.splat(), write.buffer); + const result = wasm.icu4x_IanaParser_normalize_iana_mv1(this.ffiValue, ...valueSlice.splat(), write.buffer); try { return result === 0 ? null : write.readString8(); @@ -119,7 +119,7 @@ export class TimeZoneIdMapper { const write = new diplomatRuntime.DiplomatWriteBuf(wasm); - const result = wasm.icu4x_TimeZoneIdMapper_canonicalize_iana_mv1(this.ffiValue, ...valueSlice.splat(), write.buffer); + const result = wasm.icu4x_IanaParser_canonicalize_iana_mv1(this.ffiValue, ...valueSlice.splat(), write.buffer); try { return result === 0 ? null : write.readString8(); @@ -139,7 +139,7 @@ export class TimeZoneIdMapper { const write = new diplomatRuntime.DiplomatWriteBuf(wasm); - const result = wasm.icu4x_TimeZoneIdMapper_find_canonical_iana_from_bcp47_mv1(this.ffiValue, ...valueSlice.splat(), write.buffer); + const result = wasm.icu4x_IanaParser_find_canonical_iana_from_bcp47_mv1(this.ffiValue, ...valueSlice.splat(), write.buffer); try { return result === 0 ? null : write.readString8(); diff --git a/ffi/capi/bindings/js/TimeZoneIdMapperWithFastCanonicalization.d.ts b/ffi/capi/bindings/js/IanaParserExtended.d.ts similarity index 62% rename from ffi/capi/bindings/js/TimeZoneIdMapperWithFastCanonicalization.d.ts rename to ffi/capi/bindings/js/IanaParserExtended.d.ts index 2204ec7f073..34e539e36f8 100644 --- a/ffi/capi/bindings/js/TimeZoneIdMapperWithFastCanonicalization.d.ts +++ b/ffi/capi/bindings/js/IanaParserExtended.d.ts @@ -9,15 +9,15 @@ import type { pointer, codepoint } from "./diplomat-runtime.d.ts"; *This mapper supports two-way mapping, but it is optimized for the case of IANA to BCP-47. *It also supports normalizing and canonicalizing the IANA strings. * -*See the [Rust documentation for `TimeZoneIdMapperWithFastCanonicalization`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapperWithFastCanonicalization.html) for more information. +*See the [Rust documentation for `IanaParserExtended`](https://docs.rs/icu/latest/icu/time/zone/iana/struct.IanaParserExtended.html) for more information. */ -export class TimeZoneIdMapperWithFastCanonicalization { +export class IanaParserExtended { get ffiValue(): pointer; - static createWithProvider(provider: DataProvider): TimeZoneIdMapperWithFastCanonicalization; + static createWithProvider(provider: DataProvider): IanaParserExtended; canonicalizeIana(value: string): string | null; diff --git a/ffi/capi/bindings/js/TimeZoneIdMapperWithFastCanonicalization.mjs b/ffi/capi/bindings/js/IanaParserExtended.mjs similarity index 67% rename from ffi/capi/bindings/js/TimeZoneIdMapperWithFastCanonicalization.mjs rename to ffi/capi/bindings/js/IanaParserExtended.mjs index 123c00744c9..e77a17e8645 100644 --- a/ffi/capi/bindings/js/TimeZoneIdMapperWithFastCanonicalization.mjs +++ b/ffi/capi/bindings/js/IanaParserExtended.mjs @@ -10,13 +10,13 @@ import * as diplomatRuntime from "./diplomat-runtime.mjs"; *This mapper supports two-way mapping, but it is optimized for the case of IANA to BCP-47. *It also supports normalizing and canonicalizing the IANA strings. * -*See the [Rust documentation for `TimeZoneIdMapperWithFastCanonicalization`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapperWithFastCanonicalization.html) for more information. +*See the [Rust documentation for `IanaParserExtended`](https://docs.rs/icu/latest/icu/time/zone/iana/struct.IanaParserExtended.html) for more information. */ -const TimeZoneIdMapperWithFastCanonicalization_box_destroy_registry = new FinalizationRegistry((ptr) => { - wasm.icu4x_TimeZoneIdMapperWithFastCanonicalization_destroy_mv1(ptr); +const IanaParserExtended_box_destroy_registry = new FinalizationRegistry((ptr) => { + wasm.icu4x_IanaParserExtended_destroy_mv1(ptr); }); -export class TimeZoneIdMapperWithFastCanonicalization { +export class IanaParserExtended { // Internal ptr reference: #ptr = null; @@ -27,7 +27,7 @@ export class TimeZoneIdMapperWithFastCanonicalization { #internalConstructor(symbol, ptr, selfEdge) { if (symbol !== diplomatRuntime.internalConstructor) { - console.error("TimeZoneIdMapperWithFastCanonicalization is an Opaque type. You cannot call its constructor."); + console.error("IanaParserExtended is an Opaque type. You cannot call its constructor."); return; } @@ -36,7 +36,7 @@ export class TimeZoneIdMapperWithFastCanonicalization { // Are we being borrowed? If not, we can register. if (this.#selfEdge.length === 0) { - TimeZoneIdMapperWithFastCanonicalization_box_destroy_registry.register(this, this.#ptr); + IanaParserExtended_box_destroy_registry.register(this, this.#ptr); } return this; @@ -46,10 +46,10 @@ export class TimeZoneIdMapperWithFastCanonicalization { } #defaultConstructor() { - const result = wasm.icu4x_TimeZoneIdMapperWithFastCanonicalization_create_mv1(); + const result = wasm.icu4x_IanaParserExtended_create_mv1(); try { - return new TimeZoneIdMapperWithFastCanonicalization(diplomatRuntime.internalConstructor, result, []); + return new IanaParserExtended(diplomatRuntime.internalConstructor, result, []); } finally {} @@ -58,14 +58,14 @@ export class TimeZoneIdMapperWithFastCanonicalization { static createWithProvider(provider) { const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true); - const result = wasm.icu4x_TimeZoneIdMapperWithFastCanonicalization_create_with_provider_mv1(diplomatReceive.buffer, provider.ffiValue); + const result = wasm.icu4x_IanaParserExtended_create_with_provider_mv1(diplomatReceive.buffer, provider.ffiValue); try { if (!diplomatReceive.resultFlag) { const cause = new DataError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer)); throw new globalThis.Error('DataError: ' + cause.value, { cause }); } - return new TimeZoneIdMapperWithFastCanonicalization(diplomatRuntime.internalConstructor, diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer), []); + return new IanaParserExtended(diplomatRuntime.internalConstructor, diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer), []); } finally { @@ -80,7 +80,7 @@ export class TimeZoneIdMapperWithFastCanonicalization { const write = new diplomatRuntime.DiplomatWriteBuf(wasm); - const result = wasm.icu4x_TimeZoneIdMapperWithFastCanonicalization_canonicalize_iana_mv1(this.ffiValue, ...valueSlice.splat(), write.buffer); + const result = wasm.icu4x_IanaParserExtended_canonicalize_iana_mv1(this.ffiValue, ...valueSlice.splat(), write.buffer); try { return result === 0 ? null : write.readString8(); @@ -100,7 +100,7 @@ export class TimeZoneIdMapperWithFastCanonicalization { const write = new diplomatRuntime.DiplomatWriteBuf(wasm); - const result = wasm.icu4x_TimeZoneIdMapperWithFastCanonicalization_canonical_iana_from_bcp47_mv1(this.ffiValue, ...valueSlice.splat(), write.buffer); + const result = wasm.icu4x_IanaParserExtended_canonical_iana_from_bcp47_mv1(this.ffiValue, ...valueSlice.splat(), write.buffer); try { return result === 0 ? null : write.readString8(); diff --git a/ffi/capi/bindings/js/IsoDateTime.d.ts b/ffi/capi/bindings/js/IsoDateTime.d.ts index ad65a7b4abe..b8c89aa6741 100644 --- a/ffi/capi/bindings/js/IsoDateTime.d.ts +++ b/ffi/capi/bindings/js/IsoDateTime.d.ts @@ -7,7 +7,7 @@ import type { pointer, codepoint } from "./diplomat-runtime.d.ts"; /** An ICU4X DateTime object capable of containing a ISO-8601 date and time. * -*See the [Rust documentation for `DateTime`](https://docs.rs/icu/latest/icu/timezone/struct.DateTime.html) for more information. +*See the [Rust documentation for `DateTime`](https://docs.rs/icu/latest/icu/time/struct.DateTime.html) for more information. */ diff --git a/ffi/capi/bindings/js/IsoDateTime.mjs b/ffi/capi/bindings/js/IsoDateTime.mjs index 9516fbce314..d44ce2323ca 100644 --- a/ffi/capi/bindings/js/IsoDateTime.mjs +++ b/ffi/capi/bindings/js/IsoDateTime.mjs @@ -8,7 +8,7 @@ import * as diplomatRuntime from "./diplomat-runtime.mjs"; /** An ICU4X DateTime object capable of containing a ISO-8601 date and time. * -*See the [Rust documentation for `DateTime`](https://docs.rs/icu/latest/icu/timezone/struct.DateTime.html) for more information. +*See the [Rust documentation for `DateTime`](https://docs.rs/icu/latest/icu/time/struct.DateTime.html) for more information. */ diff --git a/ffi/capi/bindings/js/Time.d.ts b/ffi/capi/bindings/js/Time.d.ts index 6b28aa2ff27..24f6d9a9808 100644 --- a/ffi/capi/bindings/js/Time.d.ts +++ b/ffi/capi/bindings/js/Time.d.ts @@ -6,7 +6,7 @@ import type { pointer, codepoint } from "./diplomat-runtime.d.ts"; /** An ICU4X Time object representing a time in terms of hour, minute, second, nanosecond * -*See the [Rust documentation for `Time`](https://docs.rs/icu/latest/icu/timezone/struct.Time.html) for more information. +*See the [Rust documentation for `Time`](https://docs.rs/icu/latest/icu/time/struct.Time.html) for more information. */ @@ -24,7 +24,7 @@ export class Time { get second(): number; - get nanosecond(): number; + get subsecond(): number; - constructor(hour: number, minute: number, second: number, nanosecond: number); + constructor(hour: number, minute: number, second: number, subsecond: number); } \ No newline at end of file diff --git a/ffi/capi/bindings/js/Time.mjs b/ffi/capi/bindings/js/Time.mjs index 6db8cfd19f8..04368c90dc1 100644 --- a/ffi/capi/bindings/js/Time.mjs +++ b/ffi/capi/bindings/js/Time.mjs @@ -7,7 +7,7 @@ import * as diplomatRuntime from "./diplomat-runtime.mjs"; /** An ICU4X Time object representing a time in terms of hour, minute, second, nanosecond * -*See the [Rust documentation for `Time`](https://docs.rs/icu/latest/icu/timezone/struct.Time.html) for more information. +*See the [Rust documentation for `Time`](https://docs.rs/icu/latest/icu/time/struct.Time.html) for more information. */ const Time_box_destroy_registry = new FinalizationRegistry((ptr) => { wasm.icu4x_Time_destroy_mv1(ptr); @@ -42,10 +42,10 @@ export class Time { return this.#ptr; } - #defaultConstructor(hour, minute, second, nanosecond) { + #defaultConstructor(hour, minute, second, subsecond) { const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true); - const result = wasm.icu4x_Time_create_mv1(diplomatReceive.buffer, hour, minute, second, nanosecond); + const result = wasm.icu4x_Time_create_mv1(diplomatReceive.buffer, hour, minute, second, subsecond); try { if (!diplomatReceive.resultFlag) { @@ -132,8 +132,8 @@ export class Time { finally {} } - get nanosecond() { - const result = wasm.icu4x_Time_nanosecond_mv1(this.ffiValue); + get subsecond() { + const result = wasm.icu4x_Time_subsecond_mv1(this.ffiValue); try { return result; @@ -142,7 +142,7 @@ export class Time { finally {} } - constructor(hour, minute, second, nanosecond) { + constructor(hour, minute, second, subsecond) { if (arguments[0] === diplomatRuntime.exposeConstructor) { return this.#internalConstructor(...Array.prototype.slice.call(arguments, 1)); } else if (arguments[0] === diplomatRuntime.internalConstructor) { diff --git a/ffi/capi/bindings/js/TimeZoneInfo.d.ts b/ffi/capi/bindings/js/TimeZoneInfo.d.ts index 9fd96ce7317..fad78bb3573 100644 --- a/ffi/capi/bindings/js/TimeZoneInfo.d.ts +++ b/ffi/capi/bindings/js/TimeZoneInfo.d.ts @@ -1,13 +1,13 @@ // generated by diplomat-tool +import type { IanaParser } from "./IanaParser" import type { IsoDate } from "./IsoDate" import type { IsoDateTime } from "./IsoDateTime" import type { Time } from "./Time" -import type { TimeZoneIdMapper } from "./TimeZoneIdMapper" import type { TimeZoneInvalidOffsetError } from "./TimeZoneInvalidOffsetError" import type { pointer, codepoint } from "./diplomat-runtime.d.ts"; -/** See the [Rust documentation for `TimeZoneInfo`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneInfo.html) for more information. +/** See the [Rust documentation for `TimeZoneInfo`](https://docs.rs/icu/latest/icu/time/struct.TimeZoneInfo.html) for more information. */ @@ -43,7 +43,7 @@ export class TimeZoneInfo { setTimeZoneId(id: string): void; - setIanaTimeZoneId(mapper: TimeZoneIdMapper, id: string): void; + setIanaTimeZoneId(mapper: IanaParser, id: string): void; get timeZoneId(): string; diff --git a/ffi/capi/bindings/js/TimeZoneInfo.mjs b/ffi/capi/bindings/js/TimeZoneInfo.mjs index 73e993ca14f..c9effb4ccef 100644 --- a/ffi/capi/bindings/js/TimeZoneInfo.mjs +++ b/ffi/capi/bindings/js/TimeZoneInfo.mjs @@ -1,14 +1,14 @@ // generated by diplomat-tool +import { IanaParser } from "./IanaParser.mjs" import { IsoDate } from "./IsoDate.mjs" import { IsoDateTime } from "./IsoDateTime.mjs" import { Time } from "./Time.mjs" -import { TimeZoneIdMapper } from "./TimeZoneIdMapper.mjs" import { TimeZoneInvalidOffsetError } from "./TimeZoneInvalidOffsetError.mjs" import wasm from "./diplomat-wasm.mjs"; import * as diplomatRuntime from "./diplomat-runtime.mjs"; -/** See the [Rust documentation for `TimeZoneInfo`](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneInfo.html) for more information. +/** See the [Rust documentation for `TimeZoneInfo`](https://docs.rs/icu/latest/icu/time/struct.TimeZoneInfo.html) for more information. */ const TimeZoneInfo_box_destroy_registry = new FinalizationRegistry((ptr) => { wasm.icu4x_TimeZoneInfo_destroy_mv1(ptr); diff --git a/ffi/capi/bindings/js/TimeZoneInvalidOffsetError.d.ts b/ffi/capi/bindings/js/TimeZoneInvalidOffsetError.d.ts index 512935e29a0..10b5eea6f74 100644 --- a/ffi/capi/bindings/js/TimeZoneInvalidOffsetError.d.ts +++ b/ffi/capi/bindings/js/TimeZoneInvalidOffsetError.d.ts @@ -2,7 +2,7 @@ import type { pointer, codepoint } from "./diplomat-runtime.d.ts"; -/** Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.InvalidOffsetError.html) +/** Additional information: [1](https://docs.rs/icu/latest/icu/time/struct.InvalidOffsetError.html) */ type TimeZoneInvalidOffsetError_obj = { }; diff --git a/ffi/capi/bindings/js/TimeZoneInvalidOffsetError.mjs b/ffi/capi/bindings/js/TimeZoneInvalidOffsetError.mjs index cae551b6bcb..5327552b531 100644 --- a/ffi/capi/bindings/js/TimeZoneInvalidOffsetError.mjs +++ b/ffi/capi/bindings/js/TimeZoneInvalidOffsetError.mjs @@ -3,7 +3,7 @@ import wasm from "./diplomat-wasm.mjs"; import * as diplomatRuntime from "./diplomat-runtime.mjs"; -/** Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.InvalidOffsetError.html) +/** Additional information: [1](https://docs.rs/icu/latest/icu/time/struct.InvalidOffsetError.html) */ diff --git a/ffi/capi/bindings/js/ZonedDateTime.d.ts b/ffi/capi/bindings/js/ZonedDateTime.d.ts index 746e6f33feb..22cbb254315 100644 --- a/ffi/capi/bindings/js/ZonedDateTime.d.ts +++ b/ffi/capi/bindings/js/ZonedDateTime.d.ts @@ -7,7 +7,7 @@ import type { pointer, codepoint } from "./diplomat-runtime.d.ts"; /** An ICU4X DateTime object capable of containing a date, time, and zone for any calendar. * -*See the [Rust documentation for `ZonedDateTime`](https://docs.rs/icu/latest/icu/timezone/struct.ZonedDateTime.html) for more information. +*See the [Rust documentation for `ZonedDateTime`](https://docs.rs/icu/latest/icu/time/struct.ZonedDateTime.html) for more information. */ diff --git a/ffi/capi/bindings/js/ZonedDateTime.mjs b/ffi/capi/bindings/js/ZonedDateTime.mjs index e94a1b231d2..c7fe522372e 100644 --- a/ffi/capi/bindings/js/ZonedDateTime.mjs +++ b/ffi/capi/bindings/js/ZonedDateTime.mjs @@ -8,7 +8,7 @@ import * as diplomatRuntime from "./diplomat-runtime.mjs"; /** An ICU4X DateTime object capable of containing a date, time, and zone for any calendar. * -*See the [Rust documentation for `ZonedDateTime`](https://docs.rs/icu/latest/icu/timezone/struct.ZonedDateTime.html) for more information. +*See the [Rust documentation for `ZonedDateTime`](https://docs.rs/icu/latest/icu/time/struct.ZonedDateTime.html) for more information. */ diff --git a/ffi/capi/bindings/js/ZonedDateTimeParser.d.ts b/ffi/capi/bindings/js/ZonedDateTimeParser.d.ts index 5217a6ae36a..f42efa6ceeb 100644 --- a/ffi/capi/bindings/js/ZonedDateTimeParser.d.ts +++ b/ffi/capi/bindings/js/ZonedDateTimeParser.d.ts @@ -8,7 +8,7 @@ import type { ZonedIsoDateTime } from "./ZonedIsoDateTime" import type { pointer, codepoint } from "./diplomat-runtime.d.ts"; -/** See the [Rust documentation for `ZonedDateTimeParser`](https://docs.rs/icu/latest/icu/timezone/struct.ZonedDateTimeParser.html) for more information. +/** See the [Rust documentation for `ZonedDateTimeParser`](https://docs.rs/icu/latest/icu/time/struct.ZonedDateTimeParser.html) for more information. */ diff --git a/ffi/capi/bindings/js/ZonedDateTimeParser.mjs b/ffi/capi/bindings/js/ZonedDateTimeParser.mjs index e31a80f8b1f..d94eb5e10ac 100644 --- a/ffi/capi/bindings/js/ZonedDateTimeParser.mjs +++ b/ffi/capi/bindings/js/ZonedDateTimeParser.mjs @@ -9,7 +9,7 @@ import wasm from "./diplomat-wasm.mjs"; import * as diplomatRuntime from "./diplomat-runtime.mjs"; -/** See the [Rust documentation for `ZonedDateTimeParser`](https://docs.rs/icu/latest/icu/timezone/struct.ZonedDateTimeParser.html) for more information. +/** See the [Rust documentation for `ZonedDateTimeParser`](https://docs.rs/icu/latest/icu/time/struct.ZonedDateTimeParser.html) for more information. */ const ZonedDateTimeParser_box_destroy_registry = new FinalizationRegistry((ptr) => { wasm.icu4x_ZonedDateTimeParser_destroy_mv1(ptr); diff --git a/ffi/capi/bindings/js/ZonedIsoDateTime.d.ts b/ffi/capi/bindings/js/ZonedIsoDateTime.d.ts index cff7ad75b77..e0b5be54399 100644 --- a/ffi/capi/bindings/js/ZonedIsoDateTime.d.ts +++ b/ffi/capi/bindings/js/ZonedIsoDateTime.d.ts @@ -7,7 +7,7 @@ import type { pointer, codepoint } from "./diplomat-runtime.d.ts"; /** An ICU4X ZonedDateTime object capable of containing a ISO-8601 date, time, and zone. * -*See the [Rust documentation for `ZonedDateTime`](https://docs.rs/icu/latest/icu/timezone/struct.ZonedDateTime.html) for more information. +*See the [Rust documentation for `ZonedDateTime`](https://docs.rs/icu/latest/icu/time/struct.ZonedDateTime.html) for more information. */ diff --git a/ffi/capi/bindings/js/ZonedIsoDateTime.mjs b/ffi/capi/bindings/js/ZonedIsoDateTime.mjs index 129566779ba..7749db64383 100644 --- a/ffi/capi/bindings/js/ZonedIsoDateTime.mjs +++ b/ffi/capi/bindings/js/ZonedIsoDateTime.mjs @@ -8,7 +8,7 @@ import * as diplomatRuntime from "./diplomat-runtime.mjs"; /** An ICU4X ZonedDateTime object capable of containing a ISO-8601 date, time, and zone. * -*See the [Rust documentation for `ZonedDateTime`](https://docs.rs/icu/latest/icu/timezone/struct.ZonedDateTime.html) for more information. +*See the [Rust documentation for `ZonedDateTime`](https://docs.rs/icu/latest/icu/time/struct.ZonedDateTime.html) for more information. */ diff --git a/ffi/capi/bindings/js/index.d.ts b/ffi/capi/bindings/js/index.d.ts index a898572498c..fe77a693410 100644 --- a/ffi/capi/bindings/js/index.d.ts +++ b/ffi/capi/bindings/js/index.d.ts @@ -174,9 +174,9 @@ export { Time } from "./Time" export { TimeZoneInfo } from "./TimeZoneInfo" -export { TimeZoneIdMapper } from "./TimeZoneIdMapper" +export { IanaParser } from "./IanaParser" -export { TimeZoneIdMapperWithFastCanonicalization } from "./TimeZoneIdMapperWithFastCanonicalization" +export { IanaParserExtended } from "./IanaParserExtended" export { MeasureUnit } from "./MeasureUnit" diff --git a/ffi/capi/bindings/js/index.mjs b/ffi/capi/bindings/js/index.mjs index b1d14d8c6e1..1c2c15e7e64 100644 --- a/ffi/capi/bindings/js/index.mjs +++ b/ffi/capi/bindings/js/index.mjs @@ -172,9 +172,9 @@ export { Time } from "./Time.mjs" export { TimeZoneInfo } from "./TimeZoneInfo.mjs" -export { TimeZoneIdMapper } from "./TimeZoneIdMapper.mjs" +export { IanaParser } from "./IanaParser.mjs" -export { TimeZoneIdMapperWithFastCanonicalization } from "./TimeZoneIdMapperWithFastCanonicalization.mjs" +export { IanaParserExtended } from "./IanaParserExtended.mjs" export { MeasureUnit } from "./MeasureUnit.mjs" diff --git a/ffi/capi/src/datetime.rs b/ffi/capi/src/datetime.rs index a55ed7d920c..903854ef881 100644 --- a/ffi/capi/src/datetime.rs +++ b/ffi/capi/src/datetime.rs @@ -15,7 +15,7 @@ pub mod ffi { use crate::time::ffi::Time; /// An ICU4X DateTime object capable of containing a ISO-8601 date and time. - #[diplomat::rust_link(icu::timezone::DateTime, Struct)] + #[diplomat::rust_link(icu::time::DateTime, Struct)] #[diplomat::out] pub struct IsoDateTime { pub date: Box, @@ -24,13 +24,12 @@ pub mod ffi { impl IsoDateTime { /// Creates a new [`IsoDateTime`] from an IXDTF string. - #[diplomat::rust_link(icu::timezone::DateTime::try_from_str, FnInStruct)] - #[diplomat::rust_link(icu::timezone::DateTime::try_from_utf8, FnInStruct, hidden)] - #[diplomat::rust_link(icu::timezone::DateTime::from_str, FnInStruct, hidden)] + #[diplomat::rust_link(icu::time::DateTime::try_from_str, FnInStruct)] + #[diplomat::rust_link(icu::time::DateTime::try_from_utf8, FnInStruct, hidden)] + #[diplomat::rust_link(icu::time::DateTime::from_str, FnInStruct, hidden)] #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor)] pub fn from_string(v: &DiplomatStr) -> Result { - let icu_timezone::DateTime { date, time } = - icu_timezone::DateTime::try_from_utf8(v, Iso)?; + let icu_time::DateTime { date, time } = icu_time::DateTime::try_from_utf8(v, Iso)?; Ok(IsoDateTime { date: Box::new(IsoDate(date)), time: Box::new(Time(time)), @@ -39,7 +38,7 @@ pub mod ffi { } /// An ICU4X DateTime object capable of containing a date and time for any calendar. - #[diplomat::rust_link(icu::timezone::DateTime, Struct)] + #[diplomat::rust_link(icu::time::DateTime, Struct)] #[diplomat::out] pub struct DateTime { pub date: Box, @@ -48,16 +47,16 @@ pub mod ffi { impl DateTime { /// Creates a new [`DateTime`] from an IXDTF string. - #[diplomat::rust_link(icu::timezone::DateTime::try_from_str, FnInStruct)] - #[diplomat::rust_link(icu::timezone::DateTime::try_from_utf8, FnInStruct, hidden)] - #[diplomat::rust_link(icu::timezone::DateTime::from_str, FnInStruct, hidden)] + #[diplomat::rust_link(icu::time::DateTime::try_from_str, FnInStruct)] + #[diplomat::rust_link(icu::time::DateTime::try_from_utf8, FnInStruct, hidden)] + #[diplomat::rust_link(icu::time::DateTime::from_str, FnInStruct, hidden)] #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor)] pub fn from_string( v: &DiplomatStr, calendar: &Calendar, ) -> Result { - let icu_timezone::DateTime { date, time } = - icu_timezone::DateTime::try_from_utf8(v, calendar.0.clone())?; + let icu_time::DateTime { date, time } = + icu_time::DateTime::try_from_utf8(v, calendar.0.clone())?; Ok(DateTime { date: Box::new(Date(date)), time: Box::new(Time(time)), diff --git a/ffi/capi/src/errors.rs b/ffi/capi/src/errors.rs index c276b904393..7438c350140 100644 --- a/ffi/capi/src/errors.rs +++ b/ffi/capi/src/errors.rs @@ -70,7 +70,7 @@ pub mod ffi { #[derive(Debug, PartialEq, Eq)] #[repr(C)] #[diplomat::rust_link(icu::calendar::ParseError, Enum, compact)] - #[diplomat::rust_link(icu::timezone::ParseError, Enum, compact)] + #[diplomat::rust_link(icu::time::ParseError, Enum, compact)] #[cfg(any(feature = "datetime", feature = "timezone", feature = "calendar"))] pub enum CalendarParseError { Unknown = 0x00, @@ -81,7 +81,7 @@ pub mod ffi { } #[derive(Debug, PartialEq, Eq)] - #[diplomat::rust_link(icu::timezone::InvalidOffsetError, Struct, compact)] + #[diplomat::rust_link(icu::time::InvalidOffsetError, Struct, compact)] #[cfg(any(feature = "datetime", feature = "timezone"))] pub struct TimeZoneInvalidOffsetError; @@ -185,13 +185,13 @@ impl From for CalendarParseError { } #[cfg(any(feature = "datetime", feature = "timezone", feature = "calendar"))] -impl From for CalendarParseError { - fn from(e: icu_timezone::ParseError) -> Self { +impl From for CalendarParseError { + fn from(e: icu_time::ParseError) -> Self { match e { - icu_timezone::ParseError::Syntax(_) => Self::InvalidSyntax, - icu_timezone::ParseError::MissingFields => Self::MissingFields, - icu_timezone::ParseError::Range(_) => Self::OutOfRange, - icu_timezone::ParseError::UnknownCalendar => Self::UnknownCalendar, + icu_time::ParseError::Syntax(_) => Self::InvalidSyntax, + icu_time::ParseError::MissingFields => Self::MissingFields, + icu_time::ParseError::Range(_) => Self::OutOfRange, + icu_time::ParseError::UnknownCalendar => Self::UnknownCalendar, // TODO _ => Self::Unknown, } @@ -300,8 +300,8 @@ impl From for LocaleParseError { } #[cfg(any(feature = "timezone", feature = "datetime"))] -impl From for TimeZoneInvalidOffsetError { - fn from(_: icu_timezone::InvalidOffsetError) -> Self { +impl From for TimeZoneInvalidOffsetError { + fn from(_: icu_time::InvalidOffsetError) -> Self { Self } } diff --git a/ffi/capi/src/neo_datetime.rs b/ffi/capi/src/neo_datetime.rs index f1609d4b4fe..37aef132e10 100644 --- a/ffi/capi/src/neo_datetime.rs +++ b/ffi/capi/src/neo_datetime.rs @@ -515,7 +515,7 @@ pub mod ffi { time: &Time, write: &mut diplomat_runtime::DiplomatWrite, ) { - let value = icu_timezone::DateTime { + let value = icu_time::DateTime { date: date.0, time: time.0, }; @@ -531,7 +531,7 @@ pub mod ffi { time: &Time, write: &mut diplomat_runtime::DiplomatWrite, ) -> Result<(), DateTimeMismatchedCalendarError> { - let value = icu_timezone::DateTime { + let value = icu_time::DateTime { date: date.0.wrap_calendar_in_ref(), time: time.0, }; @@ -998,7 +998,7 @@ pub mod ffi { time: &Time, write: &mut diplomat_runtime::DiplomatWrite, ) { - let value = icu_timezone::DateTime { + let value = icu_time::DateTime { date: date.0.to_calendar(Gregorian), time: time.0, }; diff --git a/ffi/capi/src/time.rs b/ffi/capi/src/time.rs index 6678486df05..6446283cc62 100644 --- a/ffi/capi/src/time.rs +++ b/ffi/capi/src/time.rs @@ -12,73 +12,73 @@ pub mod ffi { #[diplomat::opaque] /// An ICU4X Time object representing a time in terms of hour, minute, second, nanosecond - #[diplomat::rust_link(icu::timezone::Time, Struct)] - pub struct Time(pub icu_timezone::Time); + #[diplomat::rust_link(icu::time::Time, Struct)] + pub struct Time(pub icu_time::Time); impl Time { /// Creates a new [`Time`] given field values - #[diplomat::rust_link(icu::timezone::Time::try_new, FnInStruct)] - #[diplomat::rust_link(icu::timezone::Time::new, FnInStruct, hidden)] + #[diplomat::rust_link(icu::time::Time::try_new, FnInStruct)] + #[diplomat::rust_link(icu::time::Time::new, FnInStruct, hidden)] #[diplomat::attr(supports = fallible_constructors, constructor)] pub fn create( hour: u8, minute: u8, second: u8, - nanosecond: u32, + subsecond: u32, ) -> Result, CalendarError> { let hour = hour.try_into()?; let minute = minute.try_into()?; let second = second.try_into()?; - let nanosecond = nanosecond.try_into()?; - let time = icu_timezone::Time { + let subsecond = subsecond.try_into()?; + let time = icu_time::Time { hour, minute, second, - nanosecond, + subsecond, }; Ok(Box::new(Time(time))) } /// Creates a new [`Time`] from an IXDTF string. - #[diplomat::rust_link(icu::timezone::Time::try_from_str, FnInStruct)] - #[diplomat::rust_link(icu::timezone::Time::try_from_utf8, FnInStruct, hidden)] - #[diplomat::rust_link(icu::timezone::Time::from_str, FnInStruct, hidden)] + #[diplomat::rust_link(icu::time::Time::try_from_str, FnInStruct)] + #[diplomat::rust_link(icu::time::Time::try_from_utf8, FnInStruct, hidden)] + #[diplomat::rust_link(icu::time::Time::from_str, FnInStruct, hidden)] #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor)] pub fn from_string(v: &DiplomatStr) -> Result, CalendarParseError> { - Ok(Box::new(Time(icu_timezone::Time::try_from_utf8(v)?))) + Ok(Box::new(Time(icu_time::Time::try_from_utf8(v)?))) } /// Creates a new [`Time`] representing midnight (00:00.000). - #[diplomat::rust_link(icu::timezone::Time::midnight, FnInStruct)] + #[diplomat::rust_link(icu::time::Time::midnight, FnInStruct)] #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor)] pub fn midnight() -> Result, CalendarError> { - let time = icu_timezone::Time::midnight(); + let time = icu_time::Time::midnight(); Ok(Box::new(Time(time))) } /// Returns the hour in this time - #[diplomat::rust_link(icu::timezone::Time::hour, StructField)] + #[diplomat::rust_link(icu::time::Time::hour, StructField)] #[diplomat::attr(auto, getter)] pub fn hour(&self) -> u8 { self.0.hour.into() } /// Returns the minute in this time - #[diplomat::rust_link(icu::timezone::Time::minute, StructField)] + #[diplomat::rust_link(icu::time::Time::minute, StructField)] #[diplomat::attr(auto, getter)] pub fn minute(&self) -> u8 { self.0.minute.into() } /// Returns the second in this time - #[diplomat::rust_link(icu::timezone::Time::second, StructField)] + #[diplomat::rust_link(icu::time::Time::second, StructField)] #[diplomat::attr(auto, getter)] pub fn second(&self) -> u8 { self.0.second.into() } - /// Returns the nanosecond in this time - #[diplomat::rust_link(icu::timezone::Time::nanosecond, StructField)] + /// Returns the subsecond in this time as nanoseconds + #[diplomat::rust_link(icu::time::Time::subsecond, StructField)] #[diplomat::attr(auto, getter)] - pub fn nanosecond(&self) -> u32 { - self.0.nanosecond.into() + pub fn subsecond(&self) -> u32 { + self.0.subsecond.into() } } } diff --git a/ffi/capi/src/timezone.rs b/ffi/capi/src/timezone.rs index e73981312ec..85ca5e77f82 100644 --- a/ffi/capi/src/timezone.rs +++ b/ffi/capi/src/timezone.rs @@ -10,7 +10,10 @@ use ffi::TimeZoneInfo; pub mod ffi { use alloc::boxed::Box; use core::fmt::Write; - use icu_timezone::{TimeZoneBcp47Id, UtcOffset, ZoneVariant}; + use icu_time::{ + zone::{TimeZoneVariant, UtcOffset}, + TimeZone, + }; use tinystr::TinyAsciiStr; use crate::{ @@ -19,29 +22,29 @@ pub mod ffi { }; #[diplomat::opaque] - #[diplomat::rust_link(icu::timezone::TimeZoneInfo, Struct)] + #[diplomat::rust_link(icu::time::TimeZoneInfo, Struct)] pub struct TimeZoneInfo { - pub(crate) time_zone_id: icu_timezone::TimeZoneBcp47Id, - pub(crate) offset: Option, - pub(crate) zone_variant: Option, - pub(crate) local_time: Option<(icu_calendar::Date, icu_timezone::Time)>, + pub(crate) time_zone_id: icu_time::TimeZone, + pub(crate) offset: Option, + pub(crate) zone_variant: Option, + pub(crate) local_time: Option<(icu_calendar::Date, icu_time::Time)>, } impl TimeZoneInfo { /// Creates a time zone with no information. - #[diplomat::rust_link(icu::timezone::TimeZoneInfo::unknown, FnInStruct)] - #[diplomat::rust_link(icu::timezone::TimeZoneBcp47Id::unknown, FnInStruct, hidden)] + #[diplomat::rust_link(icu::time::TimeZoneInfo::unknown, FnInStruct)] + #[diplomat::rust_link(icu::time::TimeZone::unknown, FnInStruct, hidden)] #[diplomat::attr(auto, named_constructor)] pub fn unknown() -> Box { - Box::new(icu_timezone::TimeZoneInfo::unknown().into()) + Box::new(icu_time::TimeZoneInfo::unknown().into()) } /// Creates a time zone for UTC (Coordinated Universal Time). - #[diplomat::rust_link(icu::timezone::TimeZoneInfo::utc, FnInStruct)] - #[diplomat::rust_link(icu::timezone::UtcOffset::zero, FnInStruct, hidden)] + #[diplomat::rust_link(icu::time::TimeZoneInfo::utc, FnInStruct)] + #[diplomat::rust_link(icu::time::zone::UtcOffset::zero, FnInStruct, hidden)] #[diplomat::attr(auto, named_constructor)] pub fn utc() -> Box { - Box::new(icu_timezone::TimeZoneInfo::utc().into()) + Box::new(icu_time::TimeZoneInfo::utc().into()) } /// Creates a time zone. @@ -54,13 +57,13 @@ pub mod ffi { Box::new(Self { time_zone_id: TinyAsciiStr::try_from_utf8(bcp47_id) .ok() - .map(TimeZoneBcp47Id) - .unwrap_or(TimeZoneBcp47Id::unknown()), + .map(TimeZone) + .unwrap_or(TimeZone::unknown()), offset: UtcOffset::try_from_seconds(offset_seconds).ok(), zone_variant: Some(if dst { - ZoneVariant::Daylight + TimeZoneVariant::Daylight } else { - ZoneVariant::Standard + TimeZoneVariant::Standard }), local_time: None, }) @@ -69,55 +72,55 @@ pub mod ffi { /// Sets the `offset` field from offset seconds. /// /// Errors if the offset seconds are out of range. - #[diplomat::rust_link(icu::timezone::UtcOffset, Struct, compact)] - #[diplomat::rust_link(icu::timezone::TimeZoneBcp47Id::with_offset, FnInStruct)] - #[diplomat::rust_link(icu::timezone::UtcOffset::try_from_seconds, FnInStruct)] - #[diplomat::rust_link(icu::timezone::UtcOffset::from_seconds_unchecked, FnInStruct, hidden)] + #[diplomat::rust_link(icu::time::zone::UtcOffset, Struct, compact)] + #[diplomat::rust_link(icu::time::TimeZone::with_offset, FnInStruct)] + #[diplomat::rust_link(icu::time::zone::UtcOffset::try_from_seconds, FnInStruct)] + #[diplomat::rust_link( + icu::time::zone::UtcOffset::from_seconds_unchecked, + FnInStruct, + hidden + )] pub fn try_set_offset_seconds( &mut self, offset_seconds: i32, ) -> Result<(), TimeZoneInvalidOffsetError> { - self.offset = Some(icu_timezone::UtcOffset::try_from_seconds(offset_seconds)?); + self.offset = Some(UtcOffset::try_from_seconds(offset_seconds)?); Ok(()) } /// Sets the `offset` field from offset as eighths of an hour. - #[diplomat::rust_link(icu::timezone::UtcOffset, Struct, compact)] - #[diplomat::rust_link(icu::timezone::TimeZoneBcp47Id::with_offset, FnInStruct)] - #[diplomat::rust_link(icu::timezone::UtcOffset::from_eighths_of_hour, FnInStruct)] + #[diplomat::rust_link(icu::time::zone::UtcOffset, Struct, compact)] + #[diplomat::rust_link(icu::time::TimeZone::with_offset, FnInStruct)] + #[diplomat::rust_link(icu::time::zone::UtcOffset::from_eighths_of_hour, FnInStruct)] pub fn set_offset_eighths_of_hour(&mut self, offset_eighths_of_hour: i8) { - self.offset = Some(icu_timezone::UtcOffset::from_eighths_of_hour( - offset_eighths_of_hour, - )); + self.offset = Some(UtcOffset::from_eighths_of_hour(offset_eighths_of_hour)); } /// Sets the `offset` field from a string. - #[diplomat::rust_link(icu::timezone::UtcOffset, Struct, compact)] - #[diplomat::rust_link(icu::timezone::TimeZoneBcp47Id::with_offset, FnInStruct)] - #[diplomat::rust_link(icu::timezone::UtcOffset::try_from_str, FnInStruct)] - #[diplomat::rust_link(icu::timezone::UtcOffset::try_from_utf8, FnInStruct, hidden)] - #[diplomat::rust_link(icu::timezone::UtcOffset::from_str, FnInStruct, hidden)] + #[diplomat::rust_link(icu::time::zone::UtcOffset, Struct, compact)] + #[diplomat::rust_link(icu::time::TimeZone::with_offset, FnInStruct)] + #[diplomat::rust_link(icu::time::zone::UtcOffset::try_from_str, FnInStruct)] + #[diplomat::rust_link(icu::time::zone::UtcOffset::try_from_utf8, FnInStruct, hidden)] + #[diplomat::rust_link(icu::time::zone::UtcOffset::from_str, FnInStruct, hidden)] pub fn try_set_offset_str( &mut self, offset: &DiplomatStr, ) -> Result<(), TimeZoneInvalidOffsetError> { - self.offset = Some( - icu_timezone::UtcOffset::try_from_utf8(offset) - .map_err(|_| TimeZoneInvalidOffsetError)?, - ); + self.offset = + Some(UtcOffset::try_from_utf8(offset).map_err(|_| TimeZoneInvalidOffsetError)?); Ok(()) } /// Gets the `offset` field from offset as eighths of an hour. - #[diplomat::rust_link(icu::timezone::UtcOffset::to_eighths_of_hour, FnInStruct)] + #[diplomat::rust_link(icu::time::zone::UtcOffset::to_eighths_of_hour, FnInStruct)] pub fn offset_eighths_of_hour(&self) -> Option { - self.offset.map(icu_timezone::UtcOffset::to_eighths_of_hour) + self.offset.map(UtcOffset::to_eighths_of_hour) } /// Clears the `offset` field. - #[diplomat::rust_link(icu::timezone::UtcOffset::offset_seconds, FnInStruct)] - #[diplomat::rust_link(icu::timezone::UtcOffset, Struct, compact)] - #[diplomat::rust_link(icu::timezone::TimeZoneBcp47Id::without_offset, FnInStruct, compact)] + #[diplomat::rust_link(icu::time::zone::UtcOffset::offset_seconds, FnInStruct)] + #[diplomat::rust_link(icu::time::zone::UtcOffset, Struct, compact)] + #[diplomat::rust_link(icu::time::TimeZone::without_offset, FnInStruct, compact)] pub fn clear_offset(&mut self) { self.offset.take(); } @@ -125,36 +128,36 @@ pub mod ffi { /// Returns the value of the `offset` field as offset seconds. /// /// Returns null if the `offset` field is empty. - #[diplomat::rust_link(icu::timezone::TimeZoneInfo::offset, FnInStruct)] - #[diplomat::rust_link(icu::timezone::UtcOffset::to_seconds, FnInStruct)] - #[diplomat::rust_link(icu::timezone::UtcOffset, Struct, compact)] + #[diplomat::rust_link(icu::time::TimeZoneInfo::offset, FnInStruct)] + #[diplomat::rust_link(icu::time::zone::UtcOffset::to_seconds, FnInStruct)] + #[diplomat::rust_link(icu::time::zone::UtcOffset, Struct, compact)] #[diplomat::attr(auto, getter)] pub fn offset_seconds(&self) -> Option { - self.offset.map(icu_timezone::UtcOffset::to_seconds) + self.offset.map(UtcOffset::to_seconds) } /// Returns whether the `offset` field is positive. /// /// Returns null if the `offset` field is empty. - #[diplomat::rust_link(icu::timezone::UtcOffset::is_non_negative, FnInStruct)] + #[diplomat::rust_link(icu::time::zone::UtcOffset::is_non_negative, FnInStruct)] #[diplomat::attr(auto, getter)] pub fn is_offset_non_negative(&self) -> Option { - self.offset.map(icu_timezone::UtcOffset::is_non_negative) + self.offset.map(UtcOffset::is_non_negative) } /// Returns whether the `offset` field is zero. /// /// Returns null if the `offset` field is empty (which is not the same as zero). - #[diplomat::rust_link(icu::timezone::UtcOffset::is_zero, FnInStruct)] + #[diplomat::rust_link(icu::time::zone::UtcOffset::is_zero, FnInStruct)] #[diplomat::attr(auto, getter)] pub fn is_offset_zero(&self) -> Option { - self.offset.map(icu_timezone::UtcOffset::is_zero) + self.offset.map(UtcOffset::is_zero) } /// Returns the hours part of the the `offset` field. /// /// Returns null if the `offset` field is empty. - #[diplomat::rust_link(icu::timezone::UtcOffset::hours_part, FnInStruct)] + #[diplomat::rust_link(icu::time::zone::UtcOffset::hours_part, FnInStruct)] #[diplomat::attr(auto, getter)] pub fn offset_hours_part(&self) -> Option { self.offset.map(|o| o.hours_part()) @@ -163,7 +166,7 @@ pub mod ffi { /// Returns the minutes part of the the `offset` field. /// /// Returns null if the `offset` field is empty. - #[diplomat::rust_link(icu::timezone::UtcOffset::minutes_part, FnInStruct)] + #[diplomat::rust_link(icu::time::zone::UtcOffset::minutes_part, FnInStruct)] #[diplomat::attr(auto, getter)] pub fn offset_minutes_part(&self) -> Option { self.offset.map(|o| o.minutes_part()) @@ -172,7 +175,7 @@ pub mod ffi { /// Returns the seconds part of the the `offset` field. /// /// Returns null if the `offset` field is empty. - #[diplomat::rust_link(icu::timezone::UtcOffset::seconds_part, FnInStruct)] + #[diplomat::rust_link(icu::time::zone::UtcOffset::seconds_part, FnInStruct)] #[diplomat::attr(auto, getter)] pub fn offset_seconds_part(&self) -> Option { self.offset.map(|o| o.seconds_part()) @@ -181,25 +184,21 @@ pub mod ffi { /// Sets the `time_zone_id` field from a BCP-47 string. /// /// Errors if the string is not a valid BCP-47 time zone ID. - #[diplomat::rust_link(icu::timezone::TimeZoneBcp47Id, Struct, compact)] - #[diplomat::rust_link(icu::timezone::TimeZoneBcp47Id::from_str, FnInStruct, hidden)] - #[diplomat::rust_link(icu::timezone::TimeZoneBcp47Id::deref, FnInStruct, hidden)] - #[diplomat::rust_link( - icu::timezone::TimeZoneBcp47Id::Target, - AssociatedTypeInStruct, - hidden - )] + #[diplomat::rust_link(icu::time::TimeZone, Struct, compact)] + #[diplomat::rust_link(icu::time::TimeZone::from_str, FnInStruct, hidden)] + #[diplomat::rust_link(icu::time::TimeZone::deref, FnInStruct, hidden)] + #[diplomat::rust_link(icu::time::TimeZone::Target, AssociatedTypeInStruct, hidden)] pub fn set_time_zone_id(&mut self, id: &DiplomatStr) { self.time_zone_id = tinystr::TinyAsciiStr::try_from_utf8(id) - .map(TimeZoneBcp47Id) - .unwrap_or(TimeZoneBcp47Id::unknown()); + .map(TimeZone) + .unwrap_or(TimeZone::unknown()); } /// Sets the `time_zone_id` field from an IANA string by looking up /// the corresponding BCP-47 string. pub fn set_iana_time_zone_id( &mut self, - mapper: &crate::timezone_mapper::ffi::TimeZoneIdMapper, + mapper: &crate::timezone_mapper::ffi::IanaParser, id: &DiplomatStr, ) { self.time_zone_id = mapper.0.as_borrowed().iana_bytes_to_bcp47(id); @@ -208,57 +207,57 @@ pub mod ffi { /// Writes the value of the `time_zone_id` field as a string. /// /// Returns null if the `time_zone_id` field is empty. - #[diplomat::rust_link(icu::timezone::TimeZoneInfo::time_zone_id, FnInStruct)] - #[diplomat::rust_link(icu::timezone::TimeZoneBcp47Id, Struct, compact)] + #[diplomat::rust_link(icu::time::TimeZoneInfo::time_zone_id, FnInStruct)] + #[diplomat::rust_link(icu::time::TimeZone, Struct, compact)] #[diplomat::attr(auto, getter)] pub fn time_zone_id(&self, write: &mut diplomat_runtime::DiplomatWrite) { let _infallible = write.write_str(self.time_zone_id.0.as_str()); } /// Clears the `zone_variant` field. - #[diplomat::rust_link(icu::timezone::ZoneVariant, Enum, compact)] + #[diplomat::rust_link(icu::time::TimeZoneVariant, Enum, compact)] pub fn clear_zone_variant(&mut self) { self.zone_variant.take(); } /// Sets the `zone_variant` field to standard time, which may or may /// not correspond to a display name with Standard in its name. - #[diplomat::rust_link(icu::timezone::ZoneVariant::Standard, EnumVariant)] - #[diplomat::rust_link(icu::timezone::TimeZoneInfo::with_zone_variant, FnInStruct)] + #[diplomat::rust_link(icu::time::TimeZoneVariant::Standard, EnumVariant)] + #[diplomat::rust_link(icu::time::TimeZoneInfo::with_zone_variant, FnInStruct)] pub fn set_standard_time(&mut self) { - self.zone_variant = Some(icu_timezone::ZoneVariant::Standard) + self.zone_variant = Some(TimeZoneVariant::Standard) } /// Sets the `zone_variant` field to "daylight" time, which may or may /// not correspond to a display name with "Daylight" in its name. - #[diplomat::rust_link(icu::timezone::ZoneVariant::Daylight, EnumVariant)] - #[diplomat::rust_link(icu::timezone::TimeZoneInfo::with_zone_variant, FnInStruct)] + #[diplomat::rust_link(icu::time::TimeZoneVariant::Daylight, EnumVariant)] + #[diplomat::rust_link(icu::time::TimeZoneInfo::with_zone_variant, FnInStruct)] pub fn set_daylight_time(&mut self) { - self.zone_variant = Some(icu_timezone::ZoneVariant::Daylight) + self.zone_variant = Some(TimeZoneVariant::Daylight) } /// Returns whether the `zone_variant` field is standard time. /// /// Returns null if the `zone_variant` field is empty. - #[diplomat::rust_link(icu::timezone::ZoneVariant::Standard, EnumVariant)] - #[diplomat::rust_link(icu::timezone::TimeZoneInfo::zone_variant, FnInStruct, compact)] + #[diplomat::rust_link(icu::time::TimeZoneVariant::Standard, EnumVariant)] + #[diplomat::rust_link(icu::time::TimeZoneInfo::zone_variant, FnInStruct, compact)] #[diplomat::attr(auto, getter)] pub fn is_standard_time(&self) -> Option { - Some(self.zone_variant? == icu_timezone::ZoneVariant::Standard) + Some(self.zone_variant? == TimeZoneVariant::Standard) } /// Returns whether the `zone_variant` field is daylight time. /// /// Returns null if the `zone_variant` field is empty. - #[diplomat::rust_link(icu::timezone::ZoneVariant::Daylight, EnumVariant)] - #[diplomat::rust_link(icu::timezone::TimeZoneInfo::zone_variant, FnInStruct, compact)] + #[diplomat::rust_link(icu::time::TimeZoneVariant::Daylight, EnumVariant)] + #[diplomat::rust_link(icu::time::TimeZoneInfo::zone_variant, FnInStruct, compact)] #[diplomat::attr(auto, getter)] pub fn is_daylight_time(&self) -> Option { - Some(self.zone_variant? == icu_timezone::ZoneVariant::Daylight) + Some(self.zone_variant? == TimeZoneVariant::Daylight) } /// Sets the `local_time` field. - #[diplomat::rust_link(icu::timezone::TimeZoneInfo::at_time, FnInStruct)] + #[diplomat::rust_link(icu::time::TimeZoneInfo::at_time, FnInStruct)] pub fn set_local_time(&mut self, date: &IsoDate, time: &Time) { self.local_time = Some((date.0, time.0)); } @@ -269,7 +268,7 @@ pub mod ffi { } /// Returns a copy of the `local_time` field. - #[diplomat::rust_link(icu::timezone::TimeZoneInfo::local_time, FnInStruct)] + #[diplomat::rust_link(icu::time::TimeZoneInfo::local_time, FnInStruct)] #[diplomat::attr(auto, getter)] pub fn get_local_time(&self) -> Option { self.local_time.map(|(date, time)| IsoDateTime { @@ -280,8 +279,8 @@ pub mod ffi { } } -impl From> for TimeZoneInfo { - fn from(other: icu_timezone::TimeZoneInfo) -> Self { +impl From> for TimeZoneInfo { + fn from(other: icu_time::TimeZoneInfo) -> Self { Self { time_zone_id: other.time_zone_id(), offset: other.offset(), @@ -291,8 +290,8 @@ impl From> for TimeZoneIn } } -impl From> for TimeZoneInfo { - fn from(other: icu_timezone::TimeZoneInfo) -> Self { +impl From> for TimeZoneInfo { + fn from(other: icu_time::TimeZoneInfo) -> Self { Self { time_zone_id: other.time_zone_id(), offset: other.offset(), diff --git a/ffi/capi/src/timezone_mapper.rs b/ffi/capi/src/timezone_mapper.rs index 0ea9a83476e..4873441a7ef 100644 --- a/ffi/capi/src/timezone_mapper.rs +++ b/ffi/capi/src/timezone_mapper.rs @@ -19,39 +19,37 @@ pub mod ffi { /// This mapper supports two-way mapping, but it is optimized for the case of IANA to BCP-47. /// It also supports normalizing and canonicalizing the IANA strings. #[diplomat::opaque] - #[diplomat::rust_link(icu::timezone::TimeZoneIdMapper, Struct)] - #[diplomat::rust_link(icu::timezone::TimeZoneIdMapper::as_borrowed, FnInStruct, hidden)] - #[diplomat::rust_link(icu::timezone::TimeZoneIdMapperBorrowed, Struct, hidden)] - #[diplomat::rust_link(icu::timezone::TimeZoneIdMapperBorrowed::new, FnInStruct, hidden)] - #[diplomat::rust_link(icu::timezone::NormalizedIana, Struct, hidden)] - pub struct TimeZoneIdMapper(pub icu_timezone::TimeZoneIdMapper); + #[diplomat::rust_link(icu::time::zone::iana::IanaParser, Struct)] + #[diplomat::rust_link(icu::time::zone::iana::IanaParser::as_borrowed, FnInStruct, hidden)] + #[diplomat::rust_link(icu::time::zone::iana::IanaParserBorrowed, Struct, hidden)] + #[diplomat::rust_link(icu::time::zone::iana::IanaParserBorrowed::new, FnInStruct, hidden)] + #[diplomat::rust_link(icu::time::NormalizedIana, Struct, hidden)] + pub struct IanaParser(pub icu_time::zone::iana::IanaParser); - impl TimeZoneIdMapper { - /// Create a new [`TimeZoneIdMapper`] using compiled data - #[diplomat::rust_link(icu::timezone::TimeZoneIdMapper::new, FnInStruct)] + impl IanaParser { + /// Create a new [`IanaParser`] using compiled data + #[diplomat::rust_link(icu::time::zone::iana::IanaParser::new, FnInStruct)] #[diplomat::attr(auto, constructor)] #[cfg(feature = "compiled_data")] - pub fn create() -> Box { - Box::new(TimeZoneIdMapper( - icu_timezone::TimeZoneIdMapper::new().static_to_owned(), + pub fn create() -> Box { + Box::new(IanaParser( + icu_time::zone::iana::IanaParser::new().static_to_owned(), )) } - /// Create a new [`TimeZoneIdMapper`] using a particular data source - #[diplomat::rust_link(icu::timezone::TimeZoneIdMapper::new, FnInStruct)] + /// Create a new [`IanaParser`] using a particular data source + #[diplomat::rust_link(icu::time::zone::iana::IanaParser::new, FnInStruct)] #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "with_provider")] #[cfg(feature = "buffer_provider")] - pub fn create_with_provider( - provider: &DataProvider, - ) -> Result, DataError> { - Ok(Box::new(TimeZoneIdMapper( - icu_timezone::TimeZoneIdMapper::try_new_with_buffer_provider(provider.get()?)?, + pub fn create_with_provider(provider: &DataProvider) -> Result, DataError> { + Ok(Box::new(IanaParser( + icu_time::zone::iana::IanaParser::try_new_with_buffer_provider(provider.get()?)?, ))) } - #[diplomat::rust_link(icu::timezone::TimeZoneIdMapperBorrowed::iana_to_bcp47, FnInStruct)] + #[diplomat::rust_link(icu::time::zone::iana::IanaParserBorrowed::iana_to_bcp47, FnInStruct)] #[diplomat::rust_link( - icu::timezone::TimeZoneIdMapperBorrowed::iana_bytes_to_bcp47, + icu::time::zone::iana::IanaParserBorrowed::iana_bytes_to_bcp47, FnInStruct, hidden )] @@ -65,7 +63,10 @@ pub mod ffi { let _infallible = bcp47.0.write_to(write); } - #[diplomat::rust_link(icu::timezone::TimeZoneIdMapperBorrowed::normalize_iana, FnInStruct)] + #[diplomat::rust_link( + icu::time::zone::iana::IanaParserBorrowed::normalize_iana, + FnInStruct + )] pub fn normalize_iana( &self, value: &str, @@ -78,7 +79,7 @@ pub mod ffi { } #[diplomat::rust_link( - icu::timezone::TimeZoneIdMapperBorrowed::canonicalize_iana, + icu::time::zone::iana::IanaParserBorrowed::canonicalize_iana, FnInStruct )] pub fn canonicalize_iana( @@ -93,7 +94,7 @@ pub mod ffi { } #[diplomat::rust_link( - icu::timezone::TimeZoneIdMapperBorrowed::find_canonical_iana_from_bcp47, + icu::time::zone::iana::IanaParserBorrowed::find_canonical_iana_from_bcp47, FnInStruct )] pub fn find_canonical_iana_from_bcp47( @@ -102,9 +103,9 @@ pub mod ffi { write: &mut diplomat_runtime::DiplomatWrite, ) -> Option<()> { let handle = self.0.as_borrowed(); - let iana = TinyAsciiStr::try_from_utf8(value).ok().and_then(|s| { - handle.find_canonical_iana_from_bcp47(icu_timezone::TimeZoneBcp47Id(s)) - })?; + let iana = TinyAsciiStr::try_from_utf8(value) + .ok() + .and_then(|s| handle.find_canonical_iana_from_bcp47(icu_time::TimeZone(s)))?; let _infallible = iana.write_to(write); Some(()) } @@ -115,69 +116,51 @@ pub mod ffi { /// This mapper supports two-way mapping, but it is optimized for the case of IANA to BCP-47. /// It also supports normalizing and canonicalizing the IANA strings. #[diplomat::opaque] - #[diplomat::rust_link(icu::timezone::TimeZoneIdMapperWithFastCanonicalization, Struct)] + #[diplomat::rust_link(icu::time::zone::iana::IanaParserExtended, Struct)] #[diplomat::rust_link( - icu::timezone::TimeZoneIdMapperWithFastCanonicalization::as_borrowed, + icu::time::zone::iana::IanaParserExtended::as_borrowed, FnInStruct, hidden )] + #[diplomat::rust_link(icu::time::zone::iana::IanaParserExtended::inner, FnInStruct, hidden)] + #[diplomat::rust_link(icu::time::zone::iana::IanaParserExtendedBorrowed, Struct, hidden)] #[diplomat::rust_link( - icu::timezone::TimeZoneIdMapperWithFastCanonicalization::inner, - FnInStruct, - hidden - )] - #[diplomat::rust_link( - icu::timezone::TimeZoneIdMapperWithFastCanonicalizationBorrowed, - Struct, - hidden - )] - #[diplomat::rust_link( - icu::timezone::TimeZoneIdMapperWithFastCanonicalizationBorrowed::inner, + icu::time::zone::iana::IanaParserExtendedBorrowed::inner, FnInStruct, hidden )] - pub struct TimeZoneIdMapperWithFastCanonicalization( - pub icu_timezone::TimeZoneIdMapperWithFastCanonicalization, + pub struct IanaParserExtended( + pub icu_time::zone::iana::IanaParserExtended, ); - impl TimeZoneIdMapperWithFastCanonicalization { - /// Create a new [`TimeZoneIdMapperWithFastCanonicalization`] using compiled data - #[diplomat::rust_link( - icu::timezone::TimeZoneIdMapperWithFastCanonicalization::new, - FnInStruct - )] - #[diplomat::rust_link( - icu::timezone::TimeZoneIdMapperWithFastCanonicalizationBorrowed::new, - FnInStruct - )] + impl IanaParserExtended { + /// Create a new [`IanaParserExtended`] using compiled data + #[diplomat::rust_link(icu::time::zone::iana::IanaParserExtended::new, FnInStruct)] + #[diplomat::rust_link(icu::time::zone::iana::IanaParserExtendedBorrowed::new, FnInStruct)] #[diplomat::attr(auto, constructor)] #[cfg(feature = "compiled_data")] - pub fn create() -> Box { - Box::new(TimeZoneIdMapperWithFastCanonicalization( - icu_timezone::TimeZoneIdMapperWithFastCanonicalization::new().static_to_owned(), + pub fn create() -> Box { + Box::new(IanaParserExtended( + icu_time::zone::iana::IanaParserExtended::new().static_to_owned(), )) } - /// Create a new [`TimeZoneIdMapperWithFastCanonicalization`] using a particular data source - #[diplomat::rust_link( - icu::timezone::TimeZoneIdMapperWithFastCanonicalization::new, - FnInStruct - )] - #[diplomat::rust_link( - icu::timezone::TimeZoneIdMapperWithFastCanonicalizationBorrowed::new, - FnInStruct - )] + /// Create a new [`IanaParserExtended`] using a particular data source + #[diplomat::rust_link(icu::time::zone::iana::IanaParserExtended::new, FnInStruct)] + #[diplomat::rust_link(icu::time::zone::iana::IanaParserExtendedBorrowed::new, FnInStruct)] #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "with_provider")] #[cfg(feature = "buffer_provider")] pub fn create_with_provider( provider: &DataProvider, - ) -> Result, DataError> { - Ok(Box::new(TimeZoneIdMapperWithFastCanonicalization( - icu_timezone::TimeZoneIdMapperWithFastCanonicalization::try_new_with_buffer_provider(provider.get()?)?, + ) -> Result, DataError> { + Ok(Box::new(IanaParserExtended( + icu_time::zone::iana::IanaParserExtended::try_new_with_buffer_provider( + provider.get()?, + )?, ))) } #[diplomat::rust_link( - icu::timezone::TimeZoneIdMapperWithFastCanonicalizationBorrowed::canonicalize_iana, + icu::time::zone::iana::IanaParserExtendedBorrowed::canonicalize_iana, FnInStruct )] pub fn canonicalize_iana( @@ -192,7 +175,7 @@ pub mod ffi { } #[diplomat::rust_link( - icu::timezone::TimeZoneIdMapperWithFastCanonicalizationBorrowed::canonical_iana_from_bcp47, + icu::time::zone::iana::IanaParserExtendedBorrowed::canonical_iana_from_bcp47, FnInStruct )] pub fn canonical_iana_from_bcp47( @@ -203,7 +186,7 @@ pub mod ffi { let handle = self.0.as_borrowed(); let iana = TinyAsciiStr::try_from_utf8(value) .ok() - .map(icu_timezone::TimeZoneBcp47Id) + .map(icu_time::TimeZone) .and_then(|t| handle.canonical_iana_from_bcp47(t))?; let _infallible = iana.write_to(write); Some(()) diff --git a/ffi/capi/src/zoned_datetime.rs b/ffi/capi/src/zoned_datetime.rs index d85f2f5c7c6..2dd87eb05b5 100644 --- a/ffi/capi/src/zoned_datetime.rs +++ b/ffi/capi/src/zoned_datetime.rs @@ -19,40 +19,40 @@ pub mod ffi { use crate::time::ffi::Time; use crate::timezone::ffi::TimeZoneInfo; - #[diplomat::rust_link(icu::timezone::ZonedDateTimeParser, Struct)] + #[diplomat::rust_link(icu::time::ZonedDateTimeParser, Struct)] #[diplomat::opaque] pub struct ZonedDateTimeParser( - icu_timezone::TimeZoneIdMapper, - icu_timezone::ZoneOffsetCalculator, + icu_time::zone::iana::IanaParser, + icu_time::zone::UtcOffsetCalculator, ); impl ZonedDateTimeParser { /// Construct a new [`ZonedDateTimeParser`] instance using compiled data. - #[diplomat::rust_link(icu::timezone::ZonedDateTimeParser::new, FnInStruct)] + #[diplomat::rust_link(icu::time::ZonedDateTimeParser::new, FnInStruct)] #[diplomat::attr(auto, constructor)] #[cfg(feature = "compiled_data")] pub fn create() -> Box { Box::new(ZonedDateTimeParser( - icu_timezone::TimeZoneIdMapper::new().static_to_owned(), - icu_timezone::ZoneOffsetCalculator::new(), + icu_time::zone::iana::IanaParser::new().static_to_owned(), + icu_time::zone::UtcOffsetCalculator::new(), )) } /// Construct a new [`ZonedDateTimeParser`] instance using a particular data source. - #[diplomat::rust_link(icu::timezone::ZonedDateTimeParser::new, FnInStruct)] + #[diplomat::rust_link(icu::time::ZonedDateTimeParser::new, FnInStruct)] #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "with_provider")] #[cfg(feature = "buffer_provider")] pub fn create_with_provider( provider: &DataProvider, ) -> Result, DataError> { Ok(Box::new(ZonedDateTimeParser( - icu_timezone::TimeZoneIdMapper::try_new_with_buffer_provider(provider.get()?)?, - icu_timezone::ZoneOffsetCalculator::try_new_with_buffer_provider(provider.get()?)?, + icu_time::zone::iana::IanaParser::try_new_with_buffer_provider(provider.get()?)?, + icu_time::zone::UtcOffsetCalculator::try_new_with_buffer_provider(provider.get()?)?, ))) } } /// An ICU4X ZonedDateTime object capable of containing a ISO-8601 date, time, and zone. - #[diplomat::rust_link(icu::timezone::ZonedDateTime, Struct)] + #[diplomat::rust_link(icu::time::ZonedDateTime, Struct)] #[diplomat::out] pub struct ZonedIsoDateTime { pub date: Box, @@ -62,14 +62,14 @@ pub mod ffi { impl ZonedDateTimeParser { /// Creates a new [`ZonedIsoDateTime`] from an IXDTF string. - #[diplomat::rust_link(icu::timezone::ZonedDateTime::try_from_str, FnInStruct)] - #[diplomat::rust_link(icu::timezone::ZonedDateTime::try_from_utf8, FnInStruct, hidden)] + #[diplomat::rust_link(icu::time::ZonedDateTime::try_from_str, FnInStruct)] + #[diplomat::rust_link(icu::time::ZonedDateTime::try_from_utf8, FnInStruct, hidden)] pub fn try_iso_from_str( &self, v: &DiplomatStr, ) -> Result { - let icu_timezone::ZonedDateTime { date, time, zone } = - icu_timezone::ZonedDateTime::try_from_utf8(v, Iso, self.0.as_borrowed(), &self.1)?; + let icu_time::ZonedDateTime { date, time, zone } = + icu_time::ZonedDateTime::try_from_utf8(v, Iso, self.0.as_borrowed(), &self.1)?; Ok(ZonedIsoDateTime { date: Box::new(IsoDate(date)), time: Box::new(Time(time)), @@ -79,7 +79,7 @@ pub mod ffi { } /// An ICU4X DateTime object capable of containing a date, time, and zone for any calendar. - #[diplomat::rust_link(icu::timezone::ZonedDateTime, Struct)] + #[diplomat::rust_link(icu::time::ZonedDateTime, Struct)] #[diplomat::out] pub struct ZonedDateTime { pub date: Box, @@ -89,16 +89,16 @@ pub mod ffi { impl ZonedDateTimeParser { /// Creates a new [`ZonedDateTime`] from an IXDTF string. - #[diplomat::rust_link(icu::timezone::DateTime::try_from_str, FnInStruct)] - #[diplomat::rust_link(icu::timezone::DateTime::try_from_utf8, FnInStruct, hidden)] - #[diplomat::rust_link(icu::timezone::DateTime::from_str, FnInStruct, hidden)] + #[diplomat::rust_link(icu::time::DateTime::try_from_str, FnInStruct)] + #[diplomat::rust_link(icu::time::DateTime::try_from_utf8, FnInStruct, hidden)] + #[diplomat::rust_link(icu::time::DateTime::from_str, FnInStruct, hidden)] pub fn try_from_str( &self, v: &DiplomatStr, calendar: &Calendar, ) -> Result { - let icu_timezone::ZonedDateTime { date, time, zone } = - icu_timezone::ZonedDateTime::try_from_utf8( + let icu_time::ZonedDateTime { date, time, zone } = + icu_time::ZonedDateTime::try_from_utf8( v, calendar.0.clone(), self.0.as_borrowed(), diff --git a/ffi/capi/src/zoned_formatter.rs b/ffi/capi/src/zoned_formatter.rs index 23dffadfaa1..4a92b64e008 100644 --- a/ffi/capi/src/zoned_formatter.rs +++ b/ffi/capi/src/zoned_formatter.rs @@ -93,7 +93,7 @@ pub mod ffi { zone: &TimeZoneInfo, write: &mut diplomat_runtime::DiplomatWrite, ) -> Result<(), DateTimeFormatError> { - let zdt = icu_timezone::ZonedDateTime { + let zdt = icu_time::ZonedDateTime { date: icu_calendar::Date::new_from_iso(date.0, icu_calendar::Gregorian), time: time.0, zone: zone @@ -172,7 +172,7 @@ pub mod ffi { zone: &TimeZoneInfo, write: &mut diplomat_runtime::DiplomatWrite, ) -> Result<(), DateTimeFormatError> { - let zdt = icu_timezone::ZonedDateTime { + let zdt = icu_time::ZonedDateTime { date: date.0.wrap_calendar_in_ref(), time: time.0, zone: zone @@ -198,7 +198,7 @@ pub mod ffi { zone: &TimeZoneInfo, write: &mut diplomat_runtime::DiplomatWrite, ) -> Result<(), DateTimeFormatError> { - let zdt = icu_timezone::ZonedDateTime { + let zdt = icu_time::ZonedDateTime { date: date.0, time: time.0, zone: zone diff --git a/ffi/capi/tests/missing_apis.txt b/ffi/capi/tests/missing_apis.txt index 4966a100890..cdb6a091465 100644 --- a/ffi/capi/tests/missing_apis.txt +++ b/ffi/capi/tests/missing_apis.txt @@ -205,29 +205,33 @@ icu::properties::props::SentenceBreak::from_icu4c_value#FnInStruct icu::properties::props::SentenceBreak::to_icu4c_value#FnInStruct icu::properties::props::WordBreak::from_icu4c_value#FnInStruct icu::properties::props::WordBreak::to_icu4c_value#FnInStruct -icu::timezone::TimeZoneBcp47Iter#Struct -icu::timezone::TimeZoneBcp47Iter::next#FnInStruct -icu::timezone::TimeZoneCanonicalIanaIter#Struct -icu::timezone::TimeZoneCanonicalIanaIter::next#FnInStruct -icu::timezone::TimeZoneIdMapperBorrowed::iter_bcp47#FnInStruct -icu::timezone::TimeZoneIdMapperWithFastCanonicalizationBorrowed::iter_canonical_iana#FnInStruct -icu::timezone::TimeZoneInfo::infer_zone_variant#FnInStruct -icu::timezone::TimeZoneInfo::with_rearguard_isdst#FnInStruct -icu::timezone::WindowsTimeZoneMapper#Struct -icu::timezone::WindowsTimeZoneMapper::new#FnInStruct -icu::timezone::WindowsTimeZoneMapperBorrowed#Struct -icu::timezone::WindowsTimeZoneMapperBorrowed::new#FnInStruct -icu::timezone::WindowsTimeZoneMapperBorrowed::windows_tz_to_bcp47_id#FnInStruct -icu::timezone::ZoneOffsetCalculator#Struct -icu::timezone::ZoneOffsetCalculator::compute_offsets_from_time_zone#FnInStruct -icu::timezone::ZoneOffsetCalculator::new#FnInStruct -icu::timezone::ZoneOffsets#Struct -icu::timezone::ZonedDateTime::try_location_only_from_str#FnInStruct -icu::timezone::ZonedDateTime::try_location_only_from_utf8#FnInStruct -icu::timezone::ZonedDateTime::try_loose_from_str#FnInStruct -icu::timezone::ZonedDateTime::try_loose_from_utf8#FnInStruct -icu::timezone::ZonedDateTime::try_offset_only_from_str#FnInStruct -icu::timezone::ZonedDateTime::try_offset_only_from_utf8#FnInStruct -icu::timezone::models::AtTime#Enum -icu::timezone::models::Base#Enum -icu::timezone::models::Full#Enum +icu::time::TimeZoneInfo::infer_zone_variant#FnInStruct +icu::time::TimeZoneInfo::with_rearguard_isdst#FnInStruct +icu::time::ZonedDateTime::try_location_only_from_str#FnInStruct +icu::time::ZonedDateTime::try_location_only_from_utf8#FnInStruct +icu::time::ZonedDateTime::try_loose_from_str#FnInStruct +icu::time::ZonedDateTime::try_loose_from_utf8#FnInStruct +icu::time::ZonedDateTime::try_offset_only_from_str#FnInStruct +icu::time::ZonedDateTime::try_offset_only_from_utf8#FnInStruct +icu::time::zone::TimeZoneVariant#Enum +icu::time::zone::UtcOffsetCalculator#Struct +icu::time::zone::UtcOffsetCalculator::compute_offsets_from_time_zone#FnInStruct +icu::time::zone::UtcOffsetCalculator::new#FnInStruct +icu::time::zone::UtcOffsets#Struct +icu::time::zone::WindowsTimeZoneMapper#Struct +icu::time::zone::WindowsTimeZoneMapper::new#FnInStruct +icu::time::zone::iana::IanaParserBorrowed::iter_bcp47#FnInStruct +icu::time::zone::iana::IanaParserExtended::try_new_with_mapper#FnInStruct +icu::time::zone::iana::IanaParserExtendedBorrowed::iter_canonical_iana#FnInStruct +icu::time::zone::iana::TimeZoneBcp47Iter#Struct +icu::time::zone::iana::TimeZoneBcp47Iter::next#FnInStruct +icu::time::zone::iana::TimeZoneCanonicalIanaIter#Struct +icu::time::zone::iana::TimeZoneCanonicalIanaIter::next#FnInStruct +icu::time::zone::models::AtTime#Enum +icu::time::zone::models::Base#Enum +icu::time::zone::models::Full#Enum +icu::time::zone::windows::WindowsTimeZoneMapper#Struct +icu::time::zone::windows::WindowsTimeZoneMapper::new#FnInStruct +icu::time::zone::windows::WindowsTimeZoneMapperBorrowed#Struct +icu::time::zone::windows::WindowsTimeZoneMapperBorrowed::new#FnInStruct +icu::time::zone::windows::WindowsTimeZoneMapperBorrowed::windows_tz_to_bcp47_id#FnInStruct diff --git a/provider/data/timezone/Cargo.toml b/provider/data/time/Cargo.toml similarity index 90% rename from provider/data/timezone/Cargo.toml rename to provider/data/time/Cargo.toml index f3c37cd0182..055f502a571 100644 --- a/provider/data/timezone/Cargo.toml +++ b/provider/data/time/Cargo.toml @@ -3,8 +3,8 @@ # (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). [package] -name = "icu_timezone_data" -description = "Data for the icu_timezone crate" +name = "icu_time_data" +description = "Data for the icu_time crate" license = "Unicode-3.0" version.workspace = true diff --git a/provider/data/timezone/LICENSE b/provider/data/time/LICENSE similarity index 100% rename from provider/data/timezone/LICENSE rename to provider/data/time/LICENSE diff --git a/provider/data/timezone/README.md b/provider/data/time/README.md similarity index 67% rename from provider/data/timezone/README.md rename to provider/data/time/README.md index 615a62d543c..2b00d140fca 100644 --- a/provider/data/timezone/README.md +++ b/provider/data/time/README.md @@ -1,8 +1,8 @@ -# icu_timezone_data [![crates.io](https://img.shields.io/crates/v/icu_timezone_data)](https://crates.io/crates/icu_timezone_data) +# icu_time_data [![crates.io](https://img.shields.io/crates/v/icu_time_data)](https://crates.io/crates/icu_time_data) -Data for the `icu_timezone` crate +Data for the `icu_time` crate This data was generated with CLDR version 47.0.0-ALPHA1, ICU version icu4x/2024-12-16/76.x, and LSTM segmenter version v0.1.0. diff --git a/provider/data/timezone/build.rs b/provider/data/time/build.rs similarity index 100% rename from provider/data/timezone/build.rs rename to provider/data/time/build.rs diff --git a/provider/data/time/data/bcp47_to_iana_map_v1.rs.data b/provider/data/time/data/bcp47_to_iana_map_v1.rs.data new file mode 100644 index 00000000000..41fcce42851 --- /dev/null +++ b/provider/data/time/data/bcp47_to_iana_map_v1.rs.data @@ -0,0 +1,77 @@ +// @generated +/// Implement `DataProvider` on the given struct using the data +/// hardcoded in this file. This allows the struct to be used with +/// `icu`'s `_unstable` constructors. +/// +/// Using this implementation will embed the following data in the binary's data segment: +/// * 7622B[^1] for the singleton data struct +/// +/// [^1]: these numbers can be smaller in practice due to linker deduplication +#[doc(hidden)] +#[macro_export] +macro_rules! __impl_bcp47_to_iana_map_v1 { + ($ provider : ty) => { + #[clippy::msrv = "1.81"] + const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO; + #[clippy::msrv = "1.81"] + impl $provider { + #[doc(hidden)] + pub const SINGLETON_BCP47_TO_IANA_MAP_V1: &'static ::DataStruct = &icu::time::provider::names::Bcp47ToIanaMap { canonical_iana_ids: unsafe { zerovec::vecs::VarZeroVec16::from_bytes_unchecked(b"\xBD\x01\x0E\0\x18\0\"\x001\0A\0N\0Z\0i\0v\0\x86\0\x96\0\xAF\0\xC0\0\xD2\0\xE3\0\xF5\0\x05\x01\x15\x01&\x01D\x01]\x01x\x01\x92\x01\xA9\x01\xC3\x01\xDC\x01\xFA\x01\x11\x02*\x02D\x02]\x02n\x02{\x02\x8D\x02\xA2\x02\xB4\x02\xC4\x02\xD3\x02\xE3\x02\xF5\x02\x08\x03\x1B\x03/\x03>\x03N\x03[\x03d\x03s\x03\x83\x03\x8D\x03\x9C\x03\xAE\x03\xBA\x03\xC6\x03\xD6\x03\xE7\x03\xF7\x03\x02\x04\x10\x04\"\x043\x04@\x04Q\x04_\x04s\x04\x83\x04\x92\x04\xA3\x04\xB1\x04\xBF\x04\xD2\x04\xE4\x04\xF2\x04\x03\x05\x10\x05 \x05.\x05:\x05I\x05U\x05c\x05r\x05\x82\x05\x95\x05\xA6\x05\xB7\x05\xC6\x05\xD5\x05\xE4\x05\xF4\x05\x02\x06\x12\x06!\x062\x06B\x06V\x06k\x06y\x06\x8D\x06\xA1\x06\xAF\x06\xC1\x06\xD6\x06\xE6\x06\xF2\x06\x03\x07\x12\x07\x1F\x071\x07>\x07L\x07]\x07k\x07\x7F\x07\x8F\x07\x9C\x07\xA9\x07\xB4\x07\xC2\x07\xD4\x07\xE2\x07\xF5\x07\x05\x08\x13\x08\x1F\x08,\x089\x08H\x08W\x08h\x08x\x08\x8D\x08\x9B\x08\xAC\x08\xBD\x08\xCB\x08\xD7\x08\xE6\x08\xF3\x08\xFF\x08\x0E\t\x1B\t-\t<\tL\tX\th\tv\t\x85\t\x92\t\xA0\t\xAC\t\xBD\t\xC6\t\xD3\t\xE2\t\xEE\t\xFD\t\x0C\n\x18\n(\n<\nH\n\\\ni\nv\n}\n\x8B\n\x9D\n\xAC\n\xC1\n\xCE\n\xDB\n\xF1\n\x02\x0B\x0E\x0B\x1B\x0B)\x0B4\x0BB\x0BU\x0Bb\x0Bx\x0B\x87\x0B\x94\x0B\xA0\x0B\xAD\x0B\xBB\x0B\xC8\x0B\xDA\x0B\xE6\x0B\xF3\x0B\xFF\x0B\n\x0C\x1C\x0C'\x0C5\x0CB\x0CQ\x0C[\x0Ce\x0Cs\x0C\x7F\x0C\x8E\x0C\xA0\x0C\xAE\x0C\xBC\x0C\xC9\x0C\xD9\x0C\xE7\x0C\xF1\x0C\xFC\x0C\n\r\x14\r\x1F\r*\r5\rB\rP\rY\rg\rr\r\x82\r\x8E\r\x9A\r\xA9\r\xB6\r\xC4\r\xD5\r\xE0\r\xEE\r\xFF\r\x0C\x0E\x1B\x0E+\x0E>\x0EO\x0E]\x0Ej\x0Ew\x0E\x82\x0E\x8B\x0E\x9B\x0E\xA5\x0E\xB3\x0E\xC5\x0E\xD6\x0E\xE8\x0E\xF4\x0E\x04\x0F\x13\x0F\"\x0F3\x0FH\x0FV\x0Fh\x0Fy\x0F\x8C\x0F\x9A\x0F\xAB\x0F\xBB\x0F\xCA\x0F\xE0\x0F\xEF\x0F\xFB\x0F\x0C\x10\x19\x10(\x106\x10C\x10R\x10^\x10m\x10}\x10\x88\x10\x96\x10\xA3\x10\xAF\x10\xBF\x10\xCE\x10\xD9\x10\xE7\x10\xF3\x10\x02\x11\x13\x11!\x115\x11I\x11T\x11`\x11m\x11}\x11\x8D\x11\xA0\x11\xB0\x11\xBD\x11\xCC\x11\xD9\x11\xE9\x11\xF3\x11\x01\x12\x11\x12 \x120\x12<\x12F\x12Q\x12]\x12i\x12{\x12\x88\x12\x98\x12\xA5\x12\xB1\x12\xBE\x12\xCF\x12\xD8\x12\xE8\x12\xF6\x12\x04\x13\x16\x13 \x130\x13=\x13J\x13Z\x13j\x13|\x13\x88\x13\x95\x13\xA0\x13\xB3\x13\xBE\x13\xCD\x13\xDD\x13\xEB\x13\xFD\x13\r\x14 \x141\x14@\x14Q\x14]\x14m\x14\x7F\x14\x8A\x14\x99\x14\xAC\x14\xC1\x14\xCE\x14\xDC\x14\xEE\x14\xFD\x14\r\x15\x18\x15$\x151\x15@\x15I\x15V\x15b\x15s\x15\x82\x15\x97\x15\xA7\x15\xB2\x15\xC6\x15\xD1\x15\xE2\x15\xF0\x15\xFC\x15\n\x16\x16\x16-\x16>\x16K\x16Z\x16h\x16w\x16\x87\x16\xA3\x16\xB8\x16\xC6\x16\xDA\x16\xED\x16\x08\x17\x19\x174\x17F\x17a\x17\x7F\x17\x8F\x17\xA8\x17\xB4\x17\xC3\x17\xD0\x17\xE9\x17\0\x18\x1A\x185\x18D\x18K\x18T\x18]\x18f\x18o\x18x\x18\x81\x18\x8A\x18\x93\x18\x9C\x18\xA6\x18\xB0\x18\xBA\x18\xC4\x18\xCE\x18\xD7\x18\xE0\x18\xE9\x18\xF2\x18\xFB\x18\x04\x19\r\x19\x16\x19\x1F\x19)\x193\x19=\x19O\x19]\x19j\x19x\x19\x8A\x19\x99\x19\xA8\x19\xB9\x19\xC9\x19\xD6\x19\xE4\x19\xF0\x19\xF9\x19\x07\x1A\x1A\x1A'\x1AEurope/AndorraAsia/DubaiAsia/KabulAmerica/AntiguaAmerica/AnguillaEurope/TiraneAsia/YerevanAmerica/CuracaoAfrica/LuandaAntarctica/CaseyAntarctica/DavisAntarctica/DumontDUrvilleAntarctica/MawsonAntarctica/McMurdoAntarctica/PalmerAntarctica/RotheraAntarctica/SyowaAntarctica/TrollAntarctica/VostokAmerica/Argentina/Buenos_AiresAmerica/Argentina/CordobaAmerica/Argentina/CatamarcaAmerica/Argentina/La_RiojaAmerica/Argentina/JujuyAmerica/Argentina/San_LuisAmerica/Argentina/MendozaAmerica/Argentina/Rio_GallegosAmerica/Argentina/SaltaAmerica/Argentina/TucumanAmerica/Argentina/San_JuanAmerica/Argentina/UshuaiaPacific/Pago_PagoEurope/ViennaAustralia/AdelaideAustralia/Broken_HillAustralia/BrisbaneAustralia/DarwinAustralia/EuclaAustralia/HobartAustralia/LindemanAustralia/Lord_HoweAustralia/MelbourneAntarctica/MacquarieAustralia/PerthAustralia/SydneyAmerica/ArubaAsia/BakuEurope/SarajevoAmerica/BarbadosAsia/DhakaEurope/BrusselsAfrica/OuagadougouEurope/SofiaAsia/BahrainAfrica/BujumburaAfrica/Porto-NovoAtlantic/BermudaAsia/BruneiAmerica/La_PazAmerica/KralendijkAmerica/AraguainaAmerica/BelemAmerica/Boa_VistaAmerica/CuiabaAmerica/Campo_GrandeAmerica/EirunepeAmerica/NoronhaAmerica/FortalezaAmerica/ManausAmerica/MaceioAmerica/Porto_VelhoAmerica/Rio_BrancoAmerica/RecifeAmerica/Sao_PauloAmerica/BahiaAmerica/SantaremAmerica/NassauAsia/ThimphuAfrica/GaboroneEurope/MinskAmerica/BelizeAmerica/CrestonAmerica/EdmontonAmerica/Fort_NelsonAmerica/Glace_BayAmerica/Goose_BayAmerica/HalifaxAmerica/IqaluitAmerica/MonctonAmerica/ResoluteAmerica/ReginaAmerica/St_JohnsAmerica/TorontoAmerica/VancouverAmerica/WinnipegAmerica/Blanc-SablonAmerica/Cambridge_BayAmerica/DawsonAmerica/Dawson_CreekAmerica/Rankin_InletAmerica/InuvikAmerica/WhitehorseAmerica/Swift_CurrentAmerica/AtikokanIndian/CocosAfrica/LubumbashiAfrica/KinshasaAfrica/BanguiAfrica/BrazzavilleEurope/ZurichAfrica/AbidjanPacific/RarotongaPacific/EasterAmerica/Punta_ArenasAmerica/SantiagoAfrica/DoualaAsia/ShanghaiAsia/UrumqiAmerica/BogotaAmerica/Costa_RicaAmerica/HavanaAtlantic/Cape_VerdeIndian/ChristmasAsia/FamagustaAsia/NicosiaEurope/PragueEurope/BerlinEurope/BusingenAfrica/DjiboutiEurope/CopenhagenAmerica/DominicaAmerica/Santo_DomingoAfrica/AlgiersPacific/GalapagosAmerica/GuayaquilEurope/TallinnAfrica/CairoAfrica/El_AaiunAfrica/AsmaraAfrica/CeutaAtlantic/CanaryEurope/MadridAfrica/Addis_AbabaEurope/HelsinkiEurope/MariehamnPacific/FijiAtlantic/StanleyPacific/KosraePacific/PohnpeiPacific/ChuukAtlantic/FaroeEurope/ParisAfrica/LibrevilleAsia/GazaEurope/LondonAmerica/GrenadaAsia/TbilisiAmerica/CayenneEurope/GuernseyAfrica/AccraEurope/GibraltarAmerica/DanmarkshavnAmerica/NuukAmerica/ScoresbysundAmerica/ThuleAfrica/BanjulEtc/GMTAfrica/ConakryAmerica/GuadeloupeAmerica/MarigotAmerica/St_BarthelemyAfrica/MalaboEurope/AthensAtlantic/South_GeorgiaAmerica/GuatemalaPacific/GuamAfrica/BissauAmerica/GuyanaAsia/HebronAsia/Hong_KongAmerica/TegucigalpaEurope/ZagrebAmerica/Port-au-PrinceEurope/BudapestAsia/JayapuraAsia/JakartaAsia/MakassarAsia/PontianakEurope/DublinEurope/Isle_of_ManAsia/KolkataIndian/ChagosAsia/BaghdadAsia/TehranAtlantic/ReykjavikEurope/RomeAsia/JerusalemEurope/JerseyAmerica/JamaicaAsia/AmmanAsia/TokyoAfrica/NairobiAsia/BishkekAsia/Phnom_PenhPacific/KiritimatiPacific/KantonPacific/TarawaIndian/ComoroAmerica/St_KittsAsia/PyongyangAsia/SeoulAsia/KuwaitAmerica/CaymanAsia/AqtauAsia/AqtobeAsia/AlmatyAsia/AtyrauAsia/QostanayAsia/QyzylordaAsia/OralAsia/VientianeAsia/BeirutAmerica/St_LuciaEurope/VaduzAsia/ColomboAfrica/MonroviaAfrica/MaseruEurope/VilniusEurope/LuxembourgEurope/RigaAfrica/TripoliAfrica/CasablancaEurope/MonacoEurope/ChisinauEurope/PodgoricaIndian/AntananarivoPacific/KwajaleinPacific/MajuroEurope/SkopjeAfrica/BamakoAsia/YangonAsia/HovdAsia/UlaanbaatarAsia/MacauPacific/SaipanAmerica/MartiniqueAfrica/NouakchottAmerica/MontserratEurope/MaltaIndian/MauritiusIndian/MaldivesAfrica/BlantyreAmerica/ChihuahuaAmerica/Ciudad_JuarezAmerica/CancunAmerica/HermosilloAmerica/MatamorosAmerica/Mexico_CityAmerica/MeridaAmerica/MonterreyAmerica/MazatlanAmerica/OjinagaAmerica/Bahia_BanderasAmerica/TijuanaAsia/KuchingAsia/Kuala_LumpurAfrica/MaputoAfrica/WindhoekPacific/NoumeaAfrica/NiameyPacific/NorfolkAfrica/LagosAmerica/ManaguaEurope/AmsterdamEurope/OsloAsia/KathmanduPacific/NauruPacific/NiuePacific/AucklandPacific/ChathamAsia/MuscatAmerica/PanamaAmerica/LimaPacific/GambierPacific/MarquesasPacific/TahitiPacific/Port_MoresbyPacific/BougainvilleAsia/ManilaAsia/KarachiEurope/WarsawAmerica/MiquelonPacific/PitcairnAmerica/Puerto_RicoAtlantic/MadeiraEurope/LisbonAtlantic/AzoresPacific/PalauAmerica/AsuncionAsia/QatarIndian/ReunionEurope/BucharestEurope/BelgradeEurope/AstrakhanAsia/BarnaulAsia/ChitaAsia/AnadyrAsia/MagadanAsia/IrkutskEurope/KaliningradAsia/KhandygaAsia/KrasnoyarskEurope/SamaraEurope/KirovEurope/MoscowAsia/NovokuznetskAsia/OmskAsia/NovosibirskAsia/KamchatkaEurope/SaratovAsia/SrednekolymskAsia/TomskEurope/UlyanovskAsia/Ust-NeraAsia/SakhalinEurope/VolgogradAsia/VladivostokAsia/YekaterinburgAsia/YakutskAfrica/KigaliAsia/RiyadhPacific/GuadalcanalIndian/MaheAfrica/KhartoumEurope/StockholmAsia/SingaporeAtlantic/St_HelenaEurope/LjubljanaArctic/LongyearbyenEurope/BratislavaAfrica/FreetownEurope/San_MarinoAfrica/DakarAfrica/MogadishuAmerica/ParamariboAfrica/JubaAfrica/Sao_TomeAmerica/El_SalvadorAmerica/Lower_PrincesAsia/DamascusAfrica/MbabaneAmerica/Grand_TurkAfrica/NdjamenaIndian/KerguelenAfrica/LomeAsia/BangkokAsia/DushanbePacific/FakaofoAsia/DiliAsia/AshgabatAfrica/TunisPacific/TongatapuEurope/IstanbulAmerica/Port_of_SpainPacific/FunafutiAsia/TaipeiAfrica/Dar_es_SalaamEurope/KyivEurope/SimferopolAfrica/KampalaPacific/WakePacific/MidwayAmerica/AdakAmerica/Indiana/MarengoAmerica/AnchorageAmerica/BoiseAmerica/ChicagoAmerica/DenverAmerica/DetroitPacific/HonoluluAmerica/Indiana/IndianapolisAmerica/Indiana/VevayAmerica/JuneauAmerica/Indiana/KnoxAmerica/Los_AngelesAmerica/Kentucky/LouisvilleAmerica/MenomineeAmerica/Kentucky/MonticelloAmerica/MetlakatlaAmerica/North_Dakota/CenterAmerica/North_Dakota/New_SalemAmerica/New_YorkAmerica/Indiana/VincennesAmerica/NomeAmerica/PhoenixAmerica/SitkaAmerica/Indiana/Tell_CityAmerica/Indiana/WinamacAmerica/Indiana/PetersburgAmerica/North_Dakota/BeulahAmerica/YakutatEtc/UTCEtc/GMT-1Etc/GMT-2Etc/GMT-3Etc/GMT-4Etc/GMT-5Etc/GMT-6Etc/GMT-7Etc/GMT-8Etc/GMT-9Etc/GMT-10Etc/GMT-11Etc/GMT-12Etc/GMT-13Etc/GMT-14Etc/GMT+1Etc/GMT+2Etc/GMT+3Etc/GMT+4Etc/GMT+5Etc/GMT+6Etc/GMT+7Etc/GMT+8Etc/GMT+9Etc/GMT+10Etc/GMT+11Etc/GMT+12America/MontevideoAsia/SamarkandAsia/TashkentEurope/VaticanAmerica/St_VincentAmerica/CaracasAmerica/TortolaAmerica/St_ThomasAsia/Ho_Chi_MinhPacific/EfatePacific/WallisPacific/ApiaAsia/AdenIndian/MayotteAfrica/JohannesburgAfrica/LusakaAfrica/Harare") } }; + #[doc(hidden)] + pub const SINGLETON_BCP47_TO_IANA_MAP_V1_CHECKSUM: u64 = 1359598211242524719u64; + } + #[clippy::msrv = "1.81"] + impl icu_provider::DataProvider for $provider { + fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> { + if req.id.locale.is_default() { + Ok(icu_provider::DataResponse { payload: icu_provider::DataPayload::from_static_ref(Self::SINGLETON_BCP47_TO_IANA_MAP_V1), metadata: icu_provider::DataResponseMetadata::default().with_checksum(Self::SINGLETON_BCP47_TO_IANA_MAP_V1_CHECKSUM) }) + } else { + Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) + } + } + } + }; + ($ provider : ty , ITER) => { + __impl_bcp47_to_iana_map_v1!($provider); + #[clippy::msrv = "1.81"] + impl icu_provider::IterableDataProvider for $provider { + fn iter_ids(&self) -> Result>, icu_provider::DataError> { + Ok([Default::default()].into_iter().collect()) + } + } + }; + ($ provider : ty , DRY) => { + __impl_bcp47_to_iana_map_v1!($provider); + #[clippy::msrv = "1.81"] + impl icu_provider::DryDataProvider for $provider { + fn dry_load(&self, req: icu_provider::DataRequest) -> Result { + if req.id.locale.is_default() { + Ok(icu_provider::DataResponseMetadata::default().with_checksum(Self::SINGLETON_BCP47_TO_IANA_MAP_V1_CHECKSUM)) + } else { + Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) + } + } + } + }; + ($ provider : ty , DRY , ITER) => { + __impl_bcp47_to_iana_map_v1!($provider); + #[clippy::msrv = "1.81"] + impl icu_provider::DryDataProvider for $provider { + fn dry_load(&self, req: icu_provider::DataRequest) -> Result { + if req.id.locale.is_default() { + Ok(icu_provider::DataResponseMetadata::default().with_checksum(Self::SINGLETON_BCP47_TO_IANA_MAP_V1_CHECKSUM)) + } else { + Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) + } + } + } + #[clippy::msrv = "1.81"] + impl icu_provider::IterableDataProvider for $provider { + fn iter_ids(&self) -> Result>, icu_provider::DataError> { + Ok([Default::default()].into_iter().collect()) + } + } + }; +} +#[doc(inline)] +pub use __impl_bcp47_to_iana_map_v1 as impl_bcp47_to_iana_map_v1; diff --git a/provider/data/time/data/iana_to_bcp47_map_v3.rs.data b/provider/data/time/data/iana_to_bcp47_map_v3.rs.data new file mode 100644 index 00000000000..149fc53bb71 --- /dev/null +++ b/provider/data/time/data/iana_to_bcp47_map_v3.rs.data @@ -0,0 +1,77 @@ +// @generated +/// Implement `DataProvider` on the given struct using the data +/// hardcoded in this file. This allows the struct to be used with +/// `icu`'s `_unstable` constructors. +/// +/// Using this implementation will embed the following data in the binary's data segment: +/// * 9543B[^1] for the singleton data struct +/// +/// [^1]: these numbers can be smaller in practice due to linker deduplication +#[doc(hidden)] +#[macro_export] +macro_rules! __impl_iana_to_bcp47_map_v3 { + ($ provider : ty) => { + #[clippy::msrv = "1.81"] + const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO; + #[clippy::msrv = "1.81"] + impl $provider { + #[doc(hidden)] + pub const SINGLETON_IANA_TO_BCP47_MAP_V3: &'static ::DataStruct = &icu::time::provider::names::IanaToBcp47Map { map: zerotrie::ZeroAsciiIgnoreCaseTrie { store: unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"\xE1i_ABCEIMPU\x01\x10\x10\x11\x14\x14\x14\x16TW~\x13C\xB5\xD8\x8D\xE1qCEGHIJKLMNPRSTUWZ\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\x01\x141Zi\x80\x8F\x99\x9F\xAF\xC2\xE2\xEB\xF5\xFC\x11\x1C\xC3ESu\x03\nT\x90TT6CDT\x95`ba\x91`\xC4EgiS\x03\x08\x0CT\x92Hypt\x92\0re\x92hT\x94\"5EDT\x95~\xC3BMr\t\x1A\x92$-Eire\x92$T\x92<\xC3+-0\x03\x060\x92<0\x92<\x92C\x91XT8PDT\x95pO\xC2CK\x02\x95J\x93\x14ingapore\x95\x0Eurkey\x95D\xC3CnT\x03\x0CT\x96\x12iversal\x96\x12C\x96\x12\xC2-E\x04SU\x94dT\x94>ulu\x96\x12\xE1gfmnrstu\x02\t\t\t\r\x0E*+\xAC\xBF\x83\trica/\xE1rABCDEFGHJKLMNOPSTW\0\0\0\0\0\0\0\0\0\x01\x01\x01\x01\x01\x01\x01\x015v\x99\xC1\xCA\xD3\xDC\xE3\xF7\x1CP\x85\xAC\xB8\xC3\xCC\xE6\xC5bcdls\x07\x0C\x17\x1Eidjan\x91Mcra\x92/dis_Ababa\x92\rgiers\x91ym\xC2ae\x04ra\x92\x05ra\x92\x04\xC5ailru\x15\x1B#.\xC2mn\x05ako\x93O\xC2gj\x04ui\x91Gul\x92;ssau\x92Qantyre\x93gazzaville\x91Ijumbura\x90]\xC3aeo\x11\x16\xC2is\x04ro\x92\x01ablanca\x93?uta\x92\x07nakry\x92?\xC3ajo\x14\x1C\xC2kr\x04ar\x95\x1D_es_Salaam\x95Mibouti\x91quala\x91Wl_Aaiun\x92\x03reetown\x95\x19aborone\x91\rarare\x96i\xC2ou\x0Channesburg\x96eba\x95#\xC3ahi\x07\x0Fmpala\x95Sartoum\x95\x0B\xC2gn\x05ali\x95\x03shasa\x91E\xC4aiou\x05\x0F\x13gos\x94\x0Fbreville\x92!me\x955\xC3abs\x05\x0Enda\x90\x01umbashi\x91Caka\x96g\xC3abo\x15\x1C\xC3lps\x05\nabo\x92Guto\x94\x05eru\x935abane\x95-\xC2gn\x08adishu\x95\x1Frovia\x933\xC4adio\x07\x0F\x15irobi\x93\x03jamena\x951amey\x94\x0Buakchott\x93]uagadougou\x90Worto-Novo\x90_ao_Tome\x95%\xC3iru\x08\x0Fmbuktu\x93Nipoli\x93=nis\x95Aindhoek\x94\x07erica/\xE1vABCDEFGHIJKLMNOPRSTVWY\0\x01\x01\x02\x02\x02\x02\x02\x03\x03\x03\x03\x04\x04\x04\x05\x05\x06\x06\x06\x06\xE5D\xE7 Ki\xC4\xE1Zr\xAA\xDF\x85\xDF\xE7Z\xA3@z\x8D\xA3\xC5dnrst\x04\x1D\xC5\xCDak\x95Y\xC3cgt\x08\x0Ehorage\x95]uilla\x89igua\x87\xC3agu\x08\x9Eguaina\x90ientina/\xC9BCJLMRSTU\r17@HUmuuenos_Aires\x90\x17\xC2ao\ttamarca\x90\x1B\xC2mr\rodRivadavia\x90\x1Adoba\x90\x19ujuy\x90\x1Fa_Rioja\x90\x1Dendoza\x90#io_Gallegos\x90%a\xC2ln\x04ta\x90'_\xC2JL\x05uan\x90+uis\x90!ucuman\x90)shuaia\x90-ba\x90Kuncion\x94E\xC2ik\x07kokan\x91?a\x95X\xC5aelou\x1A&2I\xC2hr\x0Fia\x91\x05_Banderas\x93}bados\x90Ql\xC2ei\x03m\x90kze\x91\x11anc-Sablon\x91/\xC3agi\x08\r_Vista\x90mota\x91]se\x95_enos_Aires\x90\x16\xC6ahioruCTa\x82\x89\xC5mnrty\x19\x1E$,\xC2bp\x0Bridge_Bay\x911o_Grande\x90qcun\x93macas\x96Samarca\x90\x1A\xC2em\x05nne\x92+an\x93\x19i\xC2ch\x05ago\x95auahua\x93iudad_Juarez\x93k\xC2rs\x14\xC2ad\x0Bl_Harbour\x91>oba\x90\x18ta_Rica\x91_eston\x91\x13\xC2ir\x05aba\x90oacao\x8F\xC3aeo\x1C+\xC2nw\x0Bmarkshavn\x923son\x913_Creek\x915\xC2nt\x05ver\x95croit\x95eminica\x91u\xC4diln\x08\x10\x1Bmonton\x91\x15runepe\x90s_Salvador\x95'senada\x93~ort\xC2_a\x11\xC2NW\x07elson\x91\x17ayne\x95hleza\x90w\xC4loru\t\x1B.ace_Bay\x91\x19\xC2do\x06thab\x924se_Bay\x91\x1B\xC2ae\tnd_Turk\x95/nada\x92'\xC2ay\x1C\xC3dty\x08\x0Feloupe\x92Aemala\x92Maquil\x91}ana\x92S\xC2ae\x0F\xC2lv\x06ifax\x91\x1Dana\x91armosillo\x93o\xC2nqn\xC2dueiana\xC2/pW\xC7IKMPTVW\r\x12\x1A%/Andianapolis\x95inox\x95oarengo\x95[etersburg\x96\rell_City\x96\t\xC2ei\x05vay\x95kncennes\x96\x01inamac\x96\x0Bolis\x95hvik\x919aluit\x91\x1F\xC2au\x07maica\x92}\xC2jn\x04uy\x90\x1Eeau\x95m\xC3enr!(ntucky/\xC2LM\x0Bouisville\x95sonticello\x95wox_IN\x95nalendijk\x90g\xC3aio\x06\n_Paz\x90ema\x94%\xC3suw\n\x13_Angeles\x95qisville\x95rer_Princes\x95)\xC4aeio;ks\xC5cnrtz\x05\x11\"*eio\x90{a\xC2gu\x04ua\x94\x11s\x90y\xC2it\x05got\x92Cinique\x93[amoros\x93qatlan\x93y\xC4nrtx\x10\x15\x1E\xC2do\x05oza\x90\"minee\x95uida\x93ulakatla\x95yico_City\x93squelon\x947n\xC2ct\x05ton\x91!\xC3ers\x0F\x14\xC2rv\x05rey\x93wideo\x96Ieal\x91(errat\x93_\xC5aeiou\x06\x0E\x15Lssau\x91\tw_York\x95\x7Fpigon\x91(\xC2mr\x03e\x96\x03\xC2ot\x05nha\x90uh_Dakota/\xC3BCN\x07\x0Eeulah\x96\x0Fenter\x95{ew_Salem\x95}uk\x925jinaga\x93{\xC4ahou\x1E%R\xC2nr\x11\xC2ag\x04ma\x94#nirtung\x91\x1Eamaribo\x95!oenix\x96\x05rt\xC3-_o\x0B\x15au-Prince\x92]of_Spain\x95G_\xC2AV\x05cre\x90~elho\x90}\xC2en\nrto_Rico\x94;ta_Arenas\x91S\xC4aeio\x190:\xC2in\nny_River\x91,kin_Inlet\x917\xC3cgs\x05\nife\x91\x01ina\x91%olute\x91#o_Branco\x90\x7Fsario\x90\x18\xC6achitw2>FK\x84\xC2no&t\xC3aio\x10\x15\xC2_r\x08Isabel\x93~em\x91\x07ago\x91U_Domingo\x91w_Paulo\x91\x03oresbysund\x927iprock\x95btka\x96\x07_\xC6BJKLTV\x0B\x11\x17\x1D$arthelemy\x92Eohns\x91'itts\x93\x11ucia\x93-homas\x96Wincent\x96Qift_Current\x91=\xC4ehio\x0B\x1C#gucigalpa\x92Yu\xC2ln\x03e\x929der_Bay\x91(juana\x93\x7Fr\xC2ot\x05nto\x91)ola\x96U\xC2ai\tncouver\x91+rgin\x96V\xC2hi\nitehorse\x91;nnipeg\x91-\xC2ae\x07kutat\x96\x11llowknife\x91\x14tarctica/\xC8CDMPRSTV\x06\x1D9@H[aasey\x90\x03\xC2au\x05vis\x90\x05montDUrville\x90\x07\xC2ac\x11\xC2cw\x08quarie\x90Eson\x90\tMurdo\x90\x0Balmer\x90\rothera\x90\x0F\xC2oy\nuth_Pole\x94\x1Cowa\x90\x11roll\x90\x13ostok\x90\x15ctic/Longyearbyen\x95\x15ia/\xE1uABCDFGHIJKMNOPQRSTUVY\0\0\0\0\0\0\x01\x01\x01\x01\x01\x02\x02\x02\x02\x02\x02\x03\x03\x03G\x87\xC1\xEF\xF9\xFE+>\\\xCE\xFB\x1D)Kgx\xBF\tBZ\xC7dlmnqst\x04\n\x0F\x15!3en\x96amaty\x93\x1Fman\x92\x7Fadyr\x94Ut\xC2ao\x03u\x93\x1Bbe\x93\x1Dh\xC2gk\x06abat\x95?habad\x95>yrau\x93!\xC4aeir%+2\xC5ghknr\x06\x0C\x0F\x15hdad\x92qrain\x90[u\x90Mgkok\x957naul\x94Qirut\x93+shkek\x93\x05unei\x90c\xC3aho\x08-lcutta\x92l\xC3iou\x04\x17ta\x94S\xC2in\x08balsan\x93Tgqing\x91Xngking\x91Xlombo\x931\xC4ahiu\x0F\x14\x18\xC2cm\x04ca\x90Rascus\x95+aka\x90Sli\x95=\xC2bs\x03ai\x83hanbe\x959amagusta\x91gaza\x92#\xC3aeo\x06\x0Crbin\x91Xbron\x92U\xC3_nv\n\x12Chi_Minh\x96Yg_Kong\x92Wd\x93S\xC2rs\x07kutsk\x94Ytanbul\x95D\xC2ae\x11\xC2ky\x06arta\x92capura\x92arusalem\x92y\xC5ahoru2:AL\xC5bmrst\x03\x0B\x11\x17ul\x85chatka\x94machi\x943hgar\x91Z\xC2hm\x07mandu\x94\x17andu\x94\x16andyga\x94]lkata\x92masnoyarsk\x94_\xC3acw\x0B\x11la_Lumpur\x94\x03hing\x94\x01ait\x93\x17\xC2au#\xC4cgkn\t\x0F\x16a\xC2ou\x02\x93V\x93Wadan\x94Wassar\x92eila\x941scat\x94!\xC2io\x07cosia\x91ivo\xC2ks\tuznetsk\x94gibirsk\x94k\xC2mr\x04sk\x94ial\x93'\xC3hoy\n\x13nom_Penh\x93\x07ntianak\x92gongyang\x93\x13\xC3aoy\x05\rtar\x94Gstanay\x93#zylorda\x93%\xC2ai\x07ngoon\x93Pyadh\x95\x05\xC5aehir\x1A\x1F'0\xC3ikm\x05\x0Cgon\x96Xhalin\x94yarkand\x96Koul\x93\x15anghai\x91Yngapore\x95\x0Fednekolymsk\x94q\xC5abeho\x10\x17'4\xC2is\x05pei\x95Khkent\x96Milisi\x92)\xC2hl\x05ran\x92s_Aviv\x92xim\xC2bp\x03u\x91\nhu\x91\x0B\xC2km\x04yo\x93\x01sk\x94s\xC4jlrs\r#)ung_Pandang\x92da\xC2an\tnbaatar\x93U_Bator\x93Tumqi\x91[t-Nera\x94w\xC2il\tentiane\x93)adivostok\x94}\xC2ae\x0F\xC2kn\x06utsk\x95\x01gon\x93Q\xC2kr\x0Caterinburg\x94\x7Fevan\x8Dlantic/\xC8ABCFJMRS\x07\x0F\"0:BLzores\x94Aermuda\x90aa\xC2np\x05ary\x92\te_Verde\x91ca\xC2er\x05roe\x92\x1Coe\x92\x1Dan_Mayen\x95\x14adeira\x94=eykjavik\x92u\xC2ot\ruth_Georgia\x92K\xC2_a\x08Helena\x95\x11nley\x92\x15stralia/\xD0ABCDEHLMNPQSTVWY\x0F%7>DKeo{\x81\x8C\x9B\xA4\xAD\xB2\xC2Cd\x03T\x90Helaide\x903r\xC2io\x07sbane\x907ken_Hill\x905\xC2au\x08nberra\x90Hrrie\x90Mao\xC2lr\x10\xC2ae\x05ska\x95\\utian\x95Xizona\x96\x04entral\x95`ast\xC2-e\tIndiana\x95hrn\x95~awaii\x95fndiana-Starke\x95n\xC2io\x08chigan\x95duntain\x95bacific\x95p-New\x95pamoa\x90.") } }, bcp47_ids: unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"adalv\0\0\0aedxb\0\0\0afkbl\0\0\0aganu\0\0\0aiaxa\0\0\0altia\0\0\0amevn\0\0\0ancur\0\0\0aolad\0\0\0aqcas\0\0\0aqdav\0\0\0aqddu\0\0\0aqmaw\0\0\0aqmcm\0\0\0aqplm\0\0\0aqrot\0\0\0aqsyw\0\0\0aqtrl\0\0\0aqvos\0\0\0arbue\0\0\0arcor\0\0\0arctc\0\0\0arirj\0\0\0arjuj\0\0\0arluq\0\0\0armdz\0\0\0arrgl\0\0\0arsla\0\0\0artuc\0\0\0aruaq\0\0\0arush\0\0\0asppg\0\0\0atvie\0\0\0auadl\0\0\0aubhq\0\0\0aubne\0\0\0audrw\0\0\0aueuc\0\0\0auhba\0\0\0auldc\0\0\0auldh\0\0\0aumel\0\0\0aumqi\0\0\0auper\0\0\0ausyd\0\0\0awaua\0\0\0azbak\0\0\0basjj\0\0\0bbbgi\0\0\0bddac\0\0\0bebru\0\0\0bfoua\0\0\0bgsof\0\0\0bhbah\0\0\0bibjm\0\0\0bjptn\0\0\0bmbda\0\0\0bnbwn\0\0\0bolpb\0\0\0bqkra\0\0\0braux\0\0\0brbel\0\0\0brbvb\0\0\0brcgb\0\0\0brcgr\0\0\0brern\0\0\0brfen\0\0\0brfor\0\0\0brmao\0\0\0brmcz\0\0\0brpvh\0\0\0brrbr\0\0\0brrec\0\0\0brsao\0\0\0brssa\0\0\0brstm\0\0\0bsnas\0\0\0btthi\0\0\0bwgbe\0\0\0bymsq\0\0\0bzbze\0\0\0cacfq\0\0\0caedm\0\0\0cafne\0\0\0caglb\0\0\0cagoo\0\0\0cahal\0\0\0caiql\0\0\0camon\0\0\0careb\0\0\0careg\0\0\0casjf\0\0\0cator\0\0\0cavan\0\0\0cawnp\0\0\0caybx\0\0\0caycb\0\0\0cayda\0\0\0caydq\0\0\0cayek\0\0\0cayev\0\0\0cayxy\0\0\0cayyn\0\0\0cayzs\0\0\0cccck\0\0\0cdfbm\0\0\0cdfih\0\0\0cfbgf\0\0\0cgbzv\0\0\0chzrh\0\0\0ciabj\0\0\0ckrar\0\0\0clipc\0\0\0clpuq\0\0\0clscl\0\0\0cmdla\0\0\0cnsha\0\0\0cnurc\0\0\0cobog\0\0\0crsjo\0\0\0cuhav\0\0\0cvrai\0\0\0cxxch\0\0\0cyfmg\0\0\0cynic\0\0\0czprg\0\0\0deber\0\0\0debsngn\0djjib\0\0\0dkcph\0\0\0dmdom\0\0\0dosdq\0\0\0dzalg\0\0\0ecgps\0\0\0ecgye\0\0\0eetll\0\0\0egcai\0\0\0eheai\0\0\0erasm\0\0\0esceu\0\0\0eslpa\0\0\0esmad\0\0\0etadd\0\0\0fihel\0\0\0fimhq\0\0\0fjsuv\0\0\0fkpsy\0\0\0fmksa\0\0\0fmpni\0\0\0fmtkk\0\0\0fotho\0\0\0frpar\0\0\0galbv\0\0\0gazastrpgblon\0\0\0gdgnd\0\0\0getbs\0\0\0gfcay\0\0\0gggci\0\0\0ghacc\0\0\0gigib\0\0\0gldkshvnglgoh\0\0\0globy\0\0\0glthu\0\0\0gmbjl\0\0\0gmt\0\0\0\0\0gncky\0\0\0gpbbr\0\0\0gpmsb\0\0\0gpsbh\0\0\0gqssg\0\0\0grath\0\0\0gsgrv\0\0\0gtgua\0\0\0gugum\0\0\0gwoxb\0\0\0gygeo\0\0\0hebron\0\0hkhkg\0\0\0hntgu\0\0\0hrzag\0\0\0htpap\0\0\0hubud\0\0\0iddjj\0\0\0idjkt\0\0\0idmak\0\0\0idpnk\0\0\0iedub\0\0\0imdgs\0\0\0inccu\0\0\0iodga\0\0\0iqbgw\0\0\0irthr\0\0\0isrey\0\0\0itrom\0\0\0jeruslm\0jesth\0\0\0jmkin\0\0\0joamm\0\0\0jptyo\0\0\0kenbo\0\0\0kgfru\0\0\0khpnh\0\0\0kicxi\0\0\0kipho\0\0\0kitrw\0\0\0kmyva\0\0\0knbas\0\0\0kpfnj\0\0\0krsel\0\0\0kwkwi\0\0\0kygec\0\0\0kzaau\0\0\0kzakx\0\0\0kzala\0\0\0kzguw\0\0\0kzksn\0\0\0kzkzo\0\0\0kzura\0\0\0lavte\0\0\0lbbey\0\0\0lccas\0\0\0livdz\0\0\0lkcmb\0\0\0lrmlw\0\0\0lsmsu\0\0\0ltvno\0\0\0lulux\0\0\0lvrix\0\0\0lytip\0\0\0macas\0\0\0mcmon\0\0\0mdkiv\0\0\0metgd\0\0\0mgtnr\0\0\0mhkwa\0\0\0mhmaj\0\0\0mkskp\0\0\0mlbko\0\0\0mmrgn\0\0\0mnhvd\0\0\0mnuln\0\0\0momfm\0\0\0mpspn\0\0\0mqfdf\0\0\0mrnkc\0\0\0msmni\0\0\0mtmla\0\0\0muplu\0\0\0mvmle\0\0\0mwblz\0\0\0mxchi\0\0\0mxcjs\0\0\0mxcun\0\0\0mxhmo\0\0\0mxmam\0\0\0mxmex\0\0\0mxmid\0\0\0mxmty\0\0\0mxmzt\0\0\0mxoji\0\0\0mxpvr\0\0\0mxtij\0\0\0mykch\0\0\0mykul\0\0\0mzmpm\0\0\0nawdh\0\0\0ncnou\0\0\0nenim\0\0\0nfnlk\0\0\0nglos\0\0\0nimga\0\0\0nlams\0\0\0noosl\0\0\0npktm\0\0\0nrinu\0\0\0nuiue\0\0\0nzakl\0\0\0nzcht\0\0\0ommct\0\0\0papty\0\0\0pelim\0\0\0pfgmr\0\0\0pfnhv\0\0\0pfppt\0\0\0pgpom\0\0\0pgraw\0\0\0phmnl\0\0\0pkkhi\0\0\0plwaw\0\0\0pmmqc\0\0\0pnpcn\0\0\0prsju\0\0\0ptfnc\0\0\0ptlis\0\0\0ptpdl\0\0\0pwror\0\0\0pyasu\0\0\0qadoh\0\0\0rereu\0\0\0robuh\0\0\0rsbeg\0\0\0ruasf\0\0\0rubax\0\0\0ruchita\0rudyr\0\0\0rugdx\0\0\0ruikt\0\0\0rukgd\0\0\0rukhndg\0rukra\0\0\0rukuf\0\0\0rukvx\0\0\0rumow\0\0\0runoz\0\0\0ruoms\0\0\0ruovb\0\0\0rupkc\0\0\0rurtw\0\0\0rusred\0\0rutof\0\0\0ruuly\0\0\0ruunera\0ruuus\0\0\0ruvog\0\0\0ruvvo\0\0\0ruyek\0\0\0ruyks\0\0\0rwkgl\0\0\0saruh\0\0\0sbhir\0\0\0scmaw\0\0\0sdkrt\0\0\0sesto\0\0\0sgsin\0\0\0shshn\0\0\0silju\0\0\0sjlyr\0\0\0skbts\0\0\0slfna\0\0\0smsai\0\0\0sndkr\0\0\0somgq\0\0\0srpbm\0\0\0ssjub\0\0\0sttms\0\0\0svsal\0\0\0sxphi\0\0\0sydam\0\0\0szqmn\0\0\0tcgdt\0\0\0tdndj\0\0\0tfpfr\0\0\0tglfw\0\0\0thbkk\0\0\0tjdyu\0\0\0tkfko\0\0\0tldil\0\0\0tmasb\0\0\0tntun\0\0\0totbu\0\0\0trist\0\0\0ttpos\0\0\0tvfun\0\0\0twtpe\0\0\0tzdar\0\0\0uaiev\0\0\0uasip\0\0\0ugkla\0\0\0umawk\0\0\0ummdy\0\0\0usadk\0\0\0usaeg\0\0\0usanc\0\0\0usboi\0\0\0uschi\0\0\0usden\0\0\0usdet\0\0\0ushnl\0\0\0usind\0\0\0usinvev\0usjnu\0\0\0usknx\0\0\0uslax\0\0\0uslui\0\0\0usmnm\0\0\0usmoc\0\0\0usmtm\0\0\0usndcnt\0usndnsl\0usnyc\0\0\0usoea\0\0\0usome\0\0\0usphx\0\0\0ussit\0\0\0ustel\0\0\0uswlz\0\0\0uswsq\0\0\0usxul\0\0\0usyak\0\0\0utc\0\0\0\0\0utce01\0\0utce02\0\0utce03\0\0utce04\0\0utce05\0\0utce06\0\0utce07\0\0utce08\0\0utce09\0\0utce10\0\0utce11\0\0utce12\0\0utce13\0\0utce14\0\0utcw01\0\0utcw02\0\0utcw03\0\0utcw04\0\0utcw05\0\0utcw06\0\0utcw07\0\0utcw08\0\0utcw09\0\0utcw10\0\0utcw11\0\0utcw12\0\0uymvd\0\0\0uzskd\0\0\0uztas\0\0\0vavat\0\0\0vcsvd\0\0\0veccs\0\0\0vgtov\0\0\0vistt\0\0\0vnsgn\0\0\0vuvli\0\0\0wfmau\0\0\0wsapw\0\0\0yeade\0\0\0ytmam\0\0\0zajnb\0\0\0zmlun\0\0\0zwhre\0\0\0") } }; + #[doc(hidden)] + pub const SINGLETON_IANA_TO_BCP47_MAP_V3_CHECKSUM: u64 = 1359598211242524719u64; + } + #[clippy::msrv = "1.81"] + impl icu_provider::DataProvider for $provider { + fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> { + if req.id.locale.is_default() { + Ok(icu_provider::DataResponse { payload: icu_provider::DataPayload::from_static_ref(Self::SINGLETON_IANA_TO_BCP47_MAP_V3), metadata: icu_provider::DataResponseMetadata::default().with_checksum(Self::SINGLETON_IANA_TO_BCP47_MAP_V3_CHECKSUM) }) + } else { + Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) + } + } + } + }; + ($ provider : ty , ITER) => { + __impl_iana_to_bcp47_map_v3!($provider); + #[clippy::msrv = "1.81"] + impl icu_provider::IterableDataProvider for $provider { + fn iter_ids(&self) -> Result>, icu_provider::DataError> { + Ok([Default::default()].into_iter().collect()) + } + } + }; + ($ provider : ty , DRY) => { + __impl_iana_to_bcp47_map_v3!($provider); + #[clippy::msrv = "1.81"] + impl icu_provider::DryDataProvider for $provider { + fn dry_load(&self, req: icu_provider::DataRequest) -> Result { + if req.id.locale.is_default() { + Ok(icu_provider::DataResponseMetadata::default().with_checksum(Self::SINGLETON_IANA_TO_BCP47_MAP_V3_CHECKSUM)) + } else { + Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) + } + } + } + }; + ($ provider : ty , DRY , ITER) => { + __impl_iana_to_bcp47_map_v3!($provider); + #[clippy::msrv = "1.81"] + impl icu_provider::DryDataProvider for $provider { + fn dry_load(&self, req: icu_provider::DataRequest) -> Result { + if req.id.locale.is_default() { + Ok(icu_provider::DataResponseMetadata::default().with_checksum(Self::SINGLETON_IANA_TO_BCP47_MAP_V3_CHECKSUM)) + } else { + Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) + } + } + } + #[clippy::msrv = "1.81"] + impl icu_provider::IterableDataProvider for $provider { + fn iter_ids(&self) -> Result>, icu_provider::DataError> { + Ok([Default::default()].into_iter().collect()) + } + } + }; +} +#[doc(inline)] +pub use __impl_iana_to_bcp47_map_v3 as impl_iana_to_bcp47_map_v3; diff --git a/provider/data/timezone/data/mod.rs b/provider/data/time/data/mod.rs similarity index 100% rename from provider/data/timezone/data/mod.rs rename to provider/data/time/data/mod.rs diff --git a/provider/data/time/data/windows_zones_to_bcp47_map_v1.rs.data b/provider/data/time/data/windows_zones_to_bcp47_map_v1.rs.data new file mode 100644 index 00000000000..ed27d0d4f9e --- /dev/null +++ b/provider/data/time/data/windows_zones_to_bcp47_map_v1.rs.data @@ -0,0 +1,75 @@ +// @generated +/// Implement `DataProvider` on the given struct using the data +/// hardcoded in this file. This allows the struct to be used with +/// `icu`'s `_unstable` constructors. +/// +/// Using this implementation will embed the following data in the binary's data segment: +/// * 8634B[^1] for the singleton data struct +/// +/// [^1]: these numbers can be smaller in practice due to linker deduplication +#[doc(hidden)] +#[macro_export] +macro_rules! __impl_windows_zones_to_bcp47_map_v1 { + ($ provider : ty) => { + #[clippy::msrv = "1.81"] + const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO; + #[clippy::msrv = "1.81"] + impl $provider { + #[doc(hidden)] + pub const SINGLETON_WINDOWS_ZONES_TO_BCP47_MAP_V1: &'static ::DataStruct = &icu::time::provider::windows::WindowsZonesToBcp47Map { map: zerotrie::ZeroTrieSimpleAscii { store: unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"\xE1xABCDEFGHIJKLMNOPQRSTUVWY\x02\x02\x05\x05\x06\x07\x08\x08\x08\t\t\t\x0B\x0C\x0C\r\r\r\x11\x12\x13\x13\x15-\xBCRs\xE8AS\xA2\xFF\x1Eb\xCF<|\x995W\xE6\x15Z\x90\xFB\xBA\xE1hUflrstuz\0\0\0\x01\x01\x01\x01Fg\xC6]~\xA8\xCES \xC2CE entral Standard Time/\xC20A\x0401\x90\x06U\x90\x06astern Standard Time/\xC20A\x0401\x90\x0BU\x90\x0Bghanistan Standard Time/\xC20A\x0301\x82F\x82\xC3aet\x1E=skan Standard Time/\xC20U\x0401\x92&S\x92&utian Standard Time/\xC20U\x0401\x92%S\x92%ai Standard Time/\xC20R\x0401\x91gU\x91g\xC2agsb\xC2 i-Standard Time/\xC60BKQSY\x04\x07\n\r\x1001\x91{H\x90\x14W\x91\x17A\x91bA\x91{E\x92T\xC2ac#n Standard Time/\xC40AOZ\x03\x05\x0801\x81E\x81M\x91PZ\x922 Standard Time/\xC20I\x0401\x91\x04Q\x91\x04entina Standard Time/\xC20A\x0401\x90\x01R\x90\x01trakhan Standard Time/\xC20R\x0401\x91fU\x91flantic Standard Time/\xC40BCG\x04\x07\n01\x90*M\x90\x17A\x90*L\x90js Central W. Standard Time/\xC20A\x0401\x90\x07U\x90\x07\xC2eo!rbaijan Standard Time/\xC20A\x0401\x90\rZ\x90\rres Standard Time/\xC30GP\x04\x0701\x91_L\x90iT\x91_\xC3aeoFe\xC2hn\x1Cia Standard Time/\xC20B\x0401\x90\"R\x90\"gladesh Standard Time/\xC20B\x0401\x90\x10\xC2DT\x02\x90\x10\x90$larus Standard Time/\xC20B\x0401\x90&Y\x90&ugainville Standard Time/\xC20P\x0401\x91WG\x91W\xE1daehu\0\x02\x02n\x1En\xC3npu%Kada Central Standard Time/\xC20C\x0401\x90+A\x90+e Verde Standard Time/\xC30CZ\x04\x0701\x90DV\x90DZ\x92=casus Standard Time/\xC20A\x0301\x86M\x86n\xE1b.t\0$ Australia Standard Time/\xC20A\x0401\x90\x04U\x90\x04ral \xE1eABEPS\0\0\x01\x01v\x98\x019\xC2msBerica Standard Time/\xC90BCEGHNSZ\x04\x07\n\r\x10\x13\x16\x1901\x90sZ\x90'R\x90BC\x90NT\x90sN\x90yI\x91HV\x92\x0CZ\x92Bia Standard Time/\xC60ACIKZ\x04\x07\n\r\x1001\x91\x0EQ\x90\0N\x90@O\x91\x03G\x91\x0EZ\x924razilian Standard Time/\xC20B\x0401\x90\x1CR\x90\x1Curope\xC2 a6Standard Time/\xC70ACHMRS\x04\x06\t\x0C\x0F\x1201\x90|L\x85Z\x90GU\x90|E\x91)S\x91e\xC2IK\x02\x92\x02\x92\x04n Standard Time/\xC50BHMP\x04\x07\n\r01\x91ZA\x90\x0ER\x90zK\x91,L\x91Zacific Standard Time/\xC70AFNSVZ\x04\x06\t\x0C\x0F\x1201\x91|Q\x89M\x90[C\x91DB\x91|U\x92QZ\x929tandard Time\xC2 /\x14(Mexico)/\xC20M\x0401\x91>X\x91>\xC40CMU\x04\x07\n01\x92'A\x90/X\x91=S\x92'\xC2ai&tham Islands Standard Time/\xC20N\x0401\x91OZ\x91Ona Standard Time/\xC40CHM\x04\x07\n01\x90?N\x90?K\x90xO\x911ba Standard Time/\xC20C\x0401\x90CU\x90Cateline Standard Time/\xC20Z\x0401\x92HZ\x92H\xE1d.agk\0\x01\x01\xC5(E \xC3AESy\x98\xC2fuTrica Standard Time/\xCB0ADEKMSTUYZ\x04\x06\t\x11\x19\x1C\x1F\"%(01\x91\rQ\x8FJ\x90I\xC2RT\x02\x90S\x90V\xC2EM\x02\x91\r\x91\x13G\x91*O\x92\x08Z\x92\x1FG\x92\"T\x92UZ\x921stralia Standard Time/\xC20A\x0401\x90\x05U\x90\x05urope Standard Time/\xC20M\x0401\x91(D\x91(outh America Standard Time/\xC20B\x0401\x90!R\x90!ster\xC2 n Island Standard Time/\xC20C\x0401\x90;L\x90; Standard Time\xC2 /\x14(Mexico)/\xC20M\x0401\x91;X\x91;\xC40BCU\x04\x07\n01\x92,S\x90#A\x90-S\x92,ypt Standard Time/\xC20E\x0401\x90QG\x90Qaterinburg Standard Time/\xC20R\x0401\x91xU\x91x\xC2Li9E Standard Time/\xC70ABEFLU\x04\x07\n\r\x10\x1801\x92 X\x90XG\x90\x13E\x90PI\x90W\xC2TV\x02\x91\"\x91$A\x92 ji Standard Time/\xC20F\x0401\x90YJ\x90Y\xE1dMTer\0\0\0>c\x83T Standard Time/\xC70EFGIJP\x04\x07\n\x12\x1A\x1D01\x90`S\x90TO\x90]\xC2BG\x02\x90`\x90d\xC2EM\x02\x91\0\x91\x01E\x91\tT\x91^B Standard Time/\xC40CGR\x04\x07\n01\x91dY\x90FR\x90qO\x91dorgian Standard Time/\xC20G\x0401\x90bE\x90been\xC2lw\x1Dand Standard Time/\xC20G\x0401\x90hL\x90hich Standard Time/\xC90BCGILMST\x04\x07\n\x1E!$,801\x91\x06F\x90\x12I\x909\xC5HLMNW\x02\x04\x06\x08\x90e\x90g\x90k\x90l\x90uS\x91\x06R\x91 \xC2LR\x02\x91-\x914\xC3HLN\x02\x04\x92\x01\x92\x05\x92\x07G\x92\x13a\xC2iw\x1Cti Standard Time/\xC20H\x0401\x90{T\x90{aiian Standard Time/\xC50CPUZ\x04\x07\n\r01\x92)K\x90:F\x91US\x92)Z\x92F\xC3nrs\x1D9dia Standard Time/\xC20I\x0401\x91\x02N\x91\x02an Standard Time/\xC20I\x0401\x91\x05R\x91\x05rael Standard Time/\xC20I\x0401\x91\x08L\x91\x08ordan Standard Time/\xC20J\x0401\x91\x0BO\x91\x0B\xC2ao#liningrad Standard Time/\xC20R\x0401\x91kU\x91krea Standard Time/\xC20K\x0401\x91\x16R\x91\x16\xC2ioH\xC2bn\x1Cya Standard Time/\xC20L\x0401\x91%Y\x91%e Islands Standard Time/\xC30KZ\x04\x0701\x91\x10I\x91\x10Z\x92\xC3289\x16'/\xC40BGZ\x04\x07\n01\x92>R\x90\x1DS\x90rZ\x92>/\xC30PZ\x04\x0701\x92DN\x91\\Z\x92D/\xC30PZ\x04\x0701\x92EF\x91SZ\x92E1/\xC50ANUZ\x04\x07\n\r01\x92GS\x90\x02U\x91MM\x92$Z\x92G\xC20Z\x0401\x92.Z\x92.aanbaatar Standard Time/\xC20M\x0401\x910N\x910\xC3elo!Dnezuela Standard Time/\xC20V\x0401\x92ME\x92Madivostok Standard Time/\xC20R\x0401\x91wU\x91wlgograd Standard Time/\xC20R\x0401\x91vU\x91v\xE1b.e\x01\x1D \xE1dACEM\0\0\0\"\x87\xEFustralia Standard Time/\xC20A\x0401\x90\nU\x90\nentral Africa Standard Time/\xC90ABCDGNTZ\x04\x06\t\x19\x1C$,401\x91GO\x88J\x90\x16\xC4DFGM\x02\x04\x06\x905\x906\x907\x90>Z\x90M\xC2AQ\x02\x90_\x90p\xC2EG\x02\x91E\x91G\xC2DN\x02\x92\x11\x92\x19Z\x92/urope Standard Time/\xCB0ACDGILMNSV\x04\x0B\x0E\x11\x14\x17\x1F'/;01\x90H\xC2DT\x01\x80\x90\x03H\x908E\x90HI\x90fT\x91\x07\xC2IU\x02\x91\x1E\x91#\xC2CT\x02\x91'\x916\xC2LO\x02\x91I\x91J\xC3EJM\x02\x04\x91\x7F\x92\x03\x92\x06A\x92Kongolia Standard Time/\xC20M\x0401\x91/N\x91/st \xC3ABP>[sia Standard Time/\xC70AKMTUZ\x04\x06\t\x0C\x18\x1B01\x92JQ\x8CZ\x91\x1AV\x918\xC3FJM\x02\x04\x92\x12\x92\x15\x92\x18Z\x92JZ\x923ank Standard Time/\xC20P\x0401\x90wS\x90wacific Standard Time/\xC70AFGMPZ\x04\x06\t\x0C\x0F\x1201\x91VQ\x8BM\x90\\U\x90tP\x912G\x91VZ\x928\xC2au\x1Fkutsk Standard Time/\xC20R\x0401\x91yU\x91ykon Standard Time/\xC20C\x0401\x901A\x901") } }, bcp47_ids: unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"adalv\0\0\0aedxb\0\0\0afkbl\0\0\0aganu\0\0\0aiaxa\0\0\0altia\0\0\0amevn\0\0\0ancur\0\0\0aolad\0\0\0aqcas\0\0\0aqdav\0\0\0aqddu\0\0\0aqmaw\0\0\0aqmcm\0\0\0aqrot\0\0\0aqsyw\0\0\0aqvos\0\0\0arbue\0\0\0asppg\0\0\0atvie\0\0\0auadl\0\0\0aubne\0\0\0audrw\0\0\0aueuc\0\0\0auhba\0\0\0auldh\0\0\0auper\0\0\0ausyd\0\0\0awaua\0\0\0azbak\0\0\0basjj\0\0\0bbbgi\0\0\0bddac\0\0\0bebru\0\0\0bfoua\0\0\0bgsof\0\0\0bhbah\0\0\0bibjm\0\0\0bjptn\0\0\0bmbda\0\0\0bnbwn\0\0\0bolpb\0\0\0bqkra\0\0\0braux\0\0\0brcgb\0\0\0brfen\0\0\0brfor\0\0\0brmao\0\0\0brrbr\0\0\0brsao\0\0\0brssa\0\0\0bsnas\0\0\0btthi\0\0\0bwgbe\0\0\0bymsq\0\0\0bzbze\0\0\0cacfq\0\0\0caedm\0\0\0cahal\0\0\0careg\0\0\0casjf\0\0\0cator\0\0\0cavan\0\0\0cawnp\0\0\0caybx\0\0\0cayxy\0\0\0cayzs\0\0\0cccck\0\0\0cdfbm\0\0\0cdfih\0\0\0cfbgf\0\0\0cgbzv\0\0\0chzrh\0\0\0ciabj\0\0\0ckrar\0\0\0clipc\0\0\0clpuq\0\0\0clscl\0\0\0cmdla\0\0\0cnsha\0\0\0cnurc\0\0\0cobog\0\0\0crsjo\0\0\0cuhav\0\0\0cvrai\0\0\0cxxch\0\0\0cynic\0\0\0czprg\0\0\0deber\0\0\0djjib\0\0\0dkcph\0\0\0dmdom\0\0\0dosdq\0\0\0dzalg\0\0\0ecgps\0\0\0ecgye\0\0\0eetll\0\0\0egcai\0\0\0eheai\0\0\0erasm\0\0\0eslpa\0\0\0esmad\0\0\0etadd\0\0\0fihel\0\0\0fimhq\0\0\0fjsuv\0\0\0fkpsy\0\0\0fmpni\0\0\0fmtkk\0\0\0fotho\0\0\0frpar\0\0\0galbv\0\0\0gblon\0\0\0gdgnd\0\0\0getbs\0\0\0gfcay\0\0\0gggci\0\0\0ghacc\0\0\0gigib\0\0\0gldkshvnglgoh\0\0\0globy\0\0\0glthu\0\0\0gmbjl\0\0\0gncky\0\0\0gpbbr\0\0\0gpmsb\0\0\0gpsbh\0\0\0gqssg\0\0\0grath\0\0\0gsgrv\0\0\0gtgua\0\0\0gugum\0\0\0gwoxb\0\0\0gygeo\0\0\0hebron\0\0hkhkg\0\0\0hntgu\0\0\0hrzag\0\0\0htpap\0\0\0hubud\0\0\0iddjj\0\0\0idjkt\0\0\0idmak\0\0\0iedub\0\0\0imdgs\0\0\0inccu\0\0\0iodga\0\0\0iqbgw\0\0\0irthr\0\0\0isrey\0\0\0itrom\0\0\0jeruslm\0jesth\0\0\0jmkin\0\0\0joamm\0\0\0jptyo\0\0\0kenbo\0\0\0kgfru\0\0\0khpnh\0\0\0kicxi\0\0\0kipho\0\0\0kitrw\0\0\0kmyva\0\0\0knbas\0\0\0kpfnj\0\0\0krsel\0\0\0kwkwi\0\0\0kygec\0\0\0kzkzo\0\0\0kzura\0\0\0lavte\0\0\0lbbey\0\0\0lccas\0\0\0livdz\0\0\0lkcmb\0\0\0lrmlw\0\0\0lsmsu\0\0\0ltvno\0\0\0lulux\0\0\0lvrix\0\0\0lytip\0\0\0macas\0\0\0mcmon\0\0\0mdkiv\0\0\0metgd\0\0\0mgtnr\0\0\0mhmaj\0\0\0mkskp\0\0\0mlbko\0\0\0mmrgn\0\0\0mnhvd\0\0\0mnuln\0\0\0momfm\0\0\0mpspn\0\0\0mqfdf\0\0\0mrnkc\0\0\0msmni\0\0\0mtmla\0\0\0muplu\0\0\0mvmle\0\0\0mwblz\0\0\0mxcjs\0\0\0mxcun\0\0\0mxhmo\0\0\0mxmam\0\0\0mxmex\0\0\0mxmzt\0\0\0mxtij\0\0\0mykul\0\0\0mzmpm\0\0\0nawdh\0\0\0ncnou\0\0\0nenim\0\0\0nfnlk\0\0\0nglos\0\0\0nimga\0\0\0nlams\0\0\0noosl\0\0\0npktm\0\0\0nrinu\0\0\0nuiue\0\0\0nzakl\0\0\0nzcht\0\0\0ommct\0\0\0papty\0\0\0pelim\0\0\0pfgmr\0\0\0pfnhv\0\0\0pfppt\0\0\0pgpom\0\0\0pgraw\0\0\0phmnl\0\0\0pkkhi\0\0\0plwaw\0\0\0pmmqc\0\0\0pnpcn\0\0\0prsju\0\0\0ptlis\0\0\0ptpdl\0\0\0pwror\0\0\0pyasu\0\0\0qadoh\0\0\0rereu\0\0\0robuh\0\0\0rsbeg\0\0\0ruasf\0\0\0rubax\0\0\0ruchita\0rugdx\0\0\0ruikt\0\0\0rukgd\0\0\0rukra\0\0\0rukuf\0\0\0rumow\0\0\0ruoms\0\0\0ruovb\0\0\0rupkc\0\0\0rurtw\0\0\0rusred\0\0rutof\0\0\0ruuus\0\0\0ruvog\0\0\0ruvvo\0\0\0ruyek\0\0\0ruyks\0\0\0rwkgl\0\0\0saruh\0\0\0sbhir\0\0\0scmaw\0\0\0sdkrt\0\0\0sesto\0\0\0sgsin\0\0\0shshn\0\0\0silju\0\0\0sjlyr\0\0\0skbts\0\0\0slfna\0\0\0smsai\0\0\0sndkr\0\0\0somgq\0\0\0srpbm\0\0\0ssjub\0\0\0sttms\0\0\0svsal\0\0\0sxphi\0\0\0sydam\0\0\0szqmn\0\0\0tcgdt\0\0\0tdndj\0\0\0tfpfr\0\0\0tglfw\0\0\0thbkk\0\0\0tjdyu\0\0\0tkfko\0\0\0tldil\0\0\0tmasb\0\0\0tntun\0\0\0totbu\0\0\0trist\0\0\0ttpos\0\0\0tvfun\0\0\0twtpe\0\0\0tzdar\0\0\0uaiev\0\0\0uasip\0\0\0ugkla\0\0\0umawk\0\0\0ummdy\0\0\0usadk\0\0\0usanc\0\0\0uschi\0\0\0usden\0\0\0ushnl\0\0\0usind\0\0\0uslax\0\0\0usnyc\0\0\0usphx\0\0\0utc\0\0\0\0\0utce01\0\0utce02\0\0utce03\0\0utce04\0\0utce05\0\0utce06\0\0utce07\0\0utce08\0\0utce09\0\0utce10\0\0utce11\0\0utce12\0\0utce13\0\0utce14\0\0utcw01\0\0utcw02\0\0utcw03\0\0utcw04\0\0utcw05\0\0utcw06\0\0utcw07\0\0utcw08\0\0utcw09\0\0utcw10\0\0utcw11\0\0utcw12\0\0uymvd\0\0\0uztas\0\0\0vavat\0\0\0vcsvd\0\0\0veccs\0\0\0vgtov\0\0\0vistt\0\0\0vnsgn\0\0\0vuvli\0\0\0wfmau\0\0\0wsapw\0\0\0yeade\0\0\0ytmam\0\0\0zajnb\0\0\0zmlun\0\0\0zwhre\0\0\0") } }; + } + #[clippy::msrv = "1.81"] + impl icu_provider::DataProvider for $provider { + fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> { + if req.id.locale.is_default() { + Ok(icu_provider::DataResponse { payload: icu_provider::DataPayload::from_static_ref(Self::SINGLETON_WINDOWS_ZONES_TO_BCP47_MAP_V1), metadata: icu_provider::DataResponseMetadata::default() }) + } else { + Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) + } + } + } + }; + ($ provider : ty , ITER) => { + __impl_windows_zones_to_bcp47_map_v1!($provider); + #[clippy::msrv = "1.81"] + impl icu_provider::IterableDataProvider for $provider { + fn iter_ids(&self) -> Result>, icu_provider::DataError> { + Ok([Default::default()].into_iter().collect()) + } + } + }; + ($ provider : ty , DRY) => { + __impl_windows_zones_to_bcp47_map_v1!($provider); + #[clippy::msrv = "1.81"] + impl icu_provider::DryDataProvider for $provider { + fn dry_load(&self, req: icu_provider::DataRequest) -> Result { + if req.id.locale.is_default() { + Ok(icu_provider::DataResponseMetadata::default()) + } else { + Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) + } + } + } + }; + ($ provider : ty , DRY , ITER) => { + __impl_windows_zones_to_bcp47_map_v1!($provider); + #[clippy::msrv = "1.81"] + impl icu_provider::DryDataProvider for $provider { + fn dry_load(&self, req: icu_provider::DataRequest) -> Result { + if req.id.locale.is_default() { + Ok(icu_provider::DataResponseMetadata::default()) + } else { + Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) + } + } + } + #[clippy::msrv = "1.81"] + impl icu_provider::IterableDataProvider for $provider { + fn iter_ids(&self) -> Result>, icu_provider::DataError> { + Ok([Default::default()].into_iter().collect()) + } + } + }; +} +#[doc(inline)] +pub use __impl_windows_zones_to_bcp47_map_v1 as impl_windows_zones_to_bcp47_map_v1; diff --git a/provider/data/timezone/data/zone_offset_period_v1.rs.data b/provider/data/time/data/zone_offset_period_v1.rs.data similarity index 96% rename from provider/data/timezone/data/zone_offset_period_v1.rs.data rename to provider/data/time/data/zone_offset_period_v1.rs.data index 14a9fa8a340..2471be1a508 100644 --- a/provider/data/timezone/data/zone_offset_period_v1.rs.data +++ b/provider/data/time/data/zone_offset_period_v1.rs.data @@ -16,18 +16,18 @@ macro_rules! __impl_zone_offset_period_v1 { #[clippy::msrv = "1.81"] impl $provider { #[doc(hidden)] - pub const SINGLETON_ZONE_OFFSET_PERIOD_V1: &'static ::DataStruct = &icu::timezone::provider::ZoneOffsetPeriod(unsafe { + pub const SINGLETON_ZONE_OFFSET_PERIOD_V1: &'static ::DataStruct = &icu::time::provider::ZoneOffsetPeriod(unsafe { #[allow(unused_unsafe)] zerovec::ZeroMap2d::from_parts_unchecked(unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"adalv\0\0\0aedxb\0\0\0afkbl\0\0\0aganu\0\0\0aiaxa\0\0\0altia\0\0\0amevn\0\0\0ancur\0\0\0aolad\0\0\0aqcas\0\0\0aqdav\0\0\0aqddu\0\0\0aqmaw\0\0\0aqmcm\0\0\0aqplm\0\0\0aqrot\0\0\0aqsyw\0\0\0aqtrl\0\0\0aqvos\0\0\0arbue\0\0\0arcor\0\0\0arctc\0\0\0arirj\0\0\0arjuj\0\0\0arluq\0\0\0armdz\0\0\0arrgl\0\0\0arsla\0\0\0artuc\0\0\0aruaq\0\0\0arush\0\0\0asppg\0\0\0atvie\0\0\0auadl\0\0\0aubhq\0\0\0aubne\0\0\0audrw\0\0\0aueuc\0\0\0auhba\0\0\0auldc\0\0\0auldh\0\0\0aumel\0\0\0aumqi\0\0\0auper\0\0\0ausyd\0\0\0awaua\0\0\0azbak\0\0\0basjj\0\0\0bbbgi\0\0\0bddac\0\0\0bebru\0\0\0bfoua\0\0\0bgsof\0\0\0bhbah\0\0\0bibjm\0\0\0bjptn\0\0\0bmbda\0\0\0bnbwn\0\0\0bolpb\0\0\0bqkra\0\0\0braux\0\0\0brbel\0\0\0brbvb\0\0\0brcgb\0\0\0brcgr\0\0\0brern\0\0\0brfen\0\0\0brfor\0\0\0brmao\0\0\0brmcz\0\0\0brpvh\0\0\0brrbr\0\0\0brrec\0\0\0brsao\0\0\0brssa\0\0\0brstm\0\0\0bsnas\0\0\0btthi\0\0\0bwgbe\0\0\0bymsq\0\0\0bzbze\0\0\0cacfq\0\0\0caedm\0\0\0cafne\0\0\0caglb\0\0\0cagoo\0\0\0cahal\0\0\0caiql\0\0\0camon\0\0\0careb\0\0\0careg\0\0\0casjf\0\0\0cator\0\0\0cavan\0\0\0cawnp\0\0\0caybx\0\0\0caycb\0\0\0cayda\0\0\0caydq\0\0\0cayek\0\0\0cayev\0\0\0cayxy\0\0\0cayyn\0\0\0cayzs\0\0\0cccck\0\0\0cdfbm\0\0\0cdfih\0\0\0cfbgf\0\0\0cgbzv\0\0\0chzrh\0\0\0ciabj\0\0\0ckrar\0\0\0clipc\0\0\0clpuq\0\0\0clscl\0\0\0cmdla\0\0\0cnsha\0\0\0cnurc\0\0\0cobog\0\0\0crsjo\0\0\0cuhav\0\0\0cvrai\0\0\0cxxch\0\0\0cyfmg\0\0\0cynic\0\0\0czprg\0\0\0deber\0\0\0debsngn\0djjib\0\0\0dkcph\0\0\0dmdom\0\0\0dosdq\0\0\0dzalg\0\0\0ecgps\0\0\0ecgye\0\0\0eetll\0\0\0egcai\0\0\0eheai\0\0\0erasm\0\0\0esceu\0\0\0eslpa\0\0\0esmad\0\0\0etadd\0\0\0fihel\0\0\0fimhq\0\0\0fjsuv\0\0\0fkpsy\0\0\0fmksa\0\0\0fmpni\0\0\0fmtkk\0\0\0fotho\0\0\0frpar\0\0\0galbv\0\0\0gazastrpgblon\0\0\0gdgnd\0\0\0getbs\0\0\0gfcay\0\0\0gggci\0\0\0ghacc\0\0\0gigib\0\0\0gldkshvnglgoh\0\0\0globy\0\0\0glthu\0\0\0gmbjl\0\0\0gmt\0\0\0\0\0gncky\0\0\0gpbbr\0\0\0gpmsb\0\0\0gpsbh\0\0\0gqssg\0\0\0grath\0\0\0gsgrv\0\0\0gtgua\0\0\0gugum\0\0\0gwoxb\0\0\0gygeo\0\0\0hebron\0\0hkhkg\0\0\0hntgu\0\0\0hrzag\0\0\0htpap\0\0\0hubud\0\0\0iddjj\0\0\0idjkt\0\0\0idmak\0\0\0idpnk\0\0\0iedub\0\0\0imdgs\0\0\0inccu\0\0\0iodga\0\0\0iqbgw\0\0\0irthr\0\0\0isrey\0\0\0itrom\0\0\0jeruslm\0jesth\0\0\0jmkin\0\0\0joamm\0\0\0jptyo\0\0\0kenbo\0\0\0kgfru\0\0\0khpnh\0\0\0kicxi\0\0\0kipho\0\0\0kitrw\0\0\0kmyva\0\0\0knbas\0\0\0kpfnj\0\0\0krsel\0\0\0kwkwi\0\0\0kygec\0\0\0kzaau\0\0\0kzakx\0\0\0kzala\0\0\0kzguw\0\0\0kzksn\0\0\0kzkzo\0\0\0kzura\0\0\0lavte\0\0\0lbbey\0\0\0lccas\0\0\0livdz\0\0\0lkcmb\0\0\0lrmlw\0\0\0lsmsu\0\0\0ltvno\0\0\0lulux\0\0\0lvrix\0\0\0lytip\0\0\0macas\0\0\0mcmon\0\0\0mdkiv\0\0\0metgd\0\0\0mgtnr\0\0\0mhkwa\0\0\0mhmaj\0\0\0mkskp\0\0\0mlbko\0\0\0mmrgn\0\0\0mnhvd\0\0\0mnuln\0\0\0momfm\0\0\0mpspn\0\0\0mqfdf\0\0\0mrnkc\0\0\0msmni\0\0\0mtmla\0\0\0muplu\0\0\0mvmle\0\0\0mwblz\0\0\0mxchi\0\0\0mxcjs\0\0\0mxcun\0\0\0mxhmo\0\0\0mxmam\0\0\0mxmex\0\0\0mxmid\0\0\0mxmty\0\0\0mxmzt\0\0\0mxoji\0\0\0mxpvr\0\0\0mxtij\0\0\0mykch\0\0\0mykul\0\0\0mzmpm\0\0\0nawdh\0\0\0ncnou\0\0\0nenim\0\0\0nfnlk\0\0\0nglos\0\0\0nimga\0\0\0nlams\0\0\0noosl\0\0\0npktm\0\0\0nrinu\0\0\0nuiue\0\0\0nzakl\0\0\0nzcht\0\0\0ommct\0\0\0papty\0\0\0pelim\0\0\0pfgmr\0\0\0pfnhv\0\0\0pfppt\0\0\0pgpom\0\0\0pgraw\0\0\0phmnl\0\0\0pkkhi\0\0\0plwaw\0\0\0pmmqc\0\0\0pnpcn\0\0\0prsju\0\0\0ptfnc\0\0\0ptlis\0\0\0ptpdl\0\0\0pwror\0\0\0pyasu\0\0\0qadoh\0\0\0rereu\0\0\0robuh\0\0\0rsbeg\0\0\0ruasf\0\0\0rubax\0\0\0ruchita\0rudyr\0\0\0rugdx\0\0\0ruikt\0\0\0rukgd\0\0\0rukhndg\0rukra\0\0\0rukuf\0\0\0rukvx\0\0\0rumow\0\0\0runoz\0\0\0ruoms\0\0\0ruovb\0\0\0rupkc\0\0\0rurtw\0\0\0rusred\0\0rutof\0\0\0ruuly\0\0\0ruunera\0ruuus\0\0\0ruvog\0\0\0ruvvo\0\0\0ruyek\0\0\0ruyks\0\0\0rwkgl\0\0\0saruh\0\0\0sbhir\0\0\0scmaw\0\0\0sdkrt\0\0\0sesto\0\0\0sgsin\0\0\0shshn\0\0\0silju\0\0\0sjlyr\0\0\0skbts\0\0\0slfna\0\0\0smsai\0\0\0sndkr\0\0\0somgq\0\0\0srpbm\0\0\0ssjub\0\0\0sttms\0\0\0svsal\0\0\0sxphi\0\0\0sydam\0\0\0szqmn\0\0\0tcgdt\0\0\0tdndj\0\0\0tfpfr\0\0\0tglfw\0\0\0thbkk\0\0\0tjdyu\0\0\0tkfko\0\0\0tldil\0\0\0tmasb\0\0\0tntun\0\0\0totbu\0\0\0trist\0\0\0ttpos\0\0\0tvfun\0\0\0twtpe\0\0\0tzdar\0\0\0uaiev\0\0\0uasip\0\0\0ugkla\0\0\0umawk\0\0\0ummdy\0\0\0usadk\0\0\0usaeg\0\0\0usanc\0\0\0usboi\0\0\0uschi\0\0\0usden\0\0\0usdet\0\0\0ushnl\0\0\0usind\0\0\0usinvev\0usjnu\0\0\0usknx\0\0\0uslax\0\0\0uslui\0\0\0usmnm\0\0\0usmoc\0\0\0usmtm\0\0\0usndcnt\0usndnsl\0usnyc\0\0\0usoea\0\0\0usome\0\0\0usphx\0\0\0ussit\0\0\0ustel\0\0\0uswlz\0\0\0uswsq\0\0\0usxul\0\0\0usyak\0\0\0utc\0\0\0\0\0utce01\0\0utce02\0\0utce03\0\0utce04\0\0utce05\0\0utce06\0\0utce07\0\0utce08\0\0utce09\0\0utce10\0\0utce11\0\0utce12\0\0utce13\0\0utce14\0\0utcw01\0\0utcw02\0\0utcw03\0\0utcw04\0\0utcw05\0\0utcw06\0\0utcw07\0\0utcw08\0\0utcw09\0\0utcw10\0\0utcw11\0\0utcw12\0\0uymvd\0\0\0uzskd\0\0\0uztas\0\0\0vavat\0\0\0vcsvd\0\0\0veccs\0\0\0vgtov\0\0\0vistt\0\0\0vnsgn\0\0\0vuvli\0\0\0wfmau\0\0\0wsapw\0\0\0yeade\0\0\0ytmam\0\0\0zajnb\0\0\0zmlun\0\0\0zwhre\0\0\0") }, unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"\x02\0\0\0\x03\0\0\0\x04\0\0\0\x05\0\0\0\x06\0\0\0\t\0\0\0\x10\0\0\0\x11\0\0\0\x12\0\0\0#\0\0\0(\0\0\0)\0\0\0+\0\0\0,\0\0\x001\0\0\x003\0\0\x004\0\0\x006\0\0\0:\0\0\0@\0\0\0H\0\0\0R\0\0\0\\\0\0\0f\0\0\0t\0\0\0\x82\0\0\0\x8A\0\0\0\x92\0\0\0\x9C\0\0\0\xA6\0\0\0\xAE\0\0\0\xAF\0\0\0\xB2\0\0\0\xB4\0\0\0\xB8\0\0\0\xBB\0\0\0\xBC\0\0\0\xBE\0\0\0\xBF\0\0\0\xC4\0\0\0\xC8\0\0\0\xCA\0\0\0\xCB\0\0\0\xCD\0\0\0\xCF\0\0\0\xD0\0\0\0\xD6\0\0\0\xD8\0\0\0\xDA\0\0\0\xDD\0\0\0\xDF\0\0\0\xE0\0\0\0\xE4\0\0\0\xE6\0\0\0\xE7\0\0\0\xE8\0\0\0\xEA\0\0\0\xEB\0\0\0\xEC\0\0\0\xED\0\0\0\xF3\0\0\0\xF5\0\0\0\xF9\0\0\0\xFD\0\0\0\xFF\0\0\0\x05\x01\0\0\x0B\x01\0\0\x11\x01\0\0\x15\x01\0\0\x1D\x01\0\0\x1F\x01\0\0#\x01\0\0)\x01\0\0+\x01\0\0/\x01\0\x002\x01\0\x005\x01\0\x007\x01\0\08\x01\0\0>\x01\0\0@\x01\0\0A\x01\0\0D\x01\0\0H\x01\0\0L\x01\0\0Q\x01\0\0T\x01\0\0W\x01\0\0\\\x01\0\0b\x01\0\0c\x01\0\0h\x01\0\0k\x01\0\0n\x01\0\0q\x01\0\0r\x01\0\0w\x01\0\0{\x01\0\0}\x01\0\0\x80\x01\0\0\x84\x01\0\0\x87\x01\0\0\x89\x01\0\0\x8A\x01\0\0\x8B\x01\0\0\x8C\x01\0\0\x8D\x01\0\0\x8E\x01\0\0\x8F\x01\0\0\x91\x01\0\0\x92\x01\0\0\x95\x01\0\0\x97\x01\0\0\x9A\x01\0\0\x9B\x01\0\0\x9C\x01\0\0\x9E\x01\0\0\x9F\x01\0\0\xA1\x01\0\0\xA3\x01\0\0\xA4\x01\0\0\xA6\x01\0\0\xA7\x01\0\0\xAC\x01\0\0\xAF\x01\0\0\xB1\x01\0\0\xB3\x01\0\0\xB5\x01\0\0\xB6\x01\0\0\xB8\x01\0\0\xB9\x01\0\0\xBE\x01\0\0\xC5\x01\0\0\xC8\x01\0\0\xCA\x01\0\0\xCF\x01\0\0\xD0\x01\0\0\xD5\x01\0\0\xD6\x01\0\0\xDA\x01\0\0\xDC\x01\0\0\xDF\x01\0\0\xE0\x01\0\0\xE3\x01\0\0\xE6\x01\0\0\xE8\x01\0\0\xED\x01\0\0\xEF\x01\0\0\xF0\x01\0\0\xF1\x01\0\0\xF3\x01\0\0\xF6\x01\0\0\xF7\x01\0\0\0\x02\0\0\x04\x02\0\0\x05\x02\0\0\n\x02\0\0\x0B\x02\0\0\x0F\x02\0\0\x10\x02\0\0\x12\x02\0\0\x15\x02\0\0\x19\x02\0\0\x1E\x02\0\0\x1F\x02\0\0 \x02\0\0!\x02\0\0\"\x02\0\0#\x02\0\0$\x02\0\0%\x02\0\0&\x02\0\0)\x02\0\0*\x02\0\0,\x02\0\0.\x02\0\x000\x02\0\x003\x02\0\08\x02\0\0:\x02\0\0<\x02\0\0>\x02\0\0?\x02\0\0B\x02\0\0C\x02\0\0D\x02\0\0E\x02\0\0G\x02\0\0K\x02\0\0O\x02\0\0P\x02\0\0R\x02\0\0U\x02\0\0Z\x02\0\0[\x02\0\0^\x02\0\0_\x02\0\0c\x02\0\0f\x02\0\0i\x02\0\0j\x02\0\0k\x02\0\0p\x02\0\0q\x02\0\0t\x02\0\0w\x02\0\0x\x02\0\0y\x02\0\0z\x02\0\0}\x02\0\0\x7F\x02\0\0\x80\x02\0\0\x81\x02\0\0\x88\x02\0\0\x90\x02\0\0\x96\x02\0\0\x9D\x02\0\0\xA6\x02\0\0\xB0\x02\0\0\xB8\x02\0\0\xB9\x02\0\0\xBA\x02\0\0\xBB\x02\0\0\xBD\x02\0\0\xC1\x02\0\0\xC3\x02\0\0\xC4\x02\0\0\xCA\x02\0\0\xCC\x02\0\0\xD3\x02\0\0\xDB\x02\0\0\xE2\x02\0\0\xE5\x02\0\0\xE9\x02\0\0\xEB\x02\0\0\xEC\x02\0\0\xEE\x02\0\0\xEF\x02\0\0\xF1\x02\0\0\xF2\x02\0\0\xF3\x02\0\0\xF6\x02\0\0\xF9\x02\0\0\xFB\x02\0\0\xFD\x02\0\0\0\x03\0\0\x01\x03\0\0\x02\x03\0\0\x07\x03\0\0\t\x03\0\0\n\x03\0\0\x0B\x03\0\0\x10\x03\0\0\x15\x03\0\0\x19\x03\0\0\x1C\x03\0\0\x1E\x03\0\0\"\x03\0\0&\x03\0\0)\x03\0\0+\x03\0\x000\x03\0\x002\x03\0\x006\x03\0\x007\x03\0\09\x03\0\0:\x03\0\0>\x03\0\0@\x03\0\0A\x03\0\0F\x03\0\0G\x03\0\0P\x03\0\0R\x03\0\0T\x03\0\0V\x03\0\0X\x03\0\0Y\x03\0\0Z\x03\0\0[\x03\0\0\\\x03\0\0]\x03\0\0_\x03\0\0`\x03\0\0a\x03\0\0b\x03\0\0c\x03\0\0e\x03\0\0g\x03\0\0j\x03\0\0l\x03\0\0o\x03\0\0q\x03\0\0r\x03\0\0v\x03\0\0z\x03\0\0~\x03\0\0\x7F\x03\0\0\x84\x03\0\0\x86\x03\0\0\x87\x03\0\0\x8C\x03\0\0\x8E\x03\0\0\x96\x03\0\0\x9E\x03\0\0\xA4\x03\0\0\xAA\x03\0\0\xB0\x03\0\0\xB5\x03\0\0\xBA\x03\0\0\xC3\x03\0\0\xC8\x03\0\0\xD0\x03\0\0\xD7\x03\0\0\xDC\x03\0\0\xE1\x03\0\0\xE6\x03\0\0\xEE\x03\0\0\xF3\x03\0\0\xFB\x03\0\0\0\x04\0\0\x08\x04\0\0\x0F\x04\0\0\x16\x04\0\0\x1E\x04\0\0'\x04\0\0,\x04\0\x001\x04\0\x006\x04\0\x007\x04\0\08\x04\0\09\x04\0\0:\x04\0\0>\x04\0\0@\x04\0\0B\x04\0\0C\x04\0\0E\x04\0\0G\x04\0\0I\x04\0\0J\x04\0\0M\x04\0\0N\x04\0\0O\x04\0\0Q\x04\0\0U\x04\0\0X\x04\0\0Z\x04\0\0[\x04\0\0^\x04\0\0_\x04\0\0c\x04\0\0f\x04\0\0g\x04\0\0h\x04\0\0i\x04\0\0m\x04\0\0o\x04\0\0r\x04\0\0u\x04\0\0w\x04\0\0z\x04\0\0\x86\x04\0\0\x87\x04\0\0\x88\x04\0\0\x8A\x04\0\0\x8B\x04\0\0\x8F\x04\0\0\x99\x04\0\0\x9A\x04\0\0\x9B\x04\0\0\x9C\x04\0\0\xA1\x04\0\0\xA7\x04\0\0\xAC\x04\0\0\xAF\x04\0\0\xB0\x04\0\0\xB1\x04\0\0\xB5\x04\0\0\xB6\x04\0\0\xB9\x04\0\0\xBC\x04\0\0\xC0\x04\0\0\xC3\x04\0\0\xC4\x04\0\0\xC8\x04\0\0\xCA\x04\0\0\xCC\x04\0\0\xD1\x04\0\0\xD3\x04\0\0\xD5\x04\0\0\xD6\x04\0\0\xDB\x04\0\0\xE0\x04\0\0\xE1\x04\0\0\xE3\x04\0\0\xE6\x04\0\0\xEB\x04\0\0\xF0\x04\0\0\xF2\x04\0\0\xF3\x04\0\0\xF4\x04\0\0\xF5\x04\0\0\xF6\x04\0\0\xF7\x04\0\0\xF8\x04\0\0\xF9\x04\0\0\xFA\x04\0\0\xFB\x04\0\0\xFC\x04\0\0\xFD\x04\0\0\xFE\x04\0\0\xFF\x04\0\0\0\x05\0\0\x01\x05\0\0\x02\x05\0\0\x03\x05\0\0\x04\x05\0\0\x05\x05\0\0\x06\x05\0\0\x07\x05\0\0\x08\x05\0\0\t\x05\0\0\n\x05\0\0\x0B\x05\0\0\x0C\x05\0\0\r\x05\0\0\x0E\x05\0\0\x12\x05\0\0\x17\x05\0\0\x1A\x05\0\0\x1D\x05\0\0\x1E\x05\0\0!\x05\0\0\"\x05\0\0#\x05\0\0%\x05\0\0'\x05\0\0(\x05\0\0,\x05\0\0-\x05\0\0.\x05\0\0/\x05\0\x000\x05\0\x001\x05\0\0") }, unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"\0\0\0\0xXz\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xE8\xACj\0`Xt\0\0\0\0\0TWr\0\xC0\xB1\xD8\0\x88\xE8B\x01\xC4\xE8B\x01`\nI\x01\x08\xE8J\x01\0\0\0\0\0\0\0\0\0\0\0\0\xD8_?\x01\x18hB\x01X\xA2O\x01\\2R\x01\0\xA5w\x01\x90\xBE\x82\x01\xD0[\x87\x014\xE5\x8A\x01\xD4O\x8F\x01T\xBD\x92\x01\xE1Y\x97\x01\x80\xE3\x9A\x01aY\x9F\x01\0\xE3\xA2\x01\xE1X\xA7\x01T\xD2\xAA\x01\0\0\0\0\xD8_?\x01p\x88B\x01X\xA2O\x01\x103R\x01\0\0\0\0\0\0\0\0\xD8_?\x01\0\0\0\0\0\0\0\0X\x96 \0`\xF1b\0\xF0\x98f\x01\xE0\x96x\x01\0\0\0\0\xC0\x807\0\0\0\0\0\0\0\0\0@\xD2\x19\x01\0\0\0\0 K\xC1\0\xC0J\xC7\0\x98\x0F\xB1\x01\0\0\0\08\xF2\xB6\0\xE0\xC6\xEE\0\x94\xC7\xEE\0\xE0\x1D\xF2\0X`7\x01\0\0\0\0\x98\xCF\x97\0@\xF2\xAE\08\xF2\xB6\0\xE0\xC6\xEE\0\x94\xC7\xEE\0\xE0\x1D\xF2\0X`7\x01\0\0\0\0\x98\xCF\x97\0@\xF2\xAE\08\xF2\xB6\0\xE0\xC6\xEE\0\x94\xC7\xEE\0\xE0\x1D\xF2\0@2\x14\x01 \x9D\x14\x01\x98\xEA0\x01\0\0\0\0\x98\xCF\x97\0\x80L\xAB\08\xF2\xB6\0\xE0\xC6\xEE\0\x94\xC7\xEE\0\xE0\x1D\xF2\0@2\x14\x01 \x9D\x14\x01\x98\xEA0\x01\0\0\0\0\x98\xCF\x97\0 \x1A\xA7\0\xA0-\xAA\0\x80\xA3\xAE\08\xF2\xB6\0\xE0\xC6\xEE\0\x94\xC7\xEE\0\xE0\x1D\xF2\0\x98\xEA0\x01\0\0\0\0\xA0\x17\xA2\0\0\xD1\xA6\0\xA0\xD3\xA9\0 \xD9\xAB\08\xF2\xB6\0\xE0\xC6\xEE\0\xE0\x1D\xF2\0\xA0,\x14\x01\0b\x15\x01\x98\xEA0\x01\xE0e1\x01497\x01\08?\x01\0\0\0\0\x98\xCF\x97\0\0\xD1\xA6\0\xA0\xD3\xA9\0 \xD6\xAE\0`\xDE\xB1\0\xC0\xF1\xB6\08\xF2\xB6\0\xE0\xC6\xEE\0\x94\xC7\xEE\0\xE0\x1D\xF2\0\xA0\xFF\x13\x01`\xC4\x16\x01\x98\xEA0\x01\0\0\0\08\xF2\xB6\0\xE0\xC6\xEE\0\x94\xC7\xEE\0\xE0\x1D\xF2\0@2\x14\x01 \x9D\x14\x01\x98\xEA0\x01\0\0\0\0\x98\xCF\x97\0@\xF2\xAE\08\xF2\xB6\0\xE0\xC6\xEE\0\x94\xC7\xEE\0\xE0\x1D\xF2\0\x98\xEA0\x01\0\0\0\0\x98\xCF\x97\0@\xF2\xAE\08\xF2\xB6\0\xE0\xC6\xEE\0\x94\xC7\xEE\0\xE0\x1D\xF2\0@2\x14\x01\xC0u\x14\x01X`7\x01\0\0\0\0\x98\xCF\x97\0\x80L\xAB\08\xF2\xB6\0\xE0\xC6\xEE\0\x94\xC7\xEE\0\xE0\x1D\xF2\0\xA0,\x14\x01\0b\x15\x01\x98\xEA0\x01\0\0\0\08\xF2\xB6\0\xE0\xC6\xEE\0\x94\xC7\xEE\0\xE0\x1D\xF2\0\0'\x14\x01 \x9D\x14\x01\x98\xEA0\x01\0\0\0\0\0\0\0\0\x08ZR\0@IX\0\0\0\0\0 \x05\x08\0\0\0\0\0 \x05\x08\0\x9Eb\xEF\0 \xC1\xF0\0\0\0\0\0 \x05\x08\0\xC0\x17\xAF\0\0\0\0\0\0\0\0\0\xAB\x857\x01\0\0\0\0\0\0\0\0 \x05\x08\0\xC0\x17\xAF\0\xA0\x8C\xB4\0 >\xBF\0\0\0\0\0 \x95Y\0\x86\xF3v\0\x80]|\0\0\0\0\0 \x05\x08\0\0\0\0\0\0\0\0\0\xD8\x857\x01\0\0\0\0 \x05\x08\0\0\0\0\0\0\0\0\0TWr\0\0\xA7\xD0\0\x88\xE8B\x01\xC4\xE8B\x01\xA4\rk\x01\0\0\0\0\xA0\x8Eg\0\0\0\0\0l\xAAR\0\0\0\0\0 \09\x01\x80\xBA<\x01\0\0\0\0 /8\0\0\0\0\0\0\0\0\0d3J\0\x90Xb\0\x942f\0\0\0\0\0@a\x13\0\0\0\0\0\0\0\0\0\0\0\0\0\xB8\xAC\"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0X\xCC\x9E\0\xE0A\xCE\0\xB8\x8A\x07\x01@\x85W\x018\x83\x7F\x01\0\0\0\0\xB8\xF4\x8E\0\0\0\0\0\xF4\xF4\x8E\0\0\xB6\xEE\0\x94\xC7\xEE\0\0\0\0\0\xF4\x8A\x07\x01\x80\xE0\x16\x01\x14\xF9\x87\x01\0\0\0\0\x14\xF9\x87\x01\0\0\0\x000\xF5\x8E\0`\x86\xBE\x000\xF1\xCE\0\xC0\xCD4\x01\xE0\xFA_\x01\0\0\0\0\x1C\xCC\x9E\0\0\xB6\xEE\0\x1C\xC7\xEE\0@f\xFE\0\xDC\x14\xFF\0\0\0\0\0X\xCC\x9E\0\0\xB6\xEE\0X\xC7\xEE\0@f\xFE\0\x18\x15\xFF\0\0\0\0\0\xF4\xF4\x8E\0`\x86\xBE\0\xF4\xF0\xCE\0\0\0\0\0X\xCC\x9E\0\0\xE5\xCE\0\xB8\xF0\xCE\0\0\xB6\xEE\0X\xC7\xEE\0@f\xFE\0\x18\x15\xFF\0\0\0\0\0\xF4\xF4\x8E\0\0\0\0\x000\xF5\x8E\0\xC0\xCD4\x01\xE0\xFA_\x01\0\0\0\0X\xCC\x9E\0\0\xB6\xEE\0X\xC7\xEE\0@f\xFE\0\x18\x15\xFF\0\0\0\0\0\xD8\xF8\x87\x01\0\0\0\0\xB8\x8A\x07\x01`^O\x018\x83\x7F\x01\0\0\0\0\xF4\xF4\x8E\0\xC0\xCD4\x01\0\0\0\0(\xAE\x1A\0 \x1A \0\0\0\0\0@m\x8E\0\0\0\0\0\0\0\0\0\x90Wr\0\xD8|\xAA\0\xC4\xE8B\x01\0\xE9B\x01\xF8\xE8J\x01\0\0\0\0\xEC\x05h\0\0\0\0\0\0\0\0\0\xE0\xF6\x82\0\xA0m\x88\0\0\0\0\0\x1C\xF7\x82\0\xA0m\x88\08\x98j\x01\0\0\0\0@\n\x10\0\xEC\xAD\x1A\0 \x1A \0\0\0\0\0\x15\x7F\x8A\0Y~\x92\0u\x9AJ\x01`\xB8O\x01\0\0\0\0\xEC\xAD\x1A\0 \x1A \0\0\0\0\0h\xEC\"\x01\xA4\xEC\"\x01\0\0\0\0l\xAE\x12\0\0\x15\x18\0,\xEC\"\x01@\xF0(\x01\0\0\0\0\xA4\xF6\x82\0\xD4\xC6\xFA\0\xA4\xEC\"\x01\xB8\x88'\x01\x14u*\x01\0\0\0\0\0\0\0\0\xF7~\x8A\0;~\x92\0W\x9AJ\x01`\xB8O\x01\0\0\0\0(\xAE\x1A\0 \x1A \0\0\0\0\0\x1C\xF7\x82\0\xA0m\x88\0\0\0\0\0`\xED\x1A\x01 \xEB \x01\0\0\0\0\0\0\0\0\xE0\xF6\x82\0Xd\xF7\0@\x8B\xF7\0\xD4\xC6\xFA\0\0\0\0\0\x80\xAC\x1E\0\x80>P\0`\xF7\x97\x01\0\0\0\0\x1C\xF7\x82\0\0\0\0\0\xA4\xF6\x82\0\xD4\xC6\xFA\0\0\0\0\0\x80>P\0\xE0\xF6\x82\0\x1C\xF7\x82\0\0\0\0\0\x80>P\0`\xF7\x97\x01\0\0\0\0\xB8\xAD\x12\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@IX\0\0\0\0\0\0\0\0\0 G\0Z\x1C\xA7\0\0\0\0\0p\xA6\x8E\0\0\0\0\0\xF0\x98f\x01\xE0\x96x\x01\0\0\0\0\0\0\0\0\0\0\0\0|\xC9\xAA\0\0\0\0\0\0\0\0\0\xB0A\xB3\0\0\0\0\0\xAC\xED\xB0\0\0\0\0\0\0\0\0\0\xB8T/\0\0\0\0\0\0\0\0\0\x8C\x9F\xE2\0\xC0\r\xE6\0\x80\xADv\x01\xBC\xD1\x7F\x01\0\0\0\0\x8C\x9F\xE2\0\xC0\r\xE6\0\0\0\0\0`9H\0\0\0\0\0\x80>P\0\0\0\0\0@IX\0\0\0\0\0\0\0\0\0\x80>P\0\0\0\0\0\0\0\0\0\x8E\xAD\x1E\0\0\xAC&\0Xd\xF7\0h\xEC\"\x01\0\0\0\0\xC4\x8B\n\0@\x9F>\0D\x01B\0\xA0\xC5N\0$\xC5R\0@\xECZ\0\0\0\0\0\x80h\x80\0\x8C\xD9\xB7\0\0\0\0\0P\xD9\xB7\0\0\0\0\0\x90Wr\0Pe\xEF\0\xE0\xEF\x01\x01\xC4\xE8B\x01\0\0\0\0\0\0\0\0`m2\0\x9C\x0C\x83\x01\xB4\xD1\x87\x01<\xD6\xAD\x03\0\0\0\0\0\0\0\0d\x85C\0\x80\xFEq\0\x80h\x80\0\0\0\0\0\x80ZR\0\0\0\0\0\\4B\0`9H\0\0\0\0\0\0\0\0\0\xE41b\0\x80Sh\0\0\0\0\0\xE41b\0\x80Sh\0\0\0\0\0l\x08\x99\x01\0\0\0\0\x80\xF6j\0\xF8\tv\0\0\t~\0\xCCsF\x01\0\0\0\0\0\xBC\xE8\0\0\0\0\0\0\0\0\0\0\0\0\0@IX\0\0\0\0\0\x84\r2\0 /8\0\0\0\0\0\0\0\0\0\xCC\x95\xCA\0\0\xA7\xD0\0\xAC\xBB\xE2\0\0\xBC\xE8\0\xCC\xE9*\x01\xE0Q6\x01\x8C\xDD:\x01\x80\x0FQ\x01\0\0\0\0\xF8\xAD\x0E\0\x9Cz\xCA\0\0\xA7\xD0\0\0\0\0\0\0\0\0\0TWr\0\xA0z\xC6\0\x88\xE8B\x01\xC4\xE8B\x01\0\0\0\0\0\0\0\0\xF8\xAD\x0E\0\x9Cz\xCA\0\0\xA7\xD0\0\0\0\0\0\0\0\0\0`N`\0\0\0\0\0\xF8ZR\0\0\xA7\xD0\0\0\0\0\0\xF8ZR\0|1\xAB\x01\x1C\xF6\xAF\x01\0\0\0\0\xF8ZR\0p[R\0\xA02Z\0 X\xB3\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xAC=R\0@IX\0\0\0\0\0\0\0\0\0\xAC\x89#\x01\0\0\0\0\xA4\xA8:\0\0\0\0\0@\x1F(\0\0\0\0\0\xC0\xC7,\0\x1C|\xB2\0\0\0\0\0\xCC\x95\xCA\0\0\xA7\xD0\0\xAC\xBB\xE2\0\0\xBC\xE8\0\0\0\0\0\x96\x1EK\0\0\0\0\0\x0C\xB1#\x01\0\0\0\0\xA0\x8Eg\0\0\0\0\0\0\0\0\0(1j\0\xA0Xp\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xC0r\x90\0\0\0\0\0\xF8\xAD\x0E\0\x9Cz\xCA\0\0\xA7\xD0\0\0\0\0\0\xF8\xAD\x0E\0\x9Cz\xCA\0\0\xA7\xD0\0\0\0\0\0\0\0\0\0\0\xA7\xD0\0\0\0\0\0`\xF1b\0\x80\xEA*\x01\0\0\0\0@\x9F>\0\xF4\x05B\0`9H\0\x92\x14\xA3\x01\0\0\0\0\0\0\0\0dnK\0\x80>P\0\0\0\0\0\0\0\0\0\xF8\xAD\x0E\0\x9Cz\xCA\0\0\xA7\xD0\0\0\0\0\0 \x1A \0h\xF6\x82\0\0\0\0\0L&\x9B\x01 \xEB\xA7\x01\0\0\0\0\0\0\0\0\0\0\0\0\xDCVr\0`\xCC\x1D\x01\x10\xE8B\x01L\xE8B\x01\0\0\0\0\0\0\0\0\09N\0@\x9C\xC8\0\0\0\0\0\09N\0@\x9C\xC8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xC0\x1Bn\x01\xE2\xF2\x83\x01\0\0\0\0\xE0@\x93\0\0\0\0\0\0\0\0\0\0\0\0\0\xE0H^\0\xA0Hb\0\x18Wr\0\x18{\xC6\0L\xE8B\x01\x88\xE8B\x01\0\0\0\0\x80CZ\0\xE0H^\0\xA0Hb\0\x18Wr\0\xB8\x89\x17\x01L\xE8B\x01\x88\xE8B\x01\0\0\0\0\xDCVr\0\xB8\x89\x17\x01\x10\xE8B\x01L\xE8B\x01`\xAF\xB2\x01\0\0\0\0\xE0H^\0\xA0Hb\0\x18Wr\08\xA0\xEA\0L\xE8B\x01\x88\xE8B\x01\0\0\0\0\x80CZ\0\xE0H^\0\xA0Hb\0\x18Wr\0\xB8\x89\x17\x01L\xE8B\x01\x88\xE8B\x01`\xAF\xB2\x01\0\0\0\0\x80CZ\0\xE0H^\0\xA0Hb\0\x18Wr\0\x98\xF2\xB0\0\x10\xE8B\x01L\xE8B\x01\x88\xE8B\x01\xC0\0\x89\x01\0\0\0\0\x80CZ\0\xE0H^\0\xA0Hb\0\x18Wr\0X|\xB2\0L\xE8B\x01\x88\xE8B\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@IX\0\0\0\0\0\xA0\xD6\xD3\0\xFE8\xD7\0>4#\x01\0\0\0\0\0,\x10\0\0\0\0\0\0\0\0\0\x90Wr\0|\xA0\xE2\0\x9Cd\xEF\0 \xD6\x08\x01\xC4\xE8B\x01\0\0\0\0 /8\0\0\0\0\0\x90Wr\0@\xA1\xD2\0@\"\xD9\0\0\r\xF2\0\x80\xD1\xF8\0\xC4\xE8B\x01\0\0\0\0`N`\0Hw\x9A\0\x806\xA3\0\xA0\xA6\xD6\0@\xC2\xDE\08\xF6W\x01X\xA1_\x01\0\0\0\0d\x85C\0\x80\xFEq\0\x80h\x80\0\x9C\x0C\x83\x01\xB4\xD1\x87\x01<\xD6\xAD\x03\0\0\0\0\x84\r2\0 /8\0\0\0\0\0\x90Wr\0\xC0\xB1\xD8\0\xC4\xE8B\x01\0\0\0\0\xA0\x8Eg\0\0\0\0\0\0\0\0\0\xA0\xB0\xBD\0\0\0\0\0\0\0\0\0\xA0\x8Eg\0\0\0\0\0\0\0\0\0\0\0\0\0@4@\0X\x06s\x01\0\0\0\0@4@\0\x1C\x06s\x01\0\0\0\0\x96\x1EK\0\0\0\0\0\xA4\xA8:\0\0\0\0\0\x80ZR\0\xE02V\0\0\0\0\0\0\0\0\0\0\0\0\0\x84J\x13\0\xA0\t\x1A\0\xC08R\0@IX\0\0\0\0\0\x8C\x867\x01\0\0\0\0\0\0\0\0\0\0\0\0T\xC8\xE2\0D\xC8\xF2\0\0[\xA3\x01\xD8\xF6\xA7\x01\0\0\0\0T\xC8\xE2\0D\xC8\xF2\0\xD8\xF6\xA7\x01\xC0\xA4\xA8\x01\0\0\0\0\x18-`\0xe\xE5\0\xC4Z\xA3\x01\0\0\0\0\0\xA7\xD0\0\x80\xC8\xF2\0\0\0\0\0\xC0r\x90\0\0\0\0\0D\xC8\xF2\0@\xEA\x01\x01\xC4Z\xA3\x01\0\0\0\0\x18-`\0x\x02g\0\xC4Z\xA3\x01\0\0\0\0\xC0r\x90\0\xC4Z\xA3\x01\0\0\0\0\0[\xA3\x01\0\0\0\0T\xC8\xE2\0D\xC8\xF2\0\xD8\xF6\xA7\x01\xC0\xA4\xA8\x01\0\0\0\0\0[\xA3\x01\0\0\0\0`$0\0\x1C\xF7\x82\0\xE0\xCB\xF8\0\0\0\0\0\0\0\0\0\x80L`\0\0\0\0\0\0\0\0\0 Y\xC2\0\x80\x96~\x01`\xB5\x7F\x01\0\0\0\0D\x01\xD8\0\0\0\0\0\0\0\0\0x\xAC&\08q)\0x5o\x01\xC08\x8D\x01\0\0\0\0\0\0\0\0\0\xB8\x1A\0\0\")\0\x8C\xE5Q\0\xD0\x8D\xB0\0\xC0j\xB6\0\xA0\x97\xB8\0\xC0\xB1\xD8\0$\x8A#\x01\0\0\0\0 /8\0\0\0\0\0\x80>P\0\0\0\0\0\x80h\x80\0\0\0\0\0\xD8\x1AI\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xB0\x9D\xC0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0x\x0Ei\x01\0\0\0\0\x04\x94\xA3\0\0\0\0\0\xA0\xDD\t\0\xB8G;\x01\0\0\0\0 /8\0\0\0\0\0 \xE7R\0\xA0m\x88\0\0\0\0\0`C\xE3\0\0\0\0\0\0\0\0\0\x80Yb\0\x80W\x82\0`\x0B\x85\0\0\0\0\0\xBC\r6\0\xDC{\xB6\0|\xA1\xD2\0\0\0\0\0 2b\0\xBC{\xB8\0P\0\0\0\0\0\x80L`\0\0\0\0\0\0\0\0\0\xA0\x8Eg\0\0\0\0\0\x80>P\0\0\0\0\0`9H\0\0\0\0\0\0\0\0\0dnK\0\x80>P\0\0\0\0\0\0\0\0\0\0\0\0\0\xE0]v\0\0\0\0\0\xCC\xF4z\0\xB0\x12\xF1\0\xE0\xFC\x99\x01\0\0\0\0\xBC9\x81\x01\x18?\x89\x01\0\0\0\0\x8C\x1C\x93\0\0\0\0\0\0\0\0\0\xCC%\xA3\x01 \xEB\xA7\x01\0\0\0\0\0\0\0\0`9H\08\x98j\x01T\xBE\x82\x01\0\0\0\0 \x82N\0`\xB7Q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xDCVr\0\x18\x0C\xAE\0\x10\xE8B\x01\0\0\0\0@\x04Q\x01\0\0\0\0@\xD82\0\xA0w\xF6\0\0\0\0\0L\xE8B\x01\x88\xE8B\x01\0\0\0\0<\xEA2\x01\0\0\0\0\0\xBC\xE8\0\x90\xF6w\x01\0\0\0\0\xE43B\0 #D\0\xE8\xF5l\0\xB8\x0Cw\0d\xC3\"\x01@\xF0(\x01\xBC\xE8J\x01\\\xEEJ\x01\x9C\x0Ec\x01<\x14c\x01\xE0\xA7v\x01\0\0\0\0\0\0\0\0\0\0\0\0d1L\0\0\0\0\0\0\0\0\0\x90Wr\0 \x93\xD3\0\xC4\xE8B\x01\0\0\0\0\x90Wr\08}\xA4\0@I\xB2\0\xC0?\xC3\x004?\xD7\0\xFC\xA0\xDA\0\xC4\xE8B\x01\xD8\x0Ec\x01\x18\xACg\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x000L)\0\xA0\xA4o\0\x94\xF7\x82\0\xD0\xF7\x82\0\0\0\0\0(\xAE\x1A\0\xB86 \0x\xAC&\0\xC8J)\0 \xEB \x01\0\0\0\0\xF4K)\0\xA0\xA4o\0X\xF7\x82\0\x94\xF7\x82\0\0\0\0\0\xA0\xAE\x1A\08\xD4 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\x15\x18\0\xA87 \08\xAC*\0\0\0\0\0\0\0\0\0(\xAE\x1A\0 \xEB \x01\0\0\0\0(\xAE\x1A\0 \xEB \x01\0\0\0\0|K)\0\xB8\xF6n\0\x1C\xF7\x82\0\0\0\0\0\xA4\xF6\x82\0x\xEB\"\x01\0\0\0\0\0\0\0\0(\xAE\x1A\0\xB86 \0x\xAC&\0\0\0\0\08\xAD\x1A\0\0\0\0\0\xA4\xEC\"\x01\0\0\0\0\x1C\xF7\x82\0\xF8\xD2o\x01\xD8\xF8\x87\x01\xF8\xA9\x89\x01\0\0\0\0\xE0\xEC\"\x01\0\0\0\0\xE0\xEC\"\x01\0\0\0\0\0\0\0\0(\xAE\x1A\0x\xEB\"\x01\xA4\xEC\"\x01\x98\xAF/\x01\0\0\0\x000L)\0\xA0\xA4o\0X\xF7\x82\0\xD0\xF7\x82\0\0\0\0\0\0\0\0\0\x1C\xF7\x82\0\0\0\0\0(\xAE\x1A\0x\xEB\"\x01\0\0\0\0(\xAE\x1A\0x\xEB\"\x01\xA4\xEC\"\x01\xD8t*\x01\0\0\0\0\xA4\xF6\x82\0x\xEB\"\x01\xA4\xEC\"\x01\x98\xAF/\x01\0\0\0\0x\xD5G\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0X\x86\x12\0\0\xE7'\0p6g\x01\0\0\0\0\x80CZ\0\xE0H^\0\xA0Hb\0L\xE8B\x01\0\0\0\0\x10\xE8B\x01L\xE8B\x01\0\0\0\0dnK\0\x80>P\0\0\0\0\0\0\0\0\0\xB4t0\x01\xD6\xD2s\x01\0\0\0\0\0\0\0\0\0\0\0\0 \xB4+\0\0\0\0\0P\x16\xB7\0\0\0\0\0\0\0\0\0\x18\xEBF\x01@\x04Q\x01\xEC/\x97\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0") }, unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"\x08\0\x08\x08 \0$\0\xE0\0\xE0\0\x08\x08\x08\0\x08\x08 \x08 \0 \x08\x18\x08 \0 \x08 \0\xE0\0\x08\0@\0X\0@\0X\0@\0X\0@\0X\0@\0X\0@\0X\0@\0X\0@\0X\0@\08\0(\08\0(\08\0P\x000\0(\0`\x08\xE8\x08\xE8\0\xE0\x08\xE0\0\xE8\0\0\0\xE8\0\x18\0\0\0\0\x108\0\0\08\0(\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xE8\x08\xE8\0\xE8\x08\xE0\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xE8\x08\xE8\0\xE8\x08\xE0\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xE8\0\xE0\0\xE8\x08\xE8\0\xE8\x08\xE0\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xE8\0\xE0\0\xE8\x08\xE8\0\xE8\x08\xE0\0\xE0\x08\xE0\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xE8\x08\xE8\0\xE8\x08\xE0\0\xE0\x08\xE0\0\xE8\x08\xE8\0\xE0\x08\xE8\0\xE0\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xE8\0\xE8\x08\xE0\0\xE0\x08\xE0\0\xE0\x08\xE0\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xE8\0\xE0\0\xE8\x08\xE8\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xE8\0\xE0\0\xE8\x08\xE8\0\xE8\x08\xE0\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xE8\x08\xE8\0\xE8\x08\xE0\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xE8\0\xE0\0\xE8\x08\xE8\0\xE8\x08\xE0\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xE8\0\xE0\0\xE8\x08\xE8\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xE8\0\xE0\0\xE8\x08\xE8\0\xA8\0\x08\x08\x08\0\x08\x08L\0L\x08L\0L\x08L\0L\x08P\0P\x08P\0L\0F\x08F\0P\x08P\0P\x08P\0P\x08P\0P\0T\x08T\0T\x04P\0P\x08P\x08@\x08@\0P\0P\x08\xE0\0 \x08 \0 \x08\x18\x08 \x08 \0\x08\0\x08\x08\xE0\x08\xE0\x000\x000\x080\0\x08\0\x08\x08\0\0\x10\0\x10\x08\x10\0\x10\x08 \0\x18\0\x10\0\x08\0\xE0\0\xE0\x08@\0\xE0\0\xE0\0\xE8\x08\xE8\0\xE8\x08\xE8\0\xE8\x08\xE8\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xE0\x08\xE0\0\xE0\x08\xE0\0\xE0\x08\xE0\0\xE0\x08\xE0\0\xD8\x08\xD8\0\xD8\x08\xD8\0\xE0\0\xD8\0\xF0\x08\xF0\0\xF0\x08\xF0\0\xF0\x08\xF0\0\xE8\x08\xE8\0\xE8\x08\xE8\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xE0\x08\xE0\0\xE8\x08\xE8\0\xE8\x08\xE8\0\xE8\x08\xE8\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xD8\x08\xD8\0\xE0\0\xD8\0\xE8\x08\xE8\0\xE8\x08\xE8\0\xE8\x08\xE8\0\xE8\x08\xE8\0\xE8\x08\xE8\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xE8\0\xD8\x08\xD8\0\xD8\x08,\x000\0\x10\0\x18\x08\x18\0\x18\x08\x10\x08\x10\0\x18\0\xD0\x08\xD0\0\xC8\0\xC8\x08\xC8\0\xC8\x08\xC0\x08\xC0\0\xC0\x08\xC8\0\xE0\0\xE0\x08\xE0\0\xE0\x08\xE0\x08\xE0\x10\xE0\x08\xE0\0\xE0\x08\xE0\x08\xE0\0\xE0\x08\xD8\x08\xD0\x08\xD8\x08\xE0\x08\xE0\0\xE0\x08\xE0\0\xE0\x08\xD0\x08\xD8\0\xD0\x08\xD0\0\xD8\0\xD0\x08\xD0\0\xE4\x08\xE4\x10\xE4\x08\xE4\0\xE4\x08\xD8\x08\xD8\0\xD8\x08\xC0\x08\xC0\0\xC0\x08\xD0\x08\xD0\0\xD0\x08\xE0\0\xC8\x08\xD0\0\xD8\0\xD0\0\xC8\x08\xB8\0\xC0\0\xC0\x08\xC8\0\xC0\x08\xC8\0\xD0\x08\xD8\0\xD0\x08\xC8\0\xC8\x08\xC0\x08\xC8\x08\xC0\0\xC0\x08\xC8\0\xC8\0\xD0\0\xD8\x004\0\x10\0\x08\0\x08\0\x08\0\x08\0\x08\x08\0\0\xAC\0\xB0\x04\xB0\0\xC8\x08\xD0\x08\xE0\x08\xE0\0\xE8\0\xE0\x08\x08\0@\x08@\x000\0\xD8\x08\xD8\0\xD0\x08\xD0\0\xD8\x08\xF0\0\xF8\08\0\x10\x08\x10\0\x10\x08\x18\0\x10\x08\x10\x08\x10\0\x10\x08\x08\0\x08\x08\x08\0\x08\x08\x08\0\x08\x08\x18\0\x08\0\x08\x08\xE0\0\xD8\x04\xD8\0\xE0\0\xD8\x08\xE0\0\0\x08\0\0\x08\x08\x08\0\0\x08\0\0\x08\0\xD8\0\xD0\x08\xD0\0\xD8\x08\xD8\0\x18\x08\x10\x08\x10\0\x18\x08\x10\x08\x10\x08\xF8\0\0\x08\0\0\0\x08\0\0\x18\0\0\x08\0\0\x08\0\x08\x08\0\0\0\x08\x08\x08\x08\0\x08\x08\x18\0\x10\x08\x10\0\x10\x08\x10\x08\x10\0\x10\x08`\x08`\0\xE0\0\xE8\x08\xE8\0\xE0\x08\xE8\0`\0X\0X\0P\0\0\0\0\x08\x08\x08\x08\0\x08\x08\x08\0\x10\x08\x10\0\x10\x08\x10\0\x10\x08\x10\0\x10\x08\x10\0\x10\x08\x08\0\0\x08\0\0\0\x08\xE0\0 \x08\x18\0 \x08\x18\x08 \0\xE8\0\x08\0\0\x08\0\0\0\x08\0\0\x08\0\x08\x08\xE8\0\xE8\x08\0\0\xE8\0\xE8\x08\xF0\0\xF0\x08\xF0\0\xF0\x08\xF0\0\xF8\x08\xF0\x08\xE0\x08\0\0\0\0\0\0\xE0\0\xE0\0\xE0\0\x08\0\x10\x08\x10\0\x10\x08\xF0\0\xD0\x08\xD0\0P\x08P\0\xF8\0\0\0\xE2\0\xE8\0\xE0\0\x10\x08\x10\0\x10\x08\x10\0\x10\x08@\x08@\0\xD0\x08\xD0\0\x08\0\x08\x08\xD8\x08\x08\x08\x08\0\x08\x08H\08\0@\0@\08\0\x08\0\0\x08\0\0\0\x08\x08\0\0\x08\0\0\0\x08,\0(\x000\0\x18\0\x18\x08\x18\0\x1C\0 \x08 \0\x1C\x08\x1C\0\0\0\x08\x08\x08\0\x08\x08\x10\x08\x08\0\0\x08\0\0\0\x08\xD8\0\xD8\x08\xD8\0\x10\x08\x10\0\x18\0H\0\x18\x000\x08(\x000\x08(\x080\08\0\xAB\0\xB0\0p\0\xA0\0\xA8\0h\0`\0\x18\0\xE0\0H\0D\0H\0H\x08H\0\x18\0\xD8\0(\x000\0(\x08(\0(\x08 \x08(\0(\0(\x080\0(\x08(\0(\x08 \x08(\x000\x080\x000\x08(\x080\0(\0(\x000\0(\x08(\0(\x08 \x08(\0(\0(\x080\0(\x08(\0(\x08 \x080\0(\0(\0(\x080\0(\x08(\x000\x08(\x08 \x080\0(\0(\0(\x080\0(\x08(\0(\x08 \x08(\08\0\x10\x08\xE0\0\x08\0\x08\x08,\x004\x000\0,\0\xFB\0\0\0\x10\0\x18\x08\x10\0\x08\x08\x10\0\x18\x08\x10\x08\x08\0\x08\x08\x18\x08\x10\x08\x10\0\x10\x08\x10\0\x18\x08\x10\x08\x10\0\x08\x08\x08\0\x10\0\x08\0\x10\0\x08\0\x10\0\0\x08\0\0\x08\0\0\x08\0\0\0\x08\0\0\x08\x08\x08\0\x08\x08\x18\x08\x10\0\x18\x08\x10\x08\x08\0\x08\x08\x18\0\xA0\0`\0`\0\x08\0\x08\x08\0\x004\x000\08\x088\08\0@\x08@\0@\x08@\0P\x08P\0\xE0\0\xE0\x08\xE0\0\0\0\xE0\0\x08\x08\x08\0\x08\x08\x08\0\x08\x08 \x08 \0(\0\x10\0\xD0\0\xD0\x08\xC8\x08\xC8\0\xD0\0\xD0\0\xD0\x08\xC8\x08\xD0\0\xC8\x08\xD0\0\xD8\0\xD0\x08\xD8\0\xC8\0\xC8\x08\xC8\0\xD0\0\xD0\x08\xD0\x08\xD0\0\xD0\x08\xD0\0\xD0\0\xD8\0\xD0\x08\xD0\0\xD0\0\xD0\x08\xD0\0\xC8\x08\xC8\0\xD0\0\xD0\x08\xC8\x08\xD0\0\xD0\x08\xC8\x08\xD0\0\xC0\0\xC0\x08\xC0\0\xC0\x08@\0<\0@\0\x10\0\x10\0\x08\x08\x08\0\x10\0X\x08X\0\x08\0\\\0\\\x08\\\0X\0X\x08\x08\0\xD0\0\xD8\0\xD0\x08\xD0\0\xD8\0\xD0\0\xD8\0\xD0\x08\xD0\0\x08\0\x08\x08\x08\0\x08\x08,\0.\0\\\0`\0\xA8\0`\x08f\x08 \0\xD8\0\xD8\x08\xD8\0\xB8\0\xB4\0\xB0\0P\0P\0X\0@\x08@\0(\0(\x08(\0\x08\0\x08\x08\xE0\0\xE8\0\xE8\x08\xBC\0\xC0\0\xE0\0\0\0\0\x08\0\0\0\x08\x08\0\0\x08\x08\x08\0\x08\xF8\0\xF8\x08\0\x08\xF8\x08H\0\xE0\0\xE8\0\xE0\x08\xE0\0\xE8\0 \0\x18\0 \0\x10\x08\x10\0\x10\x08\x10\0\x10\x08\x08\0\x08\x08 \x08 \0 \x08\x18\x08\x18\0 \0\x18\0 \08\x088\08\x080\x080\08\x000\08\0H\x08@\x08H\0P\0@\0H\0h\x08`\x08X\x08`\0X\0`\0X\x08P\x08X\0`\0P\0X\0@\x088\x08@\0H\0@\0\x18\x08\x10\x08\x10\0\x18\0\x10\0H\x08H\0P\x08H\x08@\x08P\0X\0P\0H\08\x080\x088\0@\08\0 \x08\x18\0 \x08\x18\x08\x10\x08 \0\x18\0 \0 \x08 \0 \x08\x18\x08\x18\0 \0\x18\0\x18\x08\x10\x08\x18\0 \0\x18\08\x080\x088\x000\08\x000\x08(\x080\08\x000\08\x088\08\x080\x080\08\x000\08\0`\x08X\x08`\0X\0`\0 \x08 \0 \x08\x18\x08\x18\0 \0\x18\0 \0X\x08P\x08X\0`\0X\08\x088\08\x080\x080\08\x000\08\0 \x08\x18\x08\x10\x08\x18\0 \0\x18\0 \0H\0X\x08P\x08X\0`\0X\0P\0X\x08X\0X\x08P\x08P\0X\0P\0X\0 \x08 \0 \x08\x18\x08\x18\0 \0\x18\0 \0\x18\0P\x08H\x08P\0X\0P\0(\x08 \x08(\x000\0(\0H\x08@\x08H\0P\0H\0\x10\0\x18\0X\0 \0\x10\x08\x10\0\x18\0\x10\0\x08\0\x08\x08<\0@\0\0\0\x08\0\x08\x08\x08\0\x08\x08\x08\0\x08\x08\0\0\x08\x08\x08\0\x08\x08\0\0\x18\0\xE4\0\xE8\0\x10\x08\x10\0\x18\0\x10\0\0\0\x08\0\0\0\xD0\x08\xD0\0\xE0\0\x10\x08\x10\0\x18\0\x10\0\xD8\0\xD8\x08\xE0\0\xD8\x08\x08\0\x08\x08\x08\0(\0\0\08\x000\x08(\x080\x08(\0\xA8\0h\0H\0@\0H\0(\x08 \x08(\0\x08\x08\x08\0h\0h\x08h\0\x10\x08\x10\0\x18\x08\x18\0\x10\x08\x10\0\x10\x08\x10\0\x10\x08\x10\0\x10\x08\x18\0\xE0\0`\0@\x08@\0\x18\0\x18\x08\x10\x08\x18\x08\x10\x08\x18\x08\x18\0\x10\0\x10\x08\x18\x08\x18\0\x18\x08\x10\x08 \0\x18\0\x18\0`\0\xA8\0\xA8\x08\xB0\0\xB0\x08\xA8\x08\xB0\x08\xD8\x08\xD8\0\xD0\x08\xD8\x08\xD8\0\xD8\x08\xB0\x08\xB8\0\xB8\x08\xB0\x08\xB8\x08\xC8\x08\xC8\0\xC8\x08\xD0\x08\xC8\x08\xD8\0\xD8\x08\xD8\0\xD8\x08\xB0\0\xD8\x08\xD8\0\xD8\x08\xD8\x08\xD8\0\xD8\x08\xC0\x08\xC0\0\xC0\x08\xB8\x08\xD0\x08\xD8\0\xD0\x08\xC0\x08\xD8\x08\xD8\0\xD0\x08\xD8\x08\xD8\0\xD0\x08\xD0\x08\xD8\x08\xC0\x08\xC0\0\xB8\x08\xC0\0\xB8\x08\xC8\x08\xD0\x08\xC8\x08\xD0\x08\xD8\x08\xD8\x08\xD8\0\xD0\x08\xD0\0\xD8\x08\xA8\x08\xB8\0\xB8\x08\xA8\x08\xB8\x08\xC8\0\xC0\x08\xB8\x08\xD8\x08\xD8\0\xD0\x08\xD8\x08\xD8\0\xD0\x08\xD0\0\xD8\x08\xD0\x08\xD8\0\xD0\x08\xD0\0\xD8\x08\xC8\x08\xD0\x08\xB8\x08\0\0\x08\0\x10\0\x18\0 \0(\x000\08\0@\0H\0P\0X\0`\0h\0p\0\xF8\0\xF0\0\xE8\0\xE0\0\xD8\0\xD0\0\xC8\0\xC0\0\xB8\0\xB0\0\xA8\0\xA0\0\xE8\x08\xE8\0\xE8\x08\xE8\0(\0(\x080\0(\x08(\x000\x08(\x08(\0\x08\x08\x08\0\x08\x08\xE0\0\xE0\0\xDC\0\xE0\0\xE0\0\xE0\0@\08\0X\x08X\0`\0\xA8\x08\xA8\0h\x08h\0\x18\0\x18\0\x10\0\x10\0\x10\0") }) }); } #[clippy::msrv = "1.81"] - impl icu_provider::DataProvider for $provider { - fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> { + impl icu_provider::DataProvider for $provider { + fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> { if req.id.locale.is_default() { Ok(icu_provider::DataResponse { payload: icu_provider::DataPayload::from_static_ref(Self::SINGLETON_ZONE_OFFSET_PERIOD_V1), metadata: icu_provider::DataResponseMetadata::default() }) } else { - Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) + Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) } } } @@ -35,7 +35,7 @@ macro_rules! __impl_zone_offset_period_v1 { ($ provider : ty , ITER) => { __impl_zone_offset_period_v1!($provider); #[clippy::msrv = "1.81"] - impl icu_provider::IterableDataProvider for $provider { + impl icu_provider::IterableDataProvider for $provider { fn iter_ids(&self) -> Result>, icu_provider::DataError> { Ok([Default::default()].into_iter().collect()) } @@ -44,12 +44,12 @@ macro_rules! __impl_zone_offset_period_v1 { ($ provider : ty , DRY) => { __impl_zone_offset_period_v1!($provider); #[clippy::msrv = "1.81"] - impl icu_provider::DryDataProvider for $provider { + impl icu_provider::DryDataProvider for $provider { fn dry_load(&self, req: icu_provider::DataRequest) -> Result { if req.id.locale.is_default() { Ok(icu_provider::DataResponseMetadata::default()) } else { - Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) + Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) } } } @@ -57,17 +57,17 @@ macro_rules! __impl_zone_offset_period_v1 { ($ provider : ty , DRY , ITER) => { __impl_zone_offset_period_v1!($provider); #[clippy::msrv = "1.81"] - impl icu_provider::DryDataProvider for $provider { + impl icu_provider::DryDataProvider for $provider { fn dry_load(&self, req: icu_provider::DataRequest) -> Result { if req.id.locale.is_default() { Ok(icu_provider::DataResponseMetadata::default()) } else { - Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) + Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) } } } #[clippy::msrv = "1.81"] - impl icu_provider::IterableDataProvider for $provider { + impl icu_provider::IterableDataProvider for $provider { fn iter_ids(&self) -> Result>, icu_provider::DataError> { Ok([Default::default()].into_iter().collect()) } diff --git a/provider/data/timezone/fingerprints.csv b/provider/data/time/fingerprints.csv similarity index 100% rename from provider/data/timezone/fingerprints.csv rename to provider/data/time/fingerprints.csv diff --git a/provider/data/timezone/src/lib.rs b/provider/data/time/src/lib.rs similarity index 94% rename from provider/data/timezone/src/lib.rs rename to provider/data/time/src/lib.rs index 559923d7153..a3a6b535ff5 100644 --- a/provider/data/timezone/src/lib.rs +++ b/provider/data/time/src/lib.rs @@ -2,7 +2,7 @@ // called LICENSE at the top level of the ICU4X source tree // (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). -//! Data for the `icu_timezone` crate +//! Data for the `icu_time` crate //! //! This data was generated with CLDR version 47.0.0-ALPHA1, ICU version icu4x/2024-12-16/76.x, and //! LSTM segmenter version v0.1.0. diff --git a/provider/data/time/stubdata/bcp47_to_iana_map_v1.rs.data b/provider/data/time/stubdata/bcp47_to_iana_map_v1.rs.data new file mode 100644 index 00000000000..41fcce42851 --- /dev/null +++ b/provider/data/time/stubdata/bcp47_to_iana_map_v1.rs.data @@ -0,0 +1,77 @@ +// @generated +/// Implement `DataProvider` on the given struct using the data +/// hardcoded in this file. This allows the struct to be used with +/// `icu`'s `_unstable` constructors. +/// +/// Using this implementation will embed the following data in the binary's data segment: +/// * 7622B[^1] for the singleton data struct +/// +/// [^1]: these numbers can be smaller in practice due to linker deduplication +#[doc(hidden)] +#[macro_export] +macro_rules! __impl_bcp47_to_iana_map_v1 { + ($ provider : ty) => { + #[clippy::msrv = "1.81"] + const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO; + #[clippy::msrv = "1.81"] + impl $provider { + #[doc(hidden)] + pub const SINGLETON_BCP47_TO_IANA_MAP_V1: &'static ::DataStruct = &icu::time::provider::names::Bcp47ToIanaMap { canonical_iana_ids: unsafe { zerovec::vecs::VarZeroVec16::from_bytes_unchecked(b"\xBD\x01\x0E\0\x18\0\"\x001\0A\0N\0Z\0i\0v\0\x86\0\x96\0\xAF\0\xC0\0\xD2\0\xE3\0\xF5\0\x05\x01\x15\x01&\x01D\x01]\x01x\x01\x92\x01\xA9\x01\xC3\x01\xDC\x01\xFA\x01\x11\x02*\x02D\x02]\x02n\x02{\x02\x8D\x02\xA2\x02\xB4\x02\xC4\x02\xD3\x02\xE3\x02\xF5\x02\x08\x03\x1B\x03/\x03>\x03N\x03[\x03d\x03s\x03\x83\x03\x8D\x03\x9C\x03\xAE\x03\xBA\x03\xC6\x03\xD6\x03\xE7\x03\xF7\x03\x02\x04\x10\x04\"\x043\x04@\x04Q\x04_\x04s\x04\x83\x04\x92\x04\xA3\x04\xB1\x04\xBF\x04\xD2\x04\xE4\x04\xF2\x04\x03\x05\x10\x05 \x05.\x05:\x05I\x05U\x05c\x05r\x05\x82\x05\x95\x05\xA6\x05\xB7\x05\xC6\x05\xD5\x05\xE4\x05\xF4\x05\x02\x06\x12\x06!\x062\x06B\x06V\x06k\x06y\x06\x8D\x06\xA1\x06\xAF\x06\xC1\x06\xD6\x06\xE6\x06\xF2\x06\x03\x07\x12\x07\x1F\x071\x07>\x07L\x07]\x07k\x07\x7F\x07\x8F\x07\x9C\x07\xA9\x07\xB4\x07\xC2\x07\xD4\x07\xE2\x07\xF5\x07\x05\x08\x13\x08\x1F\x08,\x089\x08H\x08W\x08h\x08x\x08\x8D\x08\x9B\x08\xAC\x08\xBD\x08\xCB\x08\xD7\x08\xE6\x08\xF3\x08\xFF\x08\x0E\t\x1B\t-\t<\tL\tX\th\tv\t\x85\t\x92\t\xA0\t\xAC\t\xBD\t\xC6\t\xD3\t\xE2\t\xEE\t\xFD\t\x0C\n\x18\n(\n<\nH\n\\\ni\nv\n}\n\x8B\n\x9D\n\xAC\n\xC1\n\xCE\n\xDB\n\xF1\n\x02\x0B\x0E\x0B\x1B\x0B)\x0B4\x0BB\x0BU\x0Bb\x0Bx\x0B\x87\x0B\x94\x0B\xA0\x0B\xAD\x0B\xBB\x0B\xC8\x0B\xDA\x0B\xE6\x0B\xF3\x0B\xFF\x0B\n\x0C\x1C\x0C'\x0C5\x0CB\x0CQ\x0C[\x0Ce\x0Cs\x0C\x7F\x0C\x8E\x0C\xA0\x0C\xAE\x0C\xBC\x0C\xC9\x0C\xD9\x0C\xE7\x0C\xF1\x0C\xFC\x0C\n\r\x14\r\x1F\r*\r5\rB\rP\rY\rg\rr\r\x82\r\x8E\r\x9A\r\xA9\r\xB6\r\xC4\r\xD5\r\xE0\r\xEE\r\xFF\r\x0C\x0E\x1B\x0E+\x0E>\x0EO\x0E]\x0Ej\x0Ew\x0E\x82\x0E\x8B\x0E\x9B\x0E\xA5\x0E\xB3\x0E\xC5\x0E\xD6\x0E\xE8\x0E\xF4\x0E\x04\x0F\x13\x0F\"\x0F3\x0FH\x0FV\x0Fh\x0Fy\x0F\x8C\x0F\x9A\x0F\xAB\x0F\xBB\x0F\xCA\x0F\xE0\x0F\xEF\x0F\xFB\x0F\x0C\x10\x19\x10(\x106\x10C\x10R\x10^\x10m\x10}\x10\x88\x10\x96\x10\xA3\x10\xAF\x10\xBF\x10\xCE\x10\xD9\x10\xE7\x10\xF3\x10\x02\x11\x13\x11!\x115\x11I\x11T\x11`\x11m\x11}\x11\x8D\x11\xA0\x11\xB0\x11\xBD\x11\xCC\x11\xD9\x11\xE9\x11\xF3\x11\x01\x12\x11\x12 \x120\x12<\x12F\x12Q\x12]\x12i\x12{\x12\x88\x12\x98\x12\xA5\x12\xB1\x12\xBE\x12\xCF\x12\xD8\x12\xE8\x12\xF6\x12\x04\x13\x16\x13 \x130\x13=\x13J\x13Z\x13j\x13|\x13\x88\x13\x95\x13\xA0\x13\xB3\x13\xBE\x13\xCD\x13\xDD\x13\xEB\x13\xFD\x13\r\x14 \x141\x14@\x14Q\x14]\x14m\x14\x7F\x14\x8A\x14\x99\x14\xAC\x14\xC1\x14\xCE\x14\xDC\x14\xEE\x14\xFD\x14\r\x15\x18\x15$\x151\x15@\x15I\x15V\x15b\x15s\x15\x82\x15\x97\x15\xA7\x15\xB2\x15\xC6\x15\xD1\x15\xE2\x15\xF0\x15\xFC\x15\n\x16\x16\x16-\x16>\x16K\x16Z\x16h\x16w\x16\x87\x16\xA3\x16\xB8\x16\xC6\x16\xDA\x16\xED\x16\x08\x17\x19\x174\x17F\x17a\x17\x7F\x17\x8F\x17\xA8\x17\xB4\x17\xC3\x17\xD0\x17\xE9\x17\0\x18\x1A\x185\x18D\x18K\x18T\x18]\x18f\x18o\x18x\x18\x81\x18\x8A\x18\x93\x18\x9C\x18\xA6\x18\xB0\x18\xBA\x18\xC4\x18\xCE\x18\xD7\x18\xE0\x18\xE9\x18\xF2\x18\xFB\x18\x04\x19\r\x19\x16\x19\x1F\x19)\x193\x19=\x19O\x19]\x19j\x19x\x19\x8A\x19\x99\x19\xA8\x19\xB9\x19\xC9\x19\xD6\x19\xE4\x19\xF0\x19\xF9\x19\x07\x1A\x1A\x1A'\x1AEurope/AndorraAsia/DubaiAsia/KabulAmerica/AntiguaAmerica/AnguillaEurope/TiraneAsia/YerevanAmerica/CuracaoAfrica/LuandaAntarctica/CaseyAntarctica/DavisAntarctica/DumontDUrvilleAntarctica/MawsonAntarctica/McMurdoAntarctica/PalmerAntarctica/RotheraAntarctica/SyowaAntarctica/TrollAntarctica/VostokAmerica/Argentina/Buenos_AiresAmerica/Argentina/CordobaAmerica/Argentina/CatamarcaAmerica/Argentina/La_RiojaAmerica/Argentina/JujuyAmerica/Argentina/San_LuisAmerica/Argentina/MendozaAmerica/Argentina/Rio_GallegosAmerica/Argentina/SaltaAmerica/Argentina/TucumanAmerica/Argentina/San_JuanAmerica/Argentina/UshuaiaPacific/Pago_PagoEurope/ViennaAustralia/AdelaideAustralia/Broken_HillAustralia/BrisbaneAustralia/DarwinAustralia/EuclaAustralia/HobartAustralia/LindemanAustralia/Lord_HoweAustralia/MelbourneAntarctica/MacquarieAustralia/PerthAustralia/SydneyAmerica/ArubaAsia/BakuEurope/SarajevoAmerica/BarbadosAsia/DhakaEurope/BrusselsAfrica/OuagadougouEurope/SofiaAsia/BahrainAfrica/BujumburaAfrica/Porto-NovoAtlantic/BermudaAsia/BruneiAmerica/La_PazAmerica/KralendijkAmerica/AraguainaAmerica/BelemAmerica/Boa_VistaAmerica/CuiabaAmerica/Campo_GrandeAmerica/EirunepeAmerica/NoronhaAmerica/FortalezaAmerica/ManausAmerica/MaceioAmerica/Porto_VelhoAmerica/Rio_BrancoAmerica/RecifeAmerica/Sao_PauloAmerica/BahiaAmerica/SantaremAmerica/NassauAsia/ThimphuAfrica/GaboroneEurope/MinskAmerica/BelizeAmerica/CrestonAmerica/EdmontonAmerica/Fort_NelsonAmerica/Glace_BayAmerica/Goose_BayAmerica/HalifaxAmerica/IqaluitAmerica/MonctonAmerica/ResoluteAmerica/ReginaAmerica/St_JohnsAmerica/TorontoAmerica/VancouverAmerica/WinnipegAmerica/Blanc-SablonAmerica/Cambridge_BayAmerica/DawsonAmerica/Dawson_CreekAmerica/Rankin_InletAmerica/InuvikAmerica/WhitehorseAmerica/Swift_CurrentAmerica/AtikokanIndian/CocosAfrica/LubumbashiAfrica/KinshasaAfrica/BanguiAfrica/BrazzavilleEurope/ZurichAfrica/AbidjanPacific/RarotongaPacific/EasterAmerica/Punta_ArenasAmerica/SantiagoAfrica/DoualaAsia/ShanghaiAsia/UrumqiAmerica/BogotaAmerica/Costa_RicaAmerica/HavanaAtlantic/Cape_VerdeIndian/ChristmasAsia/FamagustaAsia/NicosiaEurope/PragueEurope/BerlinEurope/BusingenAfrica/DjiboutiEurope/CopenhagenAmerica/DominicaAmerica/Santo_DomingoAfrica/AlgiersPacific/GalapagosAmerica/GuayaquilEurope/TallinnAfrica/CairoAfrica/El_AaiunAfrica/AsmaraAfrica/CeutaAtlantic/CanaryEurope/MadridAfrica/Addis_AbabaEurope/HelsinkiEurope/MariehamnPacific/FijiAtlantic/StanleyPacific/KosraePacific/PohnpeiPacific/ChuukAtlantic/FaroeEurope/ParisAfrica/LibrevilleAsia/GazaEurope/LondonAmerica/GrenadaAsia/TbilisiAmerica/CayenneEurope/GuernseyAfrica/AccraEurope/GibraltarAmerica/DanmarkshavnAmerica/NuukAmerica/ScoresbysundAmerica/ThuleAfrica/BanjulEtc/GMTAfrica/ConakryAmerica/GuadeloupeAmerica/MarigotAmerica/St_BarthelemyAfrica/MalaboEurope/AthensAtlantic/South_GeorgiaAmerica/GuatemalaPacific/GuamAfrica/BissauAmerica/GuyanaAsia/HebronAsia/Hong_KongAmerica/TegucigalpaEurope/ZagrebAmerica/Port-au-PrinceEurope/BudapestAsia/JayapuraAsia/JakartaAsia/MakassarAsia/PontianakEurope/DublinEurope/Isle_of_ManAsia/KolkataIndian/ChagosAsia/BaghdadAsia/TehranAtlantic/ReykjavikEurope/RomeAsia/JerusalemEurope/JerseyAmerica/JamaicaAsia/AmmanAsia/TokyoAfrica/NairobiAsia/BishkekAsia/Phnom_PenhPacific/KiritimatiPacific/KantonPacific/TarawaIndian/ComoroAmerica/St_KittsAsia/PyongyangAsia/SeoulAsia/KuwaitAmerica/CaymanAsia/AqtauAsia/AqtobeAsia/AlmatyAsia/AtyrauAsia/QostanayAsia/QyzylordaAsia/OralAsia/VientianeAsia/BeirutAmerica/St_LuciaEurope/VaduzAsia/ColomboAfrica/MonroviaAfrica/MaseruEurope/VilniusEurope/LuxembourgEurope/RigaAfrica/TripoliAfrica/CasablancaEurope/MonacoEurope/ChisinauEurope/PodgoricaIndian/AntananarivoPacific/KwajaleinPacific/MajuroEurope/SkopjeAfrica/BamakoAsia/YangonAsia/HovdAsia/UlaanbaatarAsia/MacauPacific/SaipanAmerica/MartiniqueAfrica/NouakchottAmerica/MontserratEurope/MaltaIndian/MauritiusIndian/MaldivesAfrica/BlantyreAmerica/ChihuahuaAmerica/Ciudad_JuarezAmerica/CancunAmerica/HermosilloAmerica/MatamorosAmerica/Mexico_CityAmerica/MeridaAmerica/MonterreyAmerica/MazatlanAmerica/OjinagaAmerica/Bahia_BanderasAmerica/TijuanaAsia/KuchingAsia/Kuala_LumpurAfrica/MaputoAfrica/WindhoekPacific/NoumeaAfrica/NiameyPacific/NorfolkAfrica/LagosAmerica/ManaguaEurope/AmsterdamEurope/OsloAsia/KathmanduPacific/NauruPacific/NiuePacific/AucklandPacific/ChathamAsia/MuscatAmerica/PanamaAmerica/LimaPacific/GambierPacific/MarquesasPacific/TahitiPacific/Port_MoresbyPacific/BougainvilleAsia/ManilaAsia/KarachiEurope/WarsawAmerica/MiquelonPacific/PitcairnAmerica/Puerto_RicoAtlantic/MadeiraEurope/LisbonAtlantic/AzoresPacific/PalauAmerica/AsuncionAsia/QatarIndian/ReunionEurope/BucharestEurope/BelgradeEurope/AstrakhanAsia/BarnaulAsia/ChitaAsia/AnadyrAsia/MagadanAsia/IrkutskEurope/KaliningradAsia/KhandygaAsia/KrasnoyarskEurope/SamaraEurope/KirovEurope/MoscowAsia/NovokuznetskAsia/OmskAsia/NovosibirskAsia/KamchatkaEurope/SaratovAsia/SrednekolymskAsia/TomskEurope/UlyanovskAsia/Ust-NeraAsia/SakhalinEurope/VolgogradAsia/VladivostokAsia/YekaterinburgAsia/YakutskAfrica/KigaliAsia/RiyadhPacific/GuadalcanalIndian/MaheAfrica/KhartoumEurope/StockholmAsia/SingaporeAtlantic/St_HelenaEurope/LjubljanaArctic/LongyearbyenEurope/BratislavaAfrica/FreetownEurope/San_MarinoAfrica/DakarAfrica/MogadishuAmerica/ParamariboAfrica/JubaAfrica/Sao_TomeAmerica/El_SalvadorAmerica/Lower_PrincesAsia/DamascusAfrica/MbabaneAmerica/Grand_TurkAfrica/NdjamenaIndian/KerguelenAfrica/LomeAsia/BangkokAsia/DushanbePacific/FakaofoAsia/DiliAsia/AshgabatAfrica/TunisPacific/TongatapuEurope/IstanbulAmerica/Port_of_SpainPacific/FunafutiAsia/TaipeiAfrica/Dar_es_SalaamEurope/KyivEurope/SimferopolAfrica/KampalaPacific/WakePacific/MidwayAmerica/AdakAmerica/Indiana/MarengoAmerica/AnchorageAmerica/BoiseAmerica/ChicagoAmerica/DenverAmerica/DetroitPacific/HonoluluAmerica/Indiana/IndianapolisAmerica/Indiana/VevayAmerica/JuneauAmerica/Indiana/KnoxAmerica/Los_AngelesAmerica/Kentucky/LouisvilleAmerica/MenomineeAmerica/Kentucky/MonticelloAmerica/MetlakatlaAmerica/North_Dakota/CenterAmerica/North_Dakota/New_SalemAmerica/New_YorkAmerica/Indiana/VincennesAmerica/NomeAmerica/PhoenixAmerica/SitkaAmerica/Indiana/Tell_CityAmerica/Indiana/WinamacAmerica/Indiana/PetersburgAmerica/North_Dakota/BeulahAmerica/YakutatEtc/UTCEtc/GMT-1Etc/GMT-2Etc/GMT-3Etc/GMT-4Etc/GMT-5Etc/GMT-6Etc/GMT-7Etc/GMT-8Etc/GMT-9Etc/GMT-10Etc/GMT-11Etc/GMT-12Etc/GMT-13Etc/GMT-14Etc/GMT+1Etc/GMT+2Etc/GMT+3Etc/GMT+4Etc/GMT+5Etc/GMT+6Etc/GMT+7Etc/GMT+8Etc/GMT+9Etc/GMT+10Etc/GMT+11Etc/GMT+12America/MontevideoAsia/SamarkandAsia/TashkentEurope/VaticanAmerica/St_VincentAmerica/CaracasAmerica/TortolaAmerica/St_ThomasAsia/Ho_Chi_MinhPacific/EfatePacific/WallisPacific/ApiaAsia/AdenIndian/MayotteAfrica/JohannesburgAfrica/LusakaAfrica/Harare") } }; + #[doc(hidden)] + pub const SINGLETON_BCP47_TO_IANA_MAP_V1_CHECKSUM: u64 = 1359598211242524719u64; + } + #[clippy::msrv = "1.81"] + impl icu_provider::DataProvider for $provider { + fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> { + if req.id.locale.is_default() { + Ok(icu_provider::DataResponse { payload: icu_provider::DataPayload::from_static_ref(Self::SINGLETON_BCP47_TO_IANA_MAP_V1), metadata: icu_provider::DataResponseMetadata::default().with_checksum(Self::SINGLETON_BCP47_TO_IANA_MAP_V1_CHECKSUM) }) + } else { + Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) + } + } + } + }; + ($ provider : ty , ITER) => { + __impl_bcp47_to_iana_map_v1!($provider); + #[clippy::msrv = "1.81"] + impl icu_provider::IterableDataProvider for $provider { + fn iter_ids(&self) -> Result>, icu_provider::DataError> { + Ok([Default::default()].into_iter().collect()) + } + } + }; + ($ provider : ty , DRY) => { + __impl_bcp47_to_iana_map_v1!($provider); + #[clippy::msrv = "1.81"] + impl icu_provider::DryDataProvider for $provider { + fn dry_load(&self, req: icu_provider::DataRequest) -> Result { + if req.id.locale.is_default() { + Ok(icu_provider::DataResponseMetadata::default().with_checksum(Self::SINGLETON_BCP47_TO_IANA_MAP_V1_CHECKSUM)) + } else { + Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) + } + } + } + }; + ($ provider : ty , DRY , ITER) => { + __impl_bcp47_to_iana_map_v1!($provider); + #[clippy::msrv = "1.81"] + impl icu_provider::DryDataProvider for $provider { + fn dry_load(&self, req: icu_provider::DataRequest) -> Result { + if req.id.locale.is_default() { + Ok(icu_provider::DataResponseMetadata::default().with_checksum(Self::SINGLETON_BCP47_TO_IANA_MAP_V1_CHECKSUM)) + } else { + Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) + } + } + } + #[clippy::msrv = "1.81"] + impl icu_provider::IterableDataProvider for $provider { + fn iter_ids(&self) -> Result>, icu_provider::DataError> { + Ok([Default::default()].into_iter().collect()) + } + } + }; +} +#[doc(inline)] +pub use __impl_bcp47_to_iana_map_v1 as impl_bcp47_to_iana_map_v1; diff --git a/provider/data/time/stubdata/iana_to_bcp47_map_v3.rs.data b/provider/data/time/stubdata/iana_to_bcp47_map_v3.rs.data new file mode 100644 index 00000000000..149fc53bb71 --- /dev/null +++ b/provider/data/time/stubdata/iana_to_bcp47_map_v3.rs.data @@ -0,0 +1,77 @@ +// @generated +/// Implement `DataProvider` on the given struct using the data +/// hardcoded in this file. This allows the struct to be used with +/// `icu`'s `_unstable` constructors. +/// +/// Using this implementation will embed the following data in the binary's data segment: +/// * 9543B[^1] for the singleton data struct +/// +/// [^1]: these numbers can be smaller in practice due to linker deduplication +#[doc(hidden)] +#[macro_export] +macro_rules! __impl_iana_to_bcp47_map_v3 { + ($ provider : ty) => { + #[clippy::msrv = "1.81"] + const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO; + #[clippy::msrv = "1.81"] + impl $provider { + #[doc(hidden)] + pub const SINGLETON_IANA_TO_BCP47_MAP_V3: &'static ::DataStruct = &icu::time::provider::names::IanaToBcp47Map { map: zerotrie::ZeroAsciiIgnoreCaseTrie { store: unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"\xE1i_ABCEIMPU\x01\x10\x10\x11\x14\x14\x14\x16TW~\x13C\xB5\xD8\x8D\xE1qCEGHIJKLMNPRSTUWZ\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\x01\x141Zi\x80\x8F\x99\x9F\xAF\xC2\xE2\xEB\xF5\xFC\x11\x1C\xC3ESu\x03\nT\x90TT6CDT\x95`ba\x91`\xC4EgiS\x03\x08\x0CT\x92Hypt\x92\0re\x92hT\x94\"5EDT\x95~\xC3BMr\t\x1A\x92$-Eire\x92$T\x92<\xC3+-0\x03\x060\x92<0\x92<\x92C\x91XT8PDT\x95pO\xC2CK\x02\x95J\x93\x14ingapore\x95\x0Eurkey\x95D\xC3CnT\x03\x0CT\x96\x12iversal\x96\x12C\x96\x12\xC2-E\x04SU\x94dT\x94>ulu\x96\x12\xE1gfmnrstu\x02\t\t\t\r\x0E*+\xAC\xBF\x83\trica/\xE1rABCDEFGHJKLMNOPSTW\0\0\0\0\0\0\0\0\0\x01\x01\x01\x01\x01\x01\x01\x015v\x99\xC1\xCA\xD3\xDC\xE3\xF7\x1CP\x85\xAC\xB8\xC3\xCC\xE6\xC5bcdls\x07\x0C\x17\x1Eidjan\x91Mcra\x92/dis_Ababa\x92\rgiers\x91ym\xC2ae\x04ra\x92\x05ra\x92\x04\xC5ailru\x15\x1B#.\xC2mn\x05ako\x93O\xC2gj\x04ui\x91Gul\x92;ssau\x92Qantyre\x93gazzaville\x91Ijumbura\x90]\xC3aeo\x11\x16\xC2is\x04ro\x92\x01ablanca\x93?uta\x92\x07nakry\x92?\xC3ajo\x14\x1C\xC2kr\x04ar\x95\x1D_es_Salaam\x95Mibouti\x91quala\x91Wl_Aaiun\x92\x03reetown\x95\x19aborone\x91\rarare\x96i\xC2ou\x0Channesburg\x96eba\x95#\xC3ahi\x07\x0Fmpala\x95Sartoum\x95\x0B\xC2gn\x05ali\x95\x03shasa\x91E\xC4aiou\x05\x0F\x13gos\x94\x0Fbreville\x92!me\x955\xC3abs\x05\x0Enda\x90\x01umbashi\x91Caka\x96g\xC3abo\x15\x1C\xC3lps\x05\nabo\x92Guto\x94\x05eru\x935abane\x95-\xC2gn\x08adishu\x95\x1Frovia\x933\xC4adio\x07\x0F\x15irobi\x93\x03jamena\x951amey\x94\x0Buakchott\x93]uagadougou\x90Worto-Novo\x90_ao_Tome\x95%\xC3iru\x08\x0Fmbuktu\x93Nipoli\x93=nis\x95Aindhoek\x94\x07erica/\xE1vABCDEFGHIJKLMNOPRSTVWY\0\x01\x01\x02\x02\x02\x02\x02\x03\x03\x03\x03\x04\x04\x04\x05\x05\x06\x06\x06\x06\xE5D\xE7 Ki\xC4\xE1Zr\xAA\xDF\x85\xDF\xE7Z\xA3@z\x8D\xA3\xC5dnrst\x04\x1D\xC5\xCDak\x95Y\xC3cgt\x08\x0Ehorage\x95]uilla\x89igua\x87\xC3agu\x08\x9Eguaina\x90ientina/\xC9BCJLMRSTU\r17@HUmuuenos_Aires\x90\x17\xC2ao\ttamarca\x90\x1B\xC2mr\rodRivadavia\x90\x1Adoba\x90\x19ujuy\x90\x1Fa_Rioja\x90\x1Dendoza\x90#io_Gallegos\x90%a\xC2ln\x04ta\x90'_\xC2JL\x05uan\x90+uis\x90!ucuman\x90)shuaia\x90-ba\x90Kuncion\x94E\xC2ik\x07kokan\x91?a\x95X\xC5aelou\x1A&2I\xC2hr\x0Fia\x91\x05_Banderas\x93}bados\x90Ql\xC2ei\x03m\x90kze\x91\x11anc-Sablon\x91/\xC3agi\x08\r_Vista\x90mota\x91]se\x95_enos_Aires\x90\x16\xC6ahioruCTa\x82\x89\xC5mnrty\x19\x1E$,\xC2bp\x0Bridge_Bay\x911o_Grande\x90qcun\x93macas\x96Samarca\x90\x1A\xC2em\x05nne\x92+an\x93\x19i\xC2ch\x05ago\x95auahua\x93iudad_Juarez\x93k\xC2rs\x14\xC2ad\x0Bl_Harbour\x91>oba\x90\x18ta_Rica\x91_eston\x91\x13\xC2ir\x05aba\x90oacao\x8F\xC3aeo\x1C+\xC2nw\x0Bmarkshavn\x923son\x913_Creek\x915\xC2nt\x05ver\x95croit\x95eminica\x91u\xC4diln\x08\x10\x1Bmonton\x91\x15runepe\x90s_Salvador\x95'senada\x93~ort\xC2_a\x11\xC2NW\x07elson\x91\x17ayne\x95hleza\x90w\xC4loru\t\x1B.ace_Bay\x91\x19\xC2do\x06thab\x924se_Bay\x91\x1B\xC2ae\tnd_Turk\x95/nada\x92'\xC2ay\x1C\xC3dty\x08\x0Feloupe\x92Aemala\x92Maquil\x91}ana\x92S\xC2ae\x0F\xC2lv\x06ifax\x91\x1Dana\x91armosillo\x93o\xC2nqn\xC2dueiana\xC2/pW\xC7IKMPTVW\r\x12\x1A%/Andianapolis\x95inox\x95oarengo\x95[etersburg\x96\rell_City\x96\t\xC2ei\x05vay\x95kncennes\x96\x01inamac\x96\x0Bolis\x95hvik\x919aluit\x91\x1F\xC2au\x07maica\x92}\xC2jn\x04uy\x90\x1Eeau\x95m\xC3enr!(ntucky/\xC2LM\x0Bouisville\x95sonticello\x95wox_IN\x95nalendijk\x90g\xC3aio\x06\n_Paz\x90ema\x94%\xC3suw\n\x13_Angeles\x95qisville\x95rer_Princes\x95)\xC4aeio;ks\xC5cnrtz\x05\x11\"*eio\x90{a\xC2gu\x04ua\x94\x11s\x90y\xC2it\x05got\x92Cinique\x93[amoros\x93qatlan\x93y\xC4nrtx\x10\x15\x1E\xC2do\x05oza\x90\"minee\x95uida\x93ulakatla\x95yico_City\x93squelon\x947n\xC2ct\x05ton\x91!\xC3ers\x0F\x14\xC2rv\x05rey\x93wideo\x96Ieal\x91(errat\x93_\xC5aeiou\x06\x0E\x15Lssau\x91\tw_York\x95\x7Fpigon\x91(\xC2mr\x03e\x96\x03\xC2ot\x05nha\x90uh_Dakota/\xC3BCN\x07\x0Eeulah\x96\x0Fenter\x95{ew_Salem\x95}uk\x925jinaga\x93{\xC4ahou\x1E%R\xC2nr\x11\xC2ag\x04ma\x94#nirtung\x91\x1Eamaribo\x95!oenix\x96\x05rt\xC3-_o\x0B\x15au-Prince\x92]of_Spain\x95G_\xC2AV\x05cre\x90~elho\x90}\xC2en\nrto_Rico\x94;ta_Arenas\x91S\xC4aeio\x190:\xC2in\nny_River\x91,kin_Inlet\x917\xC3cgs\x05\nife\x91\x01ina\x91%olute\x91#o_Branco\x90\x7Fsario\x90\x18\xC6achitw2>FK\x84\xC2no&t\xC3aio\x10\x15\xC2_r\x08Isabel\x93~em\x91\x07ago\x91U_Domingo\x91w_Paulo\x91\x03oresbysund\x927iprock\x95btka\x96\x07_\xC6BJKLTV\x0B\x11\x17\x1D$arthelemy\x92Eohns\x91'itts\x93\x11ucia\x93-homas\x96Wincent\x96Qift_Current\x91=\xC4ehio\x0B\x1C#gucigalpa\x92Yu\xC2ln\x03e\x929der_Bay\x91(juana\x93\x7Fr\xC2ot\x05nto\x91)ola\x96U\xC2ai\tncouver\x91+rgin\x96V\xC2hi\nitehorse\x91;nnipeg\x91-\xC2ae\x07kutat\x96\x11llowknife\x91\x14tarctica/\xC8CDMPRSTV\x06\x1D9@H[aasey\x90\x03\xC2au\x05vis\x90\x05montDUrville\x90\x07\xC2ac\x11\xC2cw\x08quarie\x90Eson\x90\tMurdo\x90\x0Balmer\x90\rothera\x90\x0F\xC2oy\nuth_Pole\x94\x1Cowa\x90\x11roll\x90\x13ostok\x90\x15ctic/Longyearbyen\x95\x15ia/\xE1uABCDFGHIJKMNOPQRSTUVY\0\0\0\0\0\0\x01\x01\x01\x01\x01\x02\x02\x02\x02\x02\x02\x03\x03\x03G\x87\xC1\xEF\xF9\xFE+>\\\xCE\xFB\x1D)Kgx\xBF\tBZ\xC7dlmnqst\x04\n\x0F\x15!3en\x96amaty\x93\x1Fman\x92\x7Fadyr\x94Ut\xC2ao\x03u\x93\x1Bbe\x93\x1Dh\xC2gk\x06abat\x95?habad\x95>yrau\x93!\xC4aeir%+2\xC5ghknr\x06\x0C\x0F\x15hdad\x92qrain\x90[u\x90Mgkok\x957naul\x94Qirut\x93+shkek\x93\x05unei\x90c\xC3aho\x08-lcutta\x92l\xC3iou\x04\x17ta\x94S\xC2in\x08balsan\x93Tgqing\x91Xngking\x91Xlombo\x931\xC4ahiu\x0F\x14\x18\xC2cm\x04ca\x90Rascus\x95+aka\x90Sli\x95=\xC2bs\x03ai\x83hanbe\x959amagusta\x91gaza\x92#\xC3aeo\x06\x0Crbin\x91Xbron\x92U\xC3_nv\n\x12Chi_Minh\x96Yg_Kong\x92Wd\x93S\xC2rs\x07kutsk\x94Ytanbul\x95D\xC2ae\x11\xC2ky\x06arta\x92capura\x92arusalem\x92y\xC5ahoru2:AL\xC5bmrst\x03\x0B\x11\x17ul\x85chatka\x94machi\x943hgar\x91Z\xC2hm\x07mandu\x94\x17andu\x94\x16andyga\x94]lkata\x92masnoyarsk\x94_\xC3acw\x0B\x11la_Lumpur\x94\x03hing\x94\x01ait\x93\x17\xC2au#\xC4cgkn\t\x0F\x16a\xC2ou\x02\x93V\x93Wadan\x94Wassar\x92eila\x941scat\x94!\xC2io\x07cosia\x91ivo\xC2ks\tuznetsk\x94gibirsk\x94k\xC2mr\x04sk\x94ial\x93'\xC3hoy\n\x13nom_Penh\x93\x07ntianak\x92gongyang\x93\x13\xC3aoy\x05\rtar\x94Gstanay\x93#zylorda\x93%\xC2ai\x07ngoon\x93Pyadh\x95\x05\xC5aehir\x1A\x1F'0\xC3ikm\x05\x0Cgon\x96Xhalin\x94yarkand\x96Koul\x93\x15anghai\x91Yngapore\x95\x0Fednekolymsk\x94q\xC5abeho\x10\x17'4\xC2is\x05pei\x95Khkent\x96Milisi\x92)\xC2hl\x05ran\x92s_Aviv\x92xim\xC2bp\x03u\x91\nhu\x91\x0B\xC2km\x04yo\x93\x01sk\x94s\xC4jlrs\r#)ung_Pandang\x92da\xC2an\tnbaatar\x93U_Bator\x93Tumqi\x91[t-Nera\x94w\xC2il\tentiane\x93)adivostok\x94}\xC2ae\x0F\xC2kn\x06utsk\x95\x01gon\x93Q\xC2kr\x0Caterinburg\x94\x7Fevan\x8Dlantic/\xC8ABCFJMRS\x07\x0F\"0:BLzores\x94Aermuda\x90aa\xC2np\x05ary\x92\te_Verde\x91ca\xC2er\x05roe\x92\x1Coe\x92\x1Dan_Mayen\x95\x14adeira\x94=eykjavik\x92u\xC2ot\ruth_Georgia\x92K\xC2_a\x08Helena\x95\x11nley\x92\x15stralia/\xD0ABCDEHLMNPQSTVWY\x0F%7>DKeo{\x81\x8C\x9B\xA4\xAD\xB2\xC2Cd\x03T\x90Helaide\x903r\xC2io\x07sbane\x907ken_Hill\x905\xC2au\x08nberra\x90Hrrie\x90Mao\xC2lr\x10\xC2ae\x05ska\x95\\utian\x95Xizona\x96\x04entral\x95`ast\xC2-e\tIndiana\x95hrn\x95~awaii\x95fndiana-Starke\x95n\xC2io\x08chigan\x95duntain\x95bacific\x95p-New\x95pamoa\x90.") } }, bcp47_ids: unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"adalv\0\0\0aedxb\0\0\0afkbl\0\0\0aganu\0\0\0aiaxa\0\0\0altia\0\0\0amevn\0\0\0ancur\0\0\0aolad\0\0\0aqcas\0\0\0aqdav\0\0\0aqddu\0\0\0aqmaw\0\0\0aqmcm\0\0\0aqplm\0\0\0aqrot\0\0\0aqsyw\0\0\0aqtrl\0\0\0aqvos\0\0\0arbue\0\0\0arcor\0\0\0arctc\0\0\0arirj\0\0\0arjuj\0\0\0arluq\0\0\0armdz\0\0\0arrgl\0\0\0arsla\0\0\0artuc\0\0\0aruaq\0\0\0arush\0\0\0asppg\0\0\0atvie\0\0\0auadl\0\0\0aubhq\0\0\0aubne\0\0\0audrw\0\0\0aueuc\0\0\0auhba\0\0\0auldc\0\0\0auldh\0\0\0aumel\0\0\0aumqi\0\0\0auper\0\0\0ausyd\0\0\0awaua\0\0\0azbak\0\0\0basjj\0\0\0bbbgi\0\0\0bddac\0\0\0bebru\0\0\0bfoua\0\0\0bgsof\0\0\0bhbah\0\0\0bibjm\0\0\0bjptn\0\0\0bmbda\0\0\0bnbwn\0\0\0bolpb\0\0\0bqkra\0\0\0braux\0\0\0brbel\0\0\0brbvb\0\0\0brcgb\0\0\0brcgr\0\0\0brern\0\0\0brfen\0\0\0brfor\0\0\0brmao\0\0\0brmcz\0\0\0brpvh\0\0\0brrbr\0\0\0brrec\0\0\0brsao\0\0\0brssa\0\0\0brstm\0\0\0bsnas\0\0\0btthi\0\0\0bwgbe\0\0\0bymsq\0\0\0bzbze\0\0\0cacfq\0\0\0caedm\0\0\0cafne\0\0\0caglb\0\0\0cagoo\0\0\0cahal\0\0\0caiql\0\0\0camon\0\0\0careb\0\0\0careg\0\0\0casjf\0\0\0cator\0\0\0cavan\0\0\0cawnp\0\0\0caybx\0\0\0caycb\0\0\0cayda\0\0\0caydq\0\0\0cayek\0\0\0cayev\0\0\0cayxy\0\0\0cayyn\0\0\0cayzs\0\0\0cccck\0\0\0cdfbm\0\0\0cdfih\0\0\0cfbgf\0\0\0cgbzv\0\0\0chzrh\0\0\0ciabj\0\0\0ckrar\0\0\0clipc\0\0\0clpuq\0\0\0clscl\0\0\0cmdla\0\0\0cnsha\0\0\0cnurc\0\0\0cobog\0\0\0crsjo\0\0\0cuhav\0\0\0cvrai\0\0\0cxxch\0\0\0cyfmg\0\0\0cynic\0\0\0czprg\0\0\0deber\0\0\0debsngn\0djjib\0\0\0dkcph\0\0\0dmdom\0\0\0dosdq\0\0\0dzalg\0\0\0ecgps\0\0\0ecgye\0\0\0eetll\0\0\0egcai\0\0\0eheai\0\0\0erasm\0\0\0esceu\0\0\0eslpa\0\0\0esmad\0\0\0etadd\0\0\0fihel\0\0\0fimhq\0\0\0fjsuv\0\0\0fkpsy\0\0\0fmksa\0\0\0fmpni\0\0\0fmtkk\0\0\0fotho\0\0\0frpar\0\0\0galbv\0\0\0gazastrpgblon\0\0\0gdgnd\0\0\0getbs\0\0\0gfcay\0\0\0gggci\0\0\0ghacc\0\0\0gigib\0\0\0gldkshvnglgoh\0\0\0globy\0\0\0glthu\0\0\0gmbjl\0\0\0gmt\0\0\0\0\0gncky\0\0\0gpbbr\0\0\0gpmsb\0\0\0gpsbh\0\0\0gqssg\0\0\0grath\0\0\0gsgrv\0\0\0gtgua\0\0\0gugum\0\0\0gwoxb\0\0\0gygeo\0\0\0hebron\0\0hkhkg\0\0\0hntgu\0\0\0hrzag\0\0\0htpap\0\0\0hubud\0\0\0iddjj\0\0\0idjkt\0\0\0idmak\0\0\0idpnk\0\0\0iedub\0\0\0imdgs\0\0\0inccu\0\0\0iodga\0\0\0iqbgw\0\0\0irthr\0\0\0isrey\0\0\0itrom\0\0\0jeruslm\0jesth\0\0\0jmkin\0\0\0joamm\0\0\0jptyo\0\0\0kenbo\0\0\0kgfru\0\0\0khpnh\0\0\0kicxi\0\0\0kipho\0\0\0kitrw\0\0\0kmyva\0\0\0knbas\0\0\0kpfnj\0\0\0krsel\0\0\0kwkwi\0\0\0kygec\0\0\0kzaau\0\0\0kzakx\0\0\0kzala\0\0\0kzguw\0\0\0kzksn\0\0\0kzkzo\0\0\0kzura\0\0\0lavte\0\0\0lbbey\0\0\0lccas\0\0\0livdz\0\0\0lkcmb\0\0\0lrmlw\0\0\0lsmsu\0\0\0ltvno\0\0\0lulux\0\0\0lvrix\0\0\0lytip\0\0\0macas\0\0\0mcmon\0\0\0mdkiv\0\0\0metgd\0\0\0mgtnr\0\0\0mhkwa\0\0\0mhmaj\0\0\0mkskp\0\0\0mlbko\0\0\0mmrgn\0\0\0mnhvd\0\0\0mnuln\0\0\0momfm\0\0\0mpspn\0\0\0mqfdf\0\0\0mrnkc\0\0\0msmni\0\0\0mtmla\0\0\0muplu\0\0\0mvmle\0\0\0mwblz\0\0\0mxchi\0\0\0mxcjs\0\0\0mxcun\0\0\0mxhmo\0\0\0mxmam\0\0\0mxmex\0\0\0mxmid\0\0\0mxmty\0\0\0mxmzt\0\0\0mxoji\0\0\0mxpvr\0\0\0mxtij\0\0\0mykch\0\0\0mykul\0\0\0mzmpm\0\0\0nawdh\0\0\0ncnou\0\0\0nenim\0\0\0nfnlk\0\0\0nglos\0\0\0nimga\0\0\0nlams\0\0\0noosl\0\0\0npktm\0\0\0nrinu\0\0\0nuiue\0\0\0nzakl\0\0\0nzcht\0\0\0ommct\0\0\0papty\0\0\0pelim\0\0\0pfgmr\0\0\0pfnhv\0\0\0pfppt\0\0\0pgpom\0\0\0pgraw\0\0\0phmnl\0\0\0pkkhi\0\0\0plwaw\0\0\0pmmqc\0\0\0pnpcn\0\0\0prsju\0\0\0ptfnc\0\0\0ptlis\0\0\0ptpdl\0\0\0pwror\0\0\0pyasu\0\0\0qadoh\0\0\0rereu\0\0\0robuh\0\0\0rsbeg\0\0\0ruasf\0\0\0rubax\0\0\0ruchita\0rudyr\0\0\0rugdx\0\0\0ruikt\0\0\0rukgd\0\0\0rukhndg\0rukra\0\0\0rukuf\0\0\0rukvx\0\0\0rumow\0\0\0runoz\0\0\0ruoms\0\0\0ruovb\0\0\0rupkc\0\0\0rurtw\0\0\0rusred\0\0rutof\0\0\0ruuly\0\0\0ruunera\0ruuus\0\0\0ruvog\0\0\0ruvvo\0\0\0ruyek\0\0\0ruyks\0\0\0rwkgl\0\0\0saruh\0\0\0sbhir\0\0\0scmaw\0\0\0sdkrt\0\0\0sesto\0\0\0sgsin\0\0\0shshn\0\0\0silju\0\0\0sjlyr\0\0\0skbts\0\0\0slfna\0\0\0smsai\0\0\0sndkr\0\0\0somgq\0\0\0srpbm\0\0\0ssjub\0\0\0sttms\0\0\0svsal\0\0\0sxphi\0\0\0sydam\0\0\0szqmn\0\0\0tcgdt\0\0\0tdndj\0\0\0tfpfr\0\0\0tglfw\0\0\0thbkk\0\0\0tjdyu\0\0\0tkfko\0\0\0tldil\0\0\0tmasb\0\0\0tntun\0\0\0totbu\0\0\0trist\0\0\0ttpos\0\0\0tvfun\0\0\0twtpe\0\0\0tzdar\0\0\0uaiev\0\0\0uasip\0\0\0ugkla\0\0\0umawk\0\0\0ummdy\0\0\0usadk\0\0\0usaeg\0\0\0usanc\0\0\0usboi\0\0\0uschi\0\0\0usden\0\0\0usdet\0\0\0ushnl\0\0\0usind\0\0\0usinvev\0usjnu\0\0\0usknx\0\0\0uslax\0\0\0uslui\0\0\0usmnm\0\0\0usmoc\0\0\0usmtm\0\0\0usndcnt\0usndnsl\0usnyc\0\0\0usoea\0\0\0usome\0\0\0usphx\0\0\0ussit\0\0\0ustel\0\0\0uswlz\0\0\0uswsq\0\0\0usxul\0\0\0usyak\0\0\0utc\0\0\0\0\0utce01\0\0utce02\0\0utce03\0\0utce04\0\0utce05\0\0utce06\0\0utce07\0\0utce08\0\0utce09\0\0utce10\0\0utce11\0\0utce12\0\0utce13\0\0utce14\0\0utcw01\0\0utcw02\0\0utcw03\0\0utcw04\0\0utcw05\0\0utcw06\0\0utcw07\0\0utcw08\0\0utcw09\0\0utcw10\0\0utcw11\0\0utcw12\0\0uymvd\0\0\0uzskd\0\0\0uztas\0\0\0vavat\0\0\0vcsvd\0\0\0veccs\0\0\0vgtov\0\0\0vistt\0\0\0vnsgn\0\0\0vuvli\0\0\0wfmau\0\0\0wsapw\0\0\0yeade\0\0\0ytmam\0\0\0zajnb\0\0\0zmlun\0\0\0zwhre\0\0\0") } }; + #[doc(hidden)] + pub const SINGLETON_IANA_TO_BCP47_MAP_V3_CHECKSUM: u64 = 1359598211242524719u64; + } + #[clippy::msrv = "1.81"] + impl icu_provider::DataProvider for $provider { + fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> { + if req.id.locale.is_default() { + Ok(icu_provider::DataResponse { payload: icu_provider::DataPayload::from_static_ref(Self::SINGLETON_IANA_TO_BCP47_MAP_V3), metadata: icu_provider::DataResponseMetadata::default().with_checksum(Self::SINGLETON_IANA_TO_BCP47_MAP_V3_CHECKSUM) }) + } else { + Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) + } + } + } + }; + ($ provider : ty , ITER) => { + __impl_iana_to_bcp47_map_v3!($provider); + #[clippy::msrv = "1.81"] + impl icu_provider::IterableDataProvider for $provider { + fn iter_ids(&self) -> Result>, icu_provider::DataError> { + Ok([Default::default()].into_iter().collect()) + } + } + }; + ($ provider : ty , DRY) => { + __impl_iana_to_bcp47_map_v3!($provider); + #[clippy::msrv = "1.81"] + impl icu_provider::DryDataProvider for $provider { + fn dry_load(&self, req: icu_provider::DataRequest) -> Result { + if req.id.locale.is_default() { + Ok(icu_provider::DataResponseMetadata::default().with_checksum(Self::SINGLETON_IANA_TO_BCP47_MAP_V3_CHECKSUM)) + } else { + Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) + } + } + } + }; + ($ provider : ty , DRY , ITER) => { + __impl_iana_to_bcp47_map_v3!($provider); + #[clippy::msrv = "1.81"] + impl icu_provider::DryDataProvider for $provider { + fn dry_load(&self, req: icu_provider::DataRequest) -> Result { + if req.id.locale.is_default() { + Ok(icu_provider::DataResponseMetadata::default().with_checksum(Self::SINGLETON_IANA_TO_BCP47_MAP_V3_CHECKSUM)) + } else { + Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) + } + } + } + #[clippy::msrv = "1.81"] + impl icu_provider::IterableDataProvider for $provider { + fn iter_ids(&self) -> Result>, icu_provider::DataError> { + Ok([Default::default()].into_iter().collect()) + } + } + }; +} +#[doc(inline)] +pub use __impl_iana_to_bcp47_map_v3 as impl_iana_to_bcp47_map_v3; diff --git a/provider/data/timezone/stubdata/mod.rs b/provider/data/time/stubdata/mod.rs similarity index 100% rename from provider/data/timezone/stubdata/mod.rs rename to provider/data/time/stubdata/mod.rs diff --git a/provider/data/time/stubdata/windows_zones_to_bcp47_map_v1.rs.data b/provider/data/time/stubdata/windows_zones_to_bcp47_map_v1.rs.data new file mode 100644 index 00000000000..ed27d0d4f9e --- /dev/null +++ b/provider/data/time/stubdata/windows_zones_to_bcp47_map_v1.rs.data @@ -0,0 +1,75 @@ +// @generated +/// Implement `DataProvider` on the given struct using the data +/// hardcoded in this file. This allows the struct to be used with +/// `icu`'s `_unstable` constructors. +/// +/// Using this implementation will embed the following data in the binary's data segment: +/// * 8634B[^1] for the singleton data struct +/// +/// [^1]: these numbers can be smaller in practice due to linker deduplication +#[doc(hidden)] +#[macro_export] +macro_rules! __impl_windows_zones_to_bcp47_map_v1 { + ($ provider : ty) => { + #[clippy::msrv = "1.81"] + const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO; + #[clippy::msrv = "1.81"] + impl $provider { + #[doc(hidden)] + pub const SINGLETON_WINDOWS_ZONES_TO_BCP47_MAP_V1: &'static ::DataStruct = &icu::time::provider::windows::WindowsZonesToBcp47Map { map: zerotrie::ZeroTrieSimpleAscii { store: unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"\xE1xABCDEFGHIJKLMNOPQRSTUVWY\x02\x02\x05\x05\x06\x07\x08\x08\x08\t\t\t\x0B\x0C\x0C\r\r\r\x11\x12\x13\x13\x15-\xBCRs\xE8AS\xA2\xFF\x1Eb\xCF<|\x995W\xE6\x15Z\x90\xFB\xBA\xE1hUflrstuz\0\0\0\x01\x01\x01\x01Fg\xC6]~\xA8\xCES \xC2CE entral Standard Time/\xC20A\x0401\x90\x06U\x90\x06astern Standard Time/\xC20A\x0401\x90\x0BU\x90\x0Bghanistan Standard Time/\xC20A\x0301\x82F\x82\xC3aet\x1E=skan Standard Time/\xC20U\x0401\x92&S\x92&utian Standard Time/\xC20U\x0401\x92%S\x92%ai Standard Time/\xC20R\x0401\x91gU\x91g\xC2agsb\xC2 i-Standard Time/\xC60BKQSY\x04\x07\n\r\x1001\x91{H\x90\x14W\x91\x17A\x91bA\x91{E\x92T\xC2ac#n Standard Time/\xC40AOZ\x03\x05\x0801\x81E\x81M\x91PZ\x922 Standard Time/\xC20I\x0401\x91\x04Q\x91\x04entina Standard Time/\xC20A\x0401\x90\x01R\x90\x01trakhan Standard Time/\xC20R\x0401\x91fU\x91flantic Standard Time/\xC40BCG\x04\x07\n01\x90*M\x90\x17A\x90*L\x90js Central W. Standard Time/\xC20A\x0401\x90\x07U\x90\x07\xC2eo!rbaijan Standard Time/\xC20A\x0401\x90\rZ\x90\rres Standard Time/\xC30GP\x04\x0701\x91_L\x90iT\x91_\xC3aeoFe\xC2hn\x1Cia Standard Time/\xC20B\x0401\x90\"R\x90\"gladesh Standard Time/\xC20B\x0401\x90\x10\xC2DT\x02\x90\x10\x90$larus Standard Time/\xC20B\x0401\x90&Y\x90&ugainville Standard Time/\xC20P\x0401\x91WG\x91W\xE1daehu\0\x02\x02n\x1En\xC3npu%Kada Central Standard Time/\xC20C\x0401\x90+A\x90+e Verde Standard Time/\xC30CZ\x04\x0701\x90DV\x90DZ\x92=casus Standard Time/\xC20A\x0301\x86M\x86n\xE1b.t\0$ Australia Standard Time/\xC20A\x0401\x90\x04U\x90\x04ral \xE1eABEPS\0\0\x01\x01v\x98\x019\xC2msBerica Standard Time/\xC90BCEGHNSZ\x04\x07\n\r\x10\x13\x16\x1901\x90sZ\x90'R\x90BC\x90NT\x90sN\x90yI\x91HV\x92\x0CZ\x92Bia Standard Time/\xC60ACIKZ\x04\x07\n\r\x1001\x91\x0EQ\x90\0N\x90@O\x91\x03G\x91\x0EZ\x924razilian Standard Time/\xC20B\x0401\x90\x1CR\x90\x1Curope\xC2 a6Standard Time/\xC70ACHMRS\x04\x06\t\x0C\x0F\x1201\x90|L\x85Z\x90GU\x90|E\x91)S\x91e\xC2IK\x02\x92\x02\x92\x04n Standard Time/\xC50BHMP\x04\x07\n\r01\x91ZA\x90\x0ER\x90zK\x91,L\x91Zacific Standard Time/\xC70AFNSVZ\x04\x06\t\x0C\x0F\x1201\x91|Q\x89M\x90[C\x91DB\x91|U\x92QZ\x929tandard Time\xC2 /\x14(Mexico)/\xC20M\x0401\x91>X\x91>\xC40CMU\x04\x07\n01\x92'A\x90/X\x91=S\x92'\xC2ai&tham Islands Standard Time/\xC20N\x0401\x91OZ\x91Ona Standard Time/\xC40CHM\x04\x07\n01\x90?N\x90?K\x90xO\x911ba Standard Time/\xC20C\x0401\x90CU\x90Cateline Standard Time/\xC20Z\x0401\x92HZ\x92H\xE1d.agk\0\x01\x01\xC5(E \xC3AESy\x98\xC2fuTrica Standard Time/\xCB0ADEKMSTUYZ\x04\x06\t\x11\x19\x1C\x1F\"%(01\x91\rQ\x8FJ\x90I\xC2RT\x02\x90S\x90V\xC2EM\x02\x91\r\x91\x13G\x91*O\x92\x08Z\x92\x1FG\x92\"T\x92UZ\x921stralia Standard Time/\xC20A\x0401\x90\x05U\x90\x05urope Standard Time/\xC20M\x0401\x91(D\x91(outh America Standard Time/\xC20B\x0401\x90!R\x90!ster\xC2 n Island Standard Time/\xC20C\x0401\x90;L\x90; Standard Time\xC2 /\x14(Mexico)/\xC20M\x0401\x91;X\x91;\xC40BCU\x04\x07\n01\x92,S\x90#A\x90-S\x92,ypt Standard Time/\xC20E\x0401\x90QG\x90Qaterinburg Standard Time/\xC20R\x0401\x91xU\x91x\xC2Li9E Standard Time/\xC70ABEFLU\x04\x07\n\r\x10\x1801\x92 X\x90XG\x90\x13E\x90PI\x90W\xC2TV\x02\x91\"\x91$A\x92 ji Standard Time/\xC20F\x0401\x90YJ\x90Y\xE1dMTer\0\0\0>c\x83T Standard Time/\xC70EFGIJP\x04\x07\n\x12\x1A\x1D01\x90`S\x90TO\x90]\xC2BG\x02\x90`\x90d\xC2EM\x02\x91\0\x91\x01E\x91\tT\x91^B Standard Time/\xC40CGR\x04\x07\n01\x91dY\x90FR\x90qO\x91dorgian Standard Time/\xC20G\x0401\x90bE\x90been\xC2lw\x1Dand Standard Time/\xC20G\x0401\x90hL\x90hich Standard Time/\xC90BCGILMST\x04\x07\n\x1E!$,801\x91\x06F\x90\x12I\x909\xC5HLMNW\x02\x04\x06\x08\x90e\x90g\x90k\x90l\x90uS\x91\x06R\x91 \xC2LR\x02\x91-\x914\xC3HLN\x02\x04\x92\x01\x92\x05\x92\x07G\x92\x13a\xC2iw\x1Cti Standard Time/\xC20H\x0401\x90{T\x90{aiian Standard Time/\xC50CPUZ\x04\x07\n\r01\x92)K\x90:F\x91US\x92)Z\x92F\xC3nrs\x1D9dia Standard Time/\xC20I\x0401\x91\x02N\x91\x02an Standard Time/\xC20I\x0401\x91\x05R\x91\x05rael Standard Time/\xC20I\x0401\x91\x08L\x91\x08ordan Standard Time/\xC20J\x0401\x91\x0BO\x91\x0B\xC2ao#liningrad Standard Time/\xC20R\x0401\x91kU\x91krea Standard Time/\xC20K\x0401\x91\x16R\x91\x16\xC2ioH\xC2bn\x1Cya Standard Time/\xC20L\x0401\x91%Y\x91%e Islands Standard Time/\xC30KZ\x04\x0701\x91\x10I\x91\x10Z\x92\xC3289\x16'/\xC40BGZ\x04\x07\n01\x92>R\x90\x1DS\x90rZ\x92>/\xC30PZ\x04\x0701\x92DN\x91\\Z\x92D/\xC30PZ\x04\x0701\x92EF\x91SZ\x92E1/\xC50ANUZ\x04\x07\n\r01\x92GS\x90\x02U\x91MM\x92$Z\x92G\xC20Z\x0401\x92.Z\x92.aanbaatar Standard Time/\xC20M\x0401\x910N\x910\xC3elo!Dnezuela Standard Time/\xC20V\x0401\x92ME\x92Madivostok Standard Time/\xC20R\x0401\x91wU\x91wlgograd Standard Time/\xC20R\x0401\x91vU\x91v\xE1b.e\x01\x1D \xE1dACEM\0\0\0\"\x87\xEFustralia Standard Time/\xC20A\x0401\x90\nU\x90\nentral Africa Standard Time/\xC90ABCDGNTZ\x04\x06\t\x19\x1C$,401\x91GO\x88J\x90\x16\xC4DFGM\x02\x04\x06\x905\x906\x907\x90>Z\x90M\xC2AQ\x02\x90_\x90p\xC2EG\x02\x91E\x91G\xC2DN\x02\x92\x11\x92\x19Z\x92/urope Standard Time/\xCB0ACDGILMNSV\x04\x0B\x0E\x11\x14\x17\x1F'/;01\x90H\xC2DT\x01\x80\x90\x03H\x908E\x90HI\x90fT\x91\x07\xC2IU\x02\x91\x1E\x91#\xC2CT\x02\x91'\x916\xC2LO\x02\x91I\x91J\xC3EJM\x02\x04\x91\x7F\x92\x03\x92\x06A\x92Kongolia Standard Time/\xC20M\x0401\x91/N\x91/st \xC3ABP>[sia Standard Time/\xC70AKMTUZ\x04\x06\t\x0C\x18\x1B01\x92JQ\x8CZ\x91\x1AV\x918\xC3FJM\x02\x04\x92\x12\x92\x15\x92\x18Z\x92JZ\x923ank Standard Time/\xC20P\x0401\x90wS\x90wacific Standard Time/\xC70AFGMPZ\x04\x06\t\x0C\x0F\x1201\x91VQ\x8BM\x90\\U\x90tP\x912G\x91VZ\x928\xC2au\x1Fkutsk Standard Time/\xC20R\x0401\x91yU\x91ykon Standard Time/\xC20C\x0401\x901A\x901") } }, bcp47_ids: unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"adalv\0\0\0aedxb\0\0\0afkbl\0\0\0aganu\0\0\0aiaxa\0\0\0altia\0\0\0amevn\0\0\0ancur\0\0\0aolad\0\0\0aqcas\0\0\0aqdav\0\0\0aqddu\0\0\0aqmaw\0\0\0aqmcm\0\0\0aqrot\0\0\0aqsyw\0\0\0aqvos\0\0\0arbue\0\0\0asppg\0\0\0atvie\0\0\0auadl\0\0\0aubne\0\0\0audrw\0\0\0aueuc\0\0\0auhba\0\0\0auldh\0\0\0auper\0\0\0ausyd\0\0\0awaua\0\0\0azbak\0\0\0basjj\0\0\0bbbgi\0\0\0bddac\0\0\0bebru\0\0\0bfoua\0\0\0bgsof\0\0\0bhbah\0\0\0bibjm\0\0\0bjptn\0\0\0bmbda\0\0\0bnbwn\0\0\0bolpb\0\0\0bqkra\0\0\0braux\0\0\0brcgb\0\0\0brfen\0\0\0brfor\0\0\0brmao\0\0\0brrbr\0\0\0brsao\0\0\0brssa\0\0\0bsnas\0\0\0btthi\0\0\0bwgbe\0\0\0bymsq\0\0\0bzbze\0\0\0cacfq\0\0\0caedm\0\0\0cahal\0\0\0careg\0\0\0casjf\0\0\0cator\0\0\0cavan\0\0\0cawnp\0\0\0caybx\0\0\0cayxy\0\0\0cayzs\0\0\0cccck\0\0\0cdfbm\0\0\0cdfih\0\0\0cfbgf\0\0\0cgbzv\0\0\0chzrh\0\0\0ciabj\0\0\0ckrar\0\0\0clipc\0\0\0clpuq\0\0\0clscl\0\0\0cmdla\0\0\0cnsha\0\0\0cnurc\0\0\0cobog\0\0\0crsjo\0\0\0cuhav\0\0\0cvrai\0\0\0cxxch\0\0\0cynic\0\0\0czprg\0\0\0deber\0\0\0djjib\0\0\0dkcph\0\0\0dmdom\0\0\0dosdq\0\0\0dzalg\0\0\0ecgps\0\0\0ecgye\0\0\0eetll\0\0\0egcai\0\0\0eheai\0\0\0erasm\0\0\0eslpa\0\0\0esmad\0\0\0etadd\0\0\0fihel\0\0\0fimhq\0\0\0fjsuv\0\0\0fkpsy\0\0\0fmpni\0\0\0fmtkk\0\0\0fotho\0\0\0frpar\0\0\0galbv\0\0\0gblon\0\0\0gdgnd\0\0\0getbs\0\0\0gfcay\0\0\0gggci\0\0\0ghacc\0\0\0gigib\0\0\0gldkshvnglgoh\0\0\0globy\0\0\0glthu\0\0\0gmbjl\0\0\0gncky\0\0\0gpbbr\0\0\0gpmsb\0\0\0gpsbh\0\0\0gqssg\0\0\0grath\0\0\0gsgrv\0\0\0gtgua\0\0\0gugum\0\0\0gwoxb\0\0\0gygeo\0\0\0hebron\0\0hkhkg\0\0\0hntgu\0\0\0hrzag\0\0\0htpap\0\0\0hubud\0\0\0iddjj\0\0\0idjkt\0\0\0idmak\0\0\0iedub\0\0\0imdgs\0\0\0inccu\0\0\0iodga\0\0\0iqbgw\0\0\0irthr\0\0\0isrey\0\0\0itrom\0\0\0jeruslm\0jesth\0\0\0jmkin\0\0\0joamm\0\0\0jptyo\0\0\0kenbo\0\0\0kgfru\0\0\0khpnh\0\0\0kicxi\0\0\0kipho\0\0\0kitrw\0\0\0kmyva\0\0\0knbas\0\0\0kpfnj\0\0\0krsel\0\0\0kwkwi\0\0\0kygec\0\0\0kzkzo\0\0\0kzura\0\0\0lavte\0\0\0lbbey\0\0\0lccas\0\0\0livdz\0\0\0lkcmb\0\0\0lrmlw\0\0\0lsmsu\0\0\0ltvno\0\0\0lulux\0\0\0lvrix\0\0\0lytip\0\0\0macas\0\0\0mcmon\0\0\0mdkiv\0\0\0metgd\0\0\0mgtnr\0\0\0mhmaj\0\0\0mkskp\0\0\0mlbko\0\0\0mmrgn\0\0\0mnhvd\0\0\0mnuln\0\0\0momfm\0\0\0mpspn\0\0\0mqfdf\0\0\0mrnkc\0\0\0msmni\0\0\0mtmla\0\0\0muplu\0\0\0mvmle\0\0\0mwblz\0\0\0mxcjs\0\0\0mxcun\0\0\0mxhmo\0\0\0mxmam\0\0\0mxmex\0\0\0mxmzt\0\0\0mxtij\0\0\0mykul\0\0\0mzmpm\0\0\0nawdh\0\0\0ncnou\0\0\0nenim\0\0\0nfnlk\0\0\0nglos\0\0\0nimga\0\0\0nlams\0\0\0noosl\0\0\0npktm\0\0\0nrinu\0\0\0nuiue\0\0\0nzakl\0\0\0nzcht\0\0\0ommct\0\0\0papty\0\0\0pelim\0\0\0pfgmr\0\0\0pfnhv\0\0\0pfppt\0\0\0pgpom\0\0\0pgraw\0\0\0phmnl\0\0\0pkkhi\0\0\0plwaw\0\0\0pmmqc\0\0\0pnpcn\0\0\0prsju\0\0\0ptlis\0\0\0ptpdl\0\0\0pwror\0\0\0pyasu\0\0\0qadoh\0\0\0rereu\0\0\0robuh\0\0\0rsbeg\0\0\0ruasf\0\0\0rubax\0\0\0ruchita\0rugdx\0\0\0ruikt\0\0\0rukgd\0\0\0rukra\0\0\0rukuf\0\0\0rumow\0\0\0ruoms\0\0\0ruovb\0\0\0rupkc\0\0\0rurtw\0\0\0rusred\0\0rutof\0\0\0ruuus\0\0\0ruvog\0\0\0ruvvo\0\0\0ruyek\0\0\0ruyks\0\0\0rwkgl\0\0\0saruh\0\0\0sbhir\0\0\0scmaw\0\0\0sdkrt\0\0\0sesto\0\0\0sgsin\0\0\0shshn\0\0\0silju\0\0\0sjlyr\0\0\0skbts\0\0\0slfna\0\0\0smsai\0\0\0sndkr\0\0\0somgq\0\0\0srpbm\0\0\0ssjub\0\0\0sttms\0\0\0svsal\0\0\0sxphi\0\0\0sydam\0\0\0szqmn\0\0\0tcgdt\0\0\0tdndj\0\0\0tfpfr\0\0\0tglfw\0\0\0thbkk\0\0\0tjdyu\0\0\0tkfko\0\0\0tldil\0\0\0tmasb\0\0\0tntun\0\0\0totbu\0\0\0trist\0\0\0ttpos\0\0\0tvfun\0\0\0twtpe\0\0\0tzdar\0\0\0uaiev\0\0\0uasip\0\0\0ugkla\0\0\0umawk\0\0\0ummdy\0\0\0usadk\0\0\0usanc\0\0\0uschi\0\0\0usden\0\0\0ushnl\0\0\0usind\0\0\0uslax\0\0\0usnyc\0\0\0usphx\0\0\0utc\0\0\0\0\0utce01\0\0utce02\0\0utce03\0\0utce04\0\0utce05\0\0utce06\0\0utce07\0\0utce08\0\0utce09\0\0utce10\0\0utce11\0\0utce12\0\0utce13\0\0utce14\0\0utcw01\0\0utcw02\0\0utcw03\0\0utcw04\0\0utcw05\0\0utcw06\0\0utcw07\0\0utcw08\0\0utcw09\0\0utcw10\0\0utcw11\0\0utcw12\0\0uymvd\0\0\0uztas\0\0\0vavat\0\0\0vcsvd\0\0\0veccs\0\0\0vgtov\0\0\0vistt\0\0\0vnsgn\0\0\0vuvli\0\0\0wfmau\0\0\0wsapw\0\0\0yeade\0\0\0ytmam\0\0\0zajnb\0\0\0zmlun\0\0\0zwhre\0\0\0") } }; + } + #[clippy::msrv = "1.81"] + impl icu_provider::DataProvider for $provider { + fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> { + if req.id.locale.is_default() { + Ok(icu_provider::DataResponse { payload: icu_provider::DataPayload::from_static_ref(Self::SINGLETON_WINDOWS_ZONES_TO_BCP47_MAP_V1), metadata: icu_provider::DataResponseMetadata::default() }) + } else { + Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) + } + } + } + }; + ($ provider : ty , ITER) => { + __impl_windows_zones_to_bcp47_map_v1!($provider); + #[clippy::msrv = "1.81"] + impl icu_provider::IterableDataProvider for $provider { + fn iter_ids(&self) -> Result>, icu_provider::DataError> { + Ok([Default::default()].into_iter().collect()) + } + } + }; + ($ provider : ty , DRY) => { + __impl_windows_zones_to_bcp47_map_v1!($provider); + #[clippy::msrv = "1.81"] + impl icu_provider::DryDataProvider for $provider { + fn dry_load(&self, req: icu_provider::DataRequest) -> Result { + if req.id.locale.is_default() { + Ok(icu_provider::DataResponseMetadata::default()) + } else { + Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) + } + } + } + }; + ($ provider : ty , DRY , ITER) => { + __impl_windows_zones_to_bcp47_map_v1!($provider); + #[clippy::msrv = "1.81"] + impl icu_provider::DryDataProvider for $provider { + fn dry_load(&self, req: icu_provider::DataRequest) -> Result { + if req.id.locale.is_default() { + Ok(icu_provider::DataResponseMetadata::default()) + } else { + Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) + } + } + } + #[clippy::msrv = "1.81"] + impl icu_provider::IterableDataProvider for $provider { + fn iter_ids(&self) -> Result>, icu_provider::DataError> { + Ok([Default::default()].into_iter().collect()) + } + } + }; +} +#[doc(inline)] +pub use __impl_windows_zones_to_bcp47_map_v1 as impl_windows_zones_to_bcp47_map_v1; diff --git a/provider/data/timezone/stubdata/zone_offset_period_v1.rs.data b/provider/data/time/stubdata/zone_offset_period_v1.rs.data similarity index 96% rename from provider/data/timezone/stubdata/zone_offset_period_v1.rs.data rename to provider/data/time/stubdata/zone_offset_period_v1.rs.data index 14a9fa8a340..2471be1a508 100644 --- a/provider/data/timezone/stubdata/zone_offset_period_v1.rs.data +++ b/provider/data/time/stubdata/zone_offset_period_v1.rs.data @@ -16,18 +16,18 @@ macro_rules! __impl_zone_offset_period_v1 { #[clippy::msrv = "1.81"] impl $provider { #[doc(hidden)] - pub const SINGLETON_ZONE_OFFSET_PERIOD_V1: &'static ::DataStruct = &icu::timezone::provider::ZoneOffsetPeriod(unsafe { + pub const SINGLETON_ZONE_OFFSET_PERIOD_V1: &'static ::DataStruct = &icu::time::provider::ZoneOffsetPeriod(unsafe { #[allow(unused_unsafe)] zerovec::ZeroMap2d::from_parts_unchecked(unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"adalv\0\0\0aedxb\0\0\0afkbl\0\0\0aganu\0\0\0aiaxa\0\0\0altia\0\0\0amevn\0\0\0ancur\0\0\0aolad\0\0\0aqcas\0\0\0aqdav\0\0\0aqddu\0\0\0aqmaw\0\0\0aqmcm\0\0\0aqplm\0\0\0aqrot\0\0\0aqsyw\0\0\0aqtrl\0\0\0aqvos\0\0\0arbue\0\0\0arcor\0\0\0arctc\0\0\0arirj\0\0\0arjuj\0\0\0arluq\0\0\0armdz\0\0\0arrgl\0\0\0arsla\0\0\0artuc\0\0\0aruaq\0\0\0arush\0\0\0asppg\0\0\0atvie\0\0\0auadl\0\0\0aubhq\0\0\0aubne\0\0\0audrw\0\0\0aueuc\0\0\0auhba\0\0\0auldc\0\0\0auldh\0\0\0aumel\0\0\0aumqi\0\0\0auper\0\0\0ausyd\0\0\0awaua\0\0\0azbak\0\0\0basjj\0\0\0bbbgi\0\0\0bddac\0\0\0bebru\0\0\0bfoua\0\0\0bgsof\0\0\0bhbah\0\0\0bibjm\0\0\0bjptn\0\0\0bmbda\0\0\0bnbwn\0\0\0bolpb\0\0\0bqkra\0\0\0braux\0\0\0brbel\0\0\0brbvb\0\0\0brcgb\0\0\0brcgr\0\0\0brern\0\0\0brfen\0\0\0brfor\0\0\0brmao\0\0\0brmcz\0\0\0brpvh\0\0\0brrbr\0\0\0brrec\0\0\0brsao\0\0\0brssa\0\0\0brstm\0\0\0bsnas\0\0\0btthi\0\0\0bwgbe\0\0\0bymsq\0\0\0bzbze\0\0\0cacfq\0\0\0caedm\0\0\0cafne\0\0\0caglb\0\0\0cagoo\0\0\0cahal\0\0\0caiql\0\0\0camon\0\0\0careb\0\0\0careg\0\0\0casjf\0\0\0cator\0\0\0cavan\0\0\0cawnp\0\0\0caybx\0\0\0caycb\0\0\0cayda\0\0\0caydq\0\0\0cayek\0\0\0cayev\0\0\0cayxy\0\0\0cayyn\0\0\0cayzs\0\0\0cccck\0\0\0cdfbm\0\0\0cdfih\0\0\0cfbgf\0\0\0cgbzv\0\0\0chzrh\0\0\0ciabj\0\0\0ckrar\0\0\0clipc\0\0\0clpuq\0\0\0clscl\0\0\0cmdla\0\0\0cnsha\0\0\0cnurc\0\0\0cobog\0\0\0crsjo\0\0\0cuhav\0\0\0cvrai\0\0\0cxxch\0\0\0cyfmg\0\0\0cynic\0\0\0czprg\0\0\0deber\0\0\0debsngn\0djjib\0\0\0dkcph\0\0\0dmdom\0\0\0dosdq\0\0\0dzalg\0\0\0ecgps\0\0\0ecgye\0\0\0eetll\0\0\0egcai\0\0\0eheai\0\0\0erasm\0\0\0esceu\0\0\0eslpa\0\0\0esmad\0\0\0etadd\0\0\0fihel\0\0\0fimhq\0\0\0fjsuv\0\0\0fkpsy\0\0\0fmksa\0\0\0fmpni\0\0\0fmtkk\0\0\0fotho\0\0\0frpar\0\0\0galbv\0\0\0gazastrpgblon\0\0\0gdgnd\0\0\0getbs\0\0\0gfcay\0\0\0gggci\0\0\0ghacc\0\0\0gigib\0\0\0gldkshvnglgoh\0\0\0globy\0\0\0glthu\0\0\0gmbjl\0\0\0gmt\0\0\0\0\0gncky\0\0\0gpbbr\0\0\0gpmsb\0\0\0gpsbh\0\0\0gqssg\0\0\0grath\0\0\0gsgrv\0\0\0gtgua\0\0\0gugum\0\0\0gwoxb\0\0\0gygeo\0\0\0hebron\0\0hkhkg\0\0\0hntgu\0\0\0hrzag\0\0\0htpap\0\0\0hubud\0\0\0iddjj\0\0\0idjkt\0\0\0idmak\0\0\0idpnk\0\0\0iedub\0\0\0imdgs\0\0\0inccu\0\0\0iodga\0\0\0iqbgw\0\0\0irthr\0\0\0isrey\0\0\0itrom\0\0\0jeruslm\0jesth\0\0\0jmkin\0\0\0joamm\0\0\0jptyo\0\0\0kenbo\0\0\0kgfru\0\0\0khpnh\0\0\0kicxi\0\0\0kipho\0\0\0kitrw\0\0\0kmyva\0\0\0knbas\0\0\0kpfnj\0\0\0krsel\0\0\0kwkwi\0\0\0kygec\0\0\0kzaau\0\0\0kzakx\0\0\0kzala\0\0\0kzguw\0\0\0kzksn\0\0\0kzkzo\0\0\0kzura\0\0\0lavte\0\0\0lbbey\0\0\0lccas\0\0\0livdz\0\0\0lkcmb\0\0\0lrmlw\0\0\0lsmsu\0\0\0ltvno\0\0\0lulux\0\0\0lvrix\0\0\0lytip\0\0\0macas\0\0\0mcmon\0\0\0mdkiv\0\0\0metgd\0\0\0mgtnr\0\0\0mhkwa\0\0\0mhmaj\0\0\0mkskp\0\0\0mlbko\0\0\0mmrgn\0\0\0mnhvd\0\0\0mnuln\0\0\0momfm\0\0\0mpspn\0\0\0mqfdf\0\0\0mrnkc\0\0\0msmni\0\0\0mtmla\0\0\0muplu\0\0\0mvmle\0\0\0mwblz\0\0\0mxchi\0\0\0mxcjs\0\0\0mxcun\0\0\0mxhmo\0\0\0mxmam\0\0\0mxmex\0\0\0mxmid\0\0\0mxmty\0\0\0mxmzt\0\0\0mxoji\0\0\0mxpvr\0\0\0mxtij\0\0\0mykch\0\0\0mykul\0\0\0mzmpm\0\0\0nawdh\0\0\0ncnou\0\0\0nenim\0\0\0nfnlk\0\0\0nglos\0\0\0nimga\0\0\0nlams\0\0\0noosl\0\0\0npktm\0\0\0nrinu\0\0\0nuiue\0\0\0nzakl\0\0\0nzcht\0\0\0ommct\0\0\0papty\0\0\0pelim\0\0\0pfgmr\0\0\0pfnhv\0\0\0pfppt\0\0\0pgpom\0\0\0pgraw\0\0\0phmnl\0\0\0pkkhi\0\0\0plwaw\0\0\0pmmqc\0\0\0pnpcn\0\0\0prsju\0\0\0ptfnc\0\0\0ptlis\0\0\0ptpdl\0\0\0pwror\0\0\0pyasu\0\0\0qadoh\0\0\0rereu\0\0\0robuh\0\0\0rsbeg\0\0\0ruasf\0\0\0rubax\0\0\0ruchita\0rudyr\0\0\0rugdx\0\0\0ruikt\0\0\0rukgd\0\0\0rukhndg\0rukra\0\0\0rukuf\0\0\0rukvx\0\0\0rumow\0\0\0runoz\0\0\0ruoms\0\0\0ruovb\0\0\0rupkc\0\0\0rurtw\0\0\0rusred\0\0rutof\0\0\0ruuly\0\0\0ruunera\0ruuus\0\0\0ruvog\0\0\0ruvvo\0\0\0ruyek\0\0\0ruyks\0\0\0rwkgl\0\0\0saruh\0\0\0sbhir\0\0\0scmaw\0\0\0sdkrt\0\0\0sesto\0\0\0sgsin\0\0\0shshn\0\0\0silju\0\0\0sjlyr\0\0\0skbts\0\0\0slfna\0\0\0smsai\0\0\0sndkr\0\0\0somgq\0\0\0srpbm\0\0\0ssjub\0\0\0sttms\0\0\0svsal\0\0\0sxphi\0\0\0sydam\0\0\0szqmn\0\0\0tcgdt\0\0\0tdndj\0\0\0tfpfr\0\0\0tglfw\0\0\0thbkk\0\0\0tjdyu\0\0\0tkfko\0\0\0tldil\0\0\0tmasb\0\0\0tntun\0\0\0totbu\0\0\0trist\0\0\0ttpos\0\0\0tvfun\0\0\0twtpe\0\0\0tzdar\0\0\0uaiev\0\0\0uasip\0\0\0ugkla\0\0\0umawk\0\0\0ummdy\0\0\0usadk\0\0\0usaeg\0\0\0usanc\0\0\0usboi\0\0\0uschi\0\0\0usden\0\0\0usdet\0\0\0ushnl\0\0\0usind\0\0\0usinvev\0usjnu\0\0\0usknx\0\0\0uslax\0\0\0uslui\0\0\0usmnm\0\0\0usmoc\0\0\0usmtm\0\0\0usndcnt\0usndnsl\0usnyc\0\0\0usoea\0\0\0usome\0\0\0usphx\0\0\0ussit\0\0\0ustel\0\0\0uswlz\0\0\0uswsq\0\0\0usxul\0\0\0usyak\0\0\0utc\0\0\0\0\0utce01\0\0utce02\0\0utce03\0\0utce04\0\0utce05\0\0utce06\0\0utce07\0\0utce08\0\0utce09\0\0utce10\0\0utce11\0\0utce12\0\0utce13\0\0utce14\0\0utcw01\0\0utcw02\0\0utcw03\0\0utcw04\0\0utcw05\0\0utcw06\0\0utcw07\0\0utcw08\0\0utcw09\0\0utcw10\0\0utcw11\0\0utcw12\0\0uymvd\0\0\0uzskd\0\0\0uztas\0\0\0vavat\0\0\0vcsvd\0\0\0veccs\0\0\0vgtov\0\0\0vistt\0\0\0vnsgn\0\0\0vuvli\0\0\0wfmau\0\0\0wsapw\0\0\0yeade\0\0\0ytmam\0\0\0zajnb\0\0\0zmlun\0\0\0zwhre\0\0\0") }, unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"\x02\0\0\0\x03\0\0\0\x04\0\0\0\x05\0\0\0\x06\0\0\0\t\0\0\0\x10\0\0\0\x11\0\0\0\x12\0\0\0#\0\0\0(\0\0\0)\0\0\0+\0\0\0,\0\0\x001\0\0\x003\0\0\x004\0\0\x006\0\0\0:\0\0\0@\0\0\0H\0\0\0R\0\0\0\\\0\0\0f\0\0\0t\0\0\0\x82\0\0\0\x8A\0\0\0\x92\0\0\0\x9C\0\0\0\xA6\0\0\0\xAE\0\0\0\xAF\0\0\0\xB2\0\0\0\xB4\0\0\0\xB8\0\0\0\xBB\0\0\0\xBC\0\0\0\xBE\0\0\0\xBF\0\0\0\xC4\0\0\0\xC8\0\0\0\xCA\0\0\0\xCB\0\0\0\xCD\0\0\0\xCF\0\0\0\xD0\0\0\0\xD6\0\0\0\xD8\0\0\0\xDA\0\0\0\xDD\0\0\0\xDF\0\0\0\xE0\0\0\0\xE4\0\0\0\xE6\0\0\0\xE7\0\0\0\xE8\0\0\0\xEA\0\0\0\xEB\0\0\0\xEC\0\0\0\xED\0\0\0\xF3\0\0\0\xF5\0\0\0\xF9\0\0\0\xFD\0\0\0\xFF\0\0\0\x05\x01\0\0\x0B\x01\0\0\x11\x01\0\0\x15\x01\0\0\x1D\x01\0\0\x1F\x01\0\0#\x01\0\0)\x01\0\0+\x01\0\0/\x01\0\x002\x01\0\x005\x01\0\x007\x01\0\08\x01\0\0>\x01\0\0@\x01\0\0A\x01\0\0D\x01\0\0H\x01\0\0L\x01\0\0Q\x01\0\0T\x01\0\0W\x01\0\0\\\x01\0\0b\x01\0\0c\x01\0\0h\x01\0\0k\x01\0\0n\x01\0\0q\x01\0\0r\x01\0\0w\x01\0\0{\x01\0\0}\x01\0\0\x80\x01\0\0\x84\x01\0\0\x87\x01\0\0\x89\x01\0\0\x8A\x01\0\0\x8B\x01\0\0\x8C\x01\0\0\x8D\x01\0\0\x8E\x01\0\0\x8F\x01\0\0\x91\x01\0\0\x92\x01\0\0\x95\x01\0\0\x97\x01\0\0\x9A\x01\0\0\x9B\x01\0\0\x9C\x01\0\0\x9E\x01\0\0\x9F\x01\0\0\xA1\x01\0\0\xA3\x01\0\0\xA4\x01\0\0\xA6\x01\0\0\xA7\x01\0\0\xAC\x01\0\0\xAF\x01\0\0\xB1\x01\0\0\xB3\x01\0\0\xB5\x01\0\0\xB6\x01\0\0\xB8\x01\0\0\xB9\x01\0\0\xBE\x01\0\0\xC5\x01\0\0\xC8\x01\0\0\xCA\x01\0\0\xCF\x01\0\0\xD0\x01\0\0\xD5\x01\0\0\xD6\x01\0\0\xDA\x01\0\0\xDC\x01\0\0\xDF\x01\0\0\xE0\x01\0\0\xE3\x01\0\0\xE6\x01\0\0\xE8\x01\0\0\xED\x01\0\0\xEF\x01\0\0\xF0\x01\0\0\xF1\x01\0\0\xF3\x01\0\0\xF6\x01\0\0\xF7\x01\0\0\0\x02\0\0\x04\x02\0\0\x05\x02\0\0\n\x02\0\0\x0B\x02\0\0\x0F\x02\0\0\x10\x02\0\0\x12\x02\0\0\x15\x02\0\0\x19\x02\0\0\x1E\x02\0\0\x1F\x02\0\0 \x02\0\0!\x02\0\0\"\x02\0\0#\x02\0\0$\x02\0\0%\x02\0\0&\x02\0\0)\x02\0\0*\x02\0\0,\x02\0\0.\x02\0\x000\x02\0\x003\x02\0\08\x02\0\0:\x02\0\0<\x02\0\0>\x02\0\0?\x02\0\0B\x02\0\0C\x02\0\0D\x02\0\0E\x02\0\0G\x02\0\0K\x02\0\0O\x02\0\0P\x02\0\0R\x02\0\0U\x02\0\0Z\x02\0\0[\x02\0\0^\x02\0\0_\x02\0\0c\x02\0\0f\x02\0\0i\x02\0\0j\x02\0\0k\x02\0\0p\x02\0\0q\x02\0\0t\x02\0\0w\x02\0\0x\x02\0\0y\x02\0\0z\x02\0\0}\x02\0\0\x7F\x02\0\0\x80\x02\0\0\x81\x02\0\0\x88\x02\0\0\x90\x02\0\0\x96\x02\0\0\x9D\x02\0\0\xA6\x02\0\0\xB0\x02\0\0\xB8\x02\0\0\xB9\x02\0\0\xBA\x02\0\0\xBB\x02\0\0\xBD\x02\0\0\xC1\x02\0\0\xC3\x02\0\0\xC4\x02\0\0\xCA\x02\0\0\xCC\x02\0\0\xD3\x02\0\0\xDB\x02\0\0\xE2\x02\0\0\xE5\x02\0\0\xE9\x02\0\0\xEB\x02\0\0\xEC\x02\0\0\xEE\x02\0\0\xEF\x02\0\0\xF1\x02\0\0\xF2\x02\0\0\xF3\x02\0\0\xF6\x02\0\0\xF9\x02\0\0\xFB\x02\0\0\xFD\x02\0\0\0\x03\0\0\x01\x03\0\0\x02\x03\0\0\x07\x03\0\0\t\x03\0\0\n\x03\0\0\x0B\x03\0\0\x10\x03\0\0\x15\x03\0\0\x19\x03\0\0\x1C\x03\0\0\x1E\x03\0\0\"\x03\0\0&\x03\0\0)\x03\0\0+\x03\0\x000\x03\0\x002\x03\0\x006\x03\0\x007\x03\0\09\x03\0\0:\x03\0\0>\x03\0\0@\x03\0\0A\x03\0\0F\x03\0\0G\x03\0\0P\x03\0\0R\x03\0\0T\x03\0\0V\x03\0\0X\x03\0\0Y\x03\0\0Z\x03\0\0[\x03\0\0\\\x03\0\0]\x03\0\0_\x03\0\0`\x03\0\0a\x03\0\0b\x03\0\0c\x03\0\0e\x03\0\0g\x03\0\0j\x03\0\0l\x03\0\0o\x03\0\0q\x03\0\0r\x03\0\0v\x03\0\0z\x03\0\0~\x03\0\0\x7F\x03\0\0\x84\x03\0\0\x86\x03\0\0\x87\x03\0\0\x8C\x03\0\0\x8E\x03\0\0\x96\x03\0\0\x9E\x03\0\0\xA4\x03\0\0\xAA\x03\0\0\xB0\x03\0\0\xB5\x03\0\0\xBA\x03\0\0\xC3\x03\0\0\xC8\x03\0\0\xD0\x03\0\0\xD7\x03\0\0\xDC\x03\0\0\xE1\x03\0\0\xE6\x03\0\0\xEE\x03\0\0\xF3\x03\0\0\xFB\x03\0\0\0\x04\0\0\x08\x04\0\0\x0F\x04\0\0\x16\x04\0\0\x1E\x04\0\0'\x04\0\0,\x04\0\x001\x04\0\x006\x04\0\x007\x04\0\08\x04\0\09\x04\0\0:\x04\0\0>\x04\0\0@\x04\0\0B\x04\0\0C\x04\0\0E\x04\0\0G\x04\0\0I\x04\0\0J\x04\0\0M\x04\0\0N\x04\0\0O\x04\0\0Q\x04\0\0U\x04\0\0X\x04\0\0Z\x04\0\0[\x04\0\0^\x04\0\0_\x04\0\0c\x04\0\0f\x04\0\0g\x04\0\0h\x04\0\0i\x04\0\0m\x04\0\0o\x04\0\0r\x04\0\0u\x04\0\0w\x04\0\0z\x04\0\0\x86\x04\0\0\x87\x04\0\0\x88\x04\0\0\x8A\x04\0\0\x8B\x04\0\0\x8F\x04\0\0\x99\x04\0\0\x9A\x04\0\0\x9B\x04\0\0\x9C\x04\0\0\xA1\x04\0\0\xA7\x04\0\0\xAC\x04\0\0\xAF\x04\0\0\xB0\x04\0\0\xB1\x04\0\0\xB5\x04\0\0\xB6\x04\0\0\xB9\x04\0\0\xBC\x04\0\0\xC0\x04\0\0\xC3\x04\0\0\xC4\x04\0\0\xC8\x04\0\0\xCA\x04\0\0\xCC\x04\0\0\xD1\x04\0\0\xD3\x04\0\0\xD5\x04\0\0\xD6\x04\0\0\xDB\x04\0\0\xE0\x04\0\0\xE1\x04\0\0\xE3\x04\0\0\xE6\x04\0\0\xEB\x04\0\0\xF0\x04\0\0\xF2\x04\0\0\xF3\x04\0\0\xF4\x04\0\0\xF5\x04\0\0\xF6\x04\0\0\xF7\x04\0\0\xF8\x04\0\0\xF9\x04\0\0\xFA\x04\0\0\xFB\x04\0\0\xFC\x04\0\0\xFD\x04\0\0\xFE\x04\0\0\xFF\x04\0\0\0\x05\0\0\x01\x05\0\0\x02\x05\0\0\x03\x05\0\0\x04\x05\0\0\x05\x05\0\0\x06\x05\0\0\x07\x05\0\0\x08\x05\0\0\t\x05\0\0\n\x05\0\0\x0B\x05\0\0\x0C\x05\0\0\r\x05\0\0\x0E\x05\0\0\x12\x05\0\0\x17\x05\0\0\x1A\x05\0\0\x1D\x05\0\0\x1E\x05\0\0!\x05\0\0\"\x05\0\0#\x05\0\0%\x05\0\0'\x05\0\0(\x05\0\0,\x05\0\0-\x05\0\0.\x05\0\0/\x05\0\x000\x05\0\x001\x05\0\0") }, unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"\0\0\0\0xXz\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xE8\xACj\0`Xt\0\0\0\0\0TWr\0\xC0\xB1\xD8\0\x88\xE8B\x01\xC4\xE8B\x01`\nI\x01\x08\xE8J\x01\0\0\0\0\0\0\0\0\0\0\0\0\xD8_?\x01\x18hB\x01X\xA2O\x01\\2R\x01\0\xA5w\x01\x90\xBE\x82\x01\xD0[\x87\x014\xE5\x8A\x01\xD4O\x8F\x01T\xBD\x92\x01\xE1Y\x97\x01\x80\xE3\x9A\x01aY\x9F\x01\0\xE3\xA2\x01\xE1X\xA7\x01T\xD2\xAA\x01\0\0\0\0\xD8_?\x01p\x88B\x01X\xA2O\x01\x103R\x01\0\0\0\0\0\0\0\0\xD8_?\x01\0\0\0\0\0\0\0\0X\x96 \0`\xF1b\0\xF0\x98f\x01\xE0\x96x\x01\0\0\0\0\xC0\x807\0\0\0\0\0\0\0\0\0@\xD2\x19\x01\0\0\0\0 K\xC1\0\xC0J\xC7\0\x98\x0F\xB1\x01\0\0\0\08\xF2\xB6\0\xE0\xC6\xEE\0\x94\xC7\xEE\0\xE0\x1D\xF2\0X`7\x01\0\0\0\0\x98\xCF\x97\0@\xF2\xAE\08\xF2\xB6\0\xE0\xC6\xEE\0\x94\xC7\xEE\0\xE0\x1D\xF2\0X`7\x01\0\0\0\0\x98\xCF\x97\0@\xF2\xAE\08\xF2\xB6\0\xE0\xC6\xEE\0\x94\xC7\xEE\0\xE0\x1D\xF2\0@2\x14\x01 \x9D\x14\x01\x98\xEA0\x01\0\0\0\0\x98\xCF\x97\0\x80L\xAB\08\xF2\xB6\0\xE0\xC6\xEE\0\x94\xC7\xEE\0\xE0\x1D\xF2\0@2\x14\x01 \x9D\x14\x01\x98\xEA0\x01\0\0\0\0\x98\xCF\x97\0 \x1A\xA7\0\xA0-\xAA\0\x80\xA3\xAE\08\xF2\xB6\0\xE0\xC6\xEE\0\x94\xC7\xEE\0\xE0\x1D\xF2\0\x98\xEA0\x01\0\0\0\0\xA0\x17\xA2\0\0\xD1\xA6\0\xA0\xD3\xA9\0 \xD9\xAB\08\xF2\xB6\0\xE0\xC6\xEE\0\xE0\x1D\xF2\0\xA0,\x14\x01\0b\x15\x01\x98\xEA0\x01\xE0e1\x01497\x01\08?\x01\0\0\0\0\x98\xCF\x97\0\0\xD1\xA6\0\xA0\xD3\xA9\0 \xD6\xAE\0`\xDE\xB1\0\xC0\xF1\xB6\08\xF2\xB6\0\xE0\xC6\xEE\0\x94\xC7\xEE\0\xE0\x1D\xF2\0\xA0\xFF\x13\x01`\xC4\x16\x01\x98\xEA0\x01\0\0\0\08\xF2\xB6\0\xE0\xC6\xEE\0\x94\xC7\xEE\0\xE0\x1D\xF2\0@2\x14\x01 \x9D\x14\x01\x98\xEA0\x01\0\0\0\0\x98\xCF\x97\0@\xF2\xAE\08\xF2\xB6\0\xE0\xC6\xEE\0\x94\xC7\xEE\0\xE0\x1D\xF2\0\x98\xEA0\x01\0\0\0\0\x98\xCF\x97\0@\xF2\xAE\08\xF2\xB6\0\xE0\xC6\xEE\0\x94\xC7\xEE\0\xE0\x1D\xF2\0@2\x14\x01\xC0u\x14\x01X`7\x01\0\0\0\0\x98\xCF\x97\0\x80L\xAB\08\xF2\xB6\0\xE0\xC6\xEE\0\x94\xC7\xEE\0\xE0\x1D\xF2\0\xA0,\x14\x01\0b\x15\x01\x98\xEA0\x01\0\0\0\08\xF2\xB6\0\xE0\xC6\xEE\0\x94\xC7\xEE\0\xE0\x1D\xF2\0\0'\x14\x01 \x9D\x14\x01\x98\xEA0\x01\0\0\0\0\0\0\0\0\x08ZR\0@IX\0\0\0\0\0 \x05\x08\0\0\0\0\0 \x05\x08\0\x9Eb\xEF\0 \xC1\xF0\0\0\0\0\0 \x05\x08\0\xC0\x17\xAF\0\0\0\0\0\0\0\0\0\xAB\x857\x01\0\0\0\0\0\0\0\0 \x05\x08\0\xC0\x17\xAF\0\xA0\x8C\xB4\0 >\xBF\0\0\0\0\0 \x95Y\0\x86\xF3v\0\x80]|\0\0\0\0\0 \x05\x08\0\0\0\0\0\0\0\0\0\xD8\x857\x01\0\0\0\0 \x05\x08\0\0\0\0\0\0\0\0\0TWr\0\0\xA7\xD0\0\x88\xE8B\x01\xC4\xE8B\x01\xA4\rk\x01\0\0\0\0\xA0\x8Eg\0\0\0\0\0l\xAAR\0\0\0\0\0 \09\x01\x80\xBA<\x01\0\0\0\0 /8\0\0\0\0\0\0\0\0\0d3J\0\x90Xb\0\x942f\0\0\0\0\0@a\x13\0\0\0\0\0\0\0\0\0\0\0\0\0\xB8\xAC\"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0X\xCC\x9E\0\xE0A\xCE\0\xB8\x8A\x07\x01@\x85W\x018\x83\x7F\x01\0\0\0\0\xB8\xF4\x8E\0\0\0\0\0\xF4\xF4\x8E\0\0\xB6\xEE\0\x94\xC7\xEE\0\0\0\0\0\xF4\x8A\x07\x01\x80\xE0\x16\x01\x14\xF9\x87\x01\0\0\0\0\x14\xF9\x87\x01\0\0\0\x000\xF5\x8E\0`\x86\xBE\x000\xF1\xCE\0\xC0\xCD4\x01\xE0\xFA_\x01\0\0\0\0\x1C\xCC\x9E\0\0\xB6\xEE\0\x1C\xC7\xEE\0@f\xFE\0\xDC\x14\xFF\0\0\0\0\0X\xCC\x9E\0\0\xB6\xEE\0X\xC7\xEE\0@f\xFE\0\x18\x15\xFF\0\0\0\0\0\xF4\xF4\x8E\0`\x86\xBE\0\xF4\xF0\xCE\0\0\0\0\0X\xCC\x9E\0\0\xE5\xCE\0\xB8\xF0\xCE\0\0\xB6\xEE\0X\xC7\xEE\0@f\xFE\0\x18\x15\xFF\0\0\0\0\0\xF4\xF4\x8E\0\0\0\0\x000\xF5\x8E\0\xC0\xCD4\x01\xE0\xFA_\x01\0\0\0\0X\xCC\x9E\0\0\xB6\xEE\0X\xC7\xEE\0@f\xFE\0\x18\x15\xFF\0\0\0\0\0\xD8\xF8\x87\x01\0\0\0\0\xB8\x8A\x07\x01`^O\x018\x83\x7F\x01\0\0\0\0\xF4\xF4\x8E\0\xC0\xCD4\x01\0\0\0\0(\xAE\x1A\0 \x1A \0\0\0\0\0@m\x8E\0\0\0\0\0\0\0\0\0\x90Wr\0\xD8|\xAA\0\xC4\xE8B\x01\0\xE9B\x01\xF8\xE8J\x01\0\0\0\0\xEC\x05h\0\0\0\0\0\0\0\0\0\xE0\xF6\x82\0\xA0m\x88\0\0\0\0\0\x1C\xF7\x82\0\xA0m\x88\08\x98j\x01\0\0\0\0@\n\x10\0\xEC\xAD\x1A\0 \x1A \0\0\0\0\0\x15\x7F\x8A\0Y~\x92\0u\x9AJ\x01`\xB8O\x01\0\0\0\0\xEC\xAD\x1A\0 \x1A \0\0\0\0\0h\xEC\"\x01\xA4\xEC\"\x01\0\0\0\0l\xAE\x12\0\0\x15\x18\0,\xEC\"\x01@\xF0(\x01\0\0\0\0\xA4\xF6\x82\0\xD4\xC6\xFA\0\xA4\xEC\"\x01\xB8\x88'\x01\x14u*\x01\0\0\0\0\0\0\0\0\xF7~\x8A\0;~\x92\0W\x9AJ\x01`\xB8O\x01\0\0\0\0(\xAE\x1A\0 \x1A \0\0\0\0\0\x1C\xF7\x82\0\xA0m\x88\0\0\0\0\0`\xED\x1A\x01 \xEB \x01\0\0\0\0\0\0\0\0\xE0\xF6\x82\0Xd\xF7\0@\x8B\xF7\0\xD4\xC6\xFA\0\0\0\0\0\x80\xAC\x1E\0\x80>P\0`\xF7\x97\x01\0\0\0\0\x1C\xF7\x82\0\0\0\0\0\xA4\xF6\x82\0\xD4\xC6\xFA\0\0\0\0\0\x80>P\0\xE0\xF6\x82\0\x1C\xF7\x82\0\0\0\0\0\x80>P\0`\xF7\x97\x01\0\0\0\0\xB8\xAD\x12\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@IX\0\0\0\0\0\0\0\0\0 G\0Z\x1C\xA7\0\0\0\0\0p\xA6\x8E\0\0\0\0\0\xF0\x98f\x01\xE0\x96x\x01\0\0\0\0\0\0\0\0\0\0\0\0|\xC9\xAA\0\0\0\0\0\0\0\0\0\xB0A\xB3\0\0\0\0\0\xAC\xED\xB0\0\0\0\0\0\0\0\0\0\xB8T/\0\0\0\0\0\0\0\0\0\x8C\x9F\xE2\0\xC0\r\xE6\0\x80\xADv\x01\xBC\xD1\x7F\x01\0\0\0\0\x8C\x9F\xE2\0\xC0\r\xE6\0\0\0\0\0`9H\0\0\0\0\0\x80>P\0\0\0\0\0@IX\0\0\0\0\0\0\0\0\0\x80>P\0\0\0\0\0\0\0\0\0\x8E\xAD\x1E\0\0\xAC&\0Xd\xF7\0h\xEC\"\x01\0\0\0\0\xC4\x8B\n\0@\x9F>\0D\x01B\0\xA0\xC5N\0$\xC5R\0@\xECZ\0\0\0\0\0\x80h\x80\0\x8C\xD9\xB7\0\0\0\0\0P\xD9\xB7\0\0\0\0\0\x90Wr\0Pe\xEF\0\xE0\xEF\x01\x01\xC4\xE8B\x01\0\0\0\0\0\0\0\0`m2\0\x9C\x0C\x83\x01\xB4\xD1\x87\x01<\xD6\xAD\x03\0\0\0\0\0\0\0\0d\x85C\0\x80\xFEq\0\x80h\x80\0\0\0\0\0\x80ZR\0\0\0\0\0\\4B\0`9H\0\0\0\0\0\0\0\0\0\xE41b\0\x80Sh\0\0\0\0\0\xE41b\0\x80Sh\0\0\0\0\0l\x08\x99\x01\0\0\0\0\x80\xF6j\0\xF8\tv\0\0\t~\0\xCCsF\x01\0\0\0\0\0\xBC\xE8\0\0\0\0\0\0\0\0\0\0\0\0\0@IX\0\0\0\0\0\x84\r2\0 /8\0\0\0\0\0\0\0\0\0\xCC\x95\xCA\0\0\xA7\xD0\0\xAC\xBB\xE2\0\0\xBC\xE8\0\xCC\xE9*\x01\xE0Q6\x01\x8C\xDD:\x01\x80\x0FQ\x01\0\0\0\0\xF8\xAD\x0E\0\x9Cz\xCA\0\0\xA7\xD0\0\0\0\0\0\0\0\0\0TWr\0\xA0z\xC6\0\x88\xE8B\x01\xC4\xE8B\x01\0\0\0\0\0\0\0\0\xF8\xAD\x0E\0\x9Cz\xCA\0\0\xA7\xD0\0\0\0\0\0\0\0\0\0`N`\0\0\0\0\0\xF8ZR\0\0\xA7\xD0\0\0\0\0\0\xF8ZR\0|1\xAB\x01\x1C\xF6\xAF\x01\0\0\0\0\xF8ZR\0p[R\0\xA02Z\0 X\xB3\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xAC=R\0@IX\0\0\0\0\0\0\0\0\0\xAC\x89#\x01\0\0\0\0\xA4\xA8:\0\0\0\0\0@\x1F(\0\0\0\0\0\xC0\xC7,\0\x1C|\xB2\0\0\0\0\0\xCC\x95\xCA\0\0\xA7\xD0\0\xAC\xBB\xE2\0\0\xBC\xE8\0\0\0\0\0\x96\x1EK\0\0\0\0\0\x0C\xB1#\x01\0\0\0\0\xA0\x8Eg\0\0\0\0\0\0\0\0\0(1j\0\xA0Xp\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xC0r\x90\0\0\0\0\0\xF8\xAD\x0E\0\x9Cz\xCA\0\0\xA7\xD0\0\0\0\0\0\xF8\xAD\x0E\0\x9Cz\xCA\0\0\xA7\xD0\0\0\0\0\0\0\0\0\0\0\xA7\xD0\0\0\0\0\0`\xF1b\0\x80\xEA*\x01\0\0\0\0@\x9F>\0\xF4\x05B\0`9H\0\x92\x14\xA3\x01\0\0\0\0\0\0\0\0dnK\0\x80>P\0\0\0\0\0\0\0\0\0\xF8\xAD\x0E\0\x9Cz\xCA\0\0\xA7\xD0\0\0\0\0\0 \x1A \0h\xF6\x82\0\0\0\0\0L&\x9B\x01 \xEB\xA7\x01\0\0\0\0\0\0\0\0\0\0\0\0\xDCVr\0`\xCC\x1D\x01\x10\xE8B\x01L\xE8B\x01\0\0\0\0\0\0\0\0\09N\0@\x9C\xC8\0\0\0\0\0\09N\0@\x9C\xC8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xC0\x1Bn\x01\xE2\xF2\x83\x01\0\0\0\0\xE0@\x93\0\0\0\0\0\0\0\0\0\0\0\0\0\xE0H^\0\xA0Hb\0\x18Wr\0\x18{\xC6\0L\xE8B\x01\x88\xE8B\x01\0\0\0\0\x80CZ\0\xE0H^\0\xA0Hb\0\x18Wr\0\xB8\x89\x17\x01L\xE8B\x01\x88\xE8B\x01\0\0\0\0\xDCVr\0\xB8\x89\x17\x01\x10\xE8B\x01L\xE8B\x01`\xAF\xB2\x01\0\0\0\0\xE0H^\0\xA0Hb\0\x18Wr\08\xA0\xEA\0L\xE8B\x01\x88\xE8B\x01\0\0\0\0\x80CZ\0\xE0H^\0\xA0Hb\0\x18Wr\0\xB8\x89\x17\x01L\xE8B\x01\x88\xE8B\x01`\xAF\xB2\x01\0\0\0\0\x80CZ\0\xE0H^\0\xA0Hb\0\x18Wr\0\x98\xF2\xB0\0\x10\xE8B\x01L\xE8B\x01\x88\xE8B\x01\xC0\0\x89\x01\0\0\0\0\x80CZ\0\xE0H^\0\xA0Hb\0\x18Wr\0X|\xB2\0L\xE8B\x01\x88\xE8B\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@IX\0\0\0\0\0\xA0\xD6\xD3\0\xFE8\xD7\0>4#\x01\0\0\0\0\0,\x10\0\0\0\0\0\0\0\0\0\x90Wr\0|\xA0\xE2\0\x9Cd\xEF\0 \xD6\x08\x01\xC4\xE8B\x01\0\0\0\0 /8\0\0\0\0\0\x90Wr\0@\xA1\xD2\0@\"\xD9\0\0\r\xF2\0\x80\xD1\xF8\0\xC4\xE8B\x01\0\0\0\0`N`\0Hw\x9A\0\x806\xA3\0\xA0\xA6\xD6\0@\xC2\xDE\08\xF6W\x01X\xA1_\x01\0\0\0\0d\x85C\0\x80\xFEq\0\x80h\x80\0\x9C\x0C\x83\x01\xB4\xD1\x87\x01<\xD6\xAD\x03\0\0\0\0\x84\r2\0 /8\0\0\0\0\0\x90Wr\0\xC0\xB1\xD8\0\xC4\xE8B\x01\0\0\0\0\xA0\x8Eg\0\0\0\0\0\0\0\0\0\xA0\xB0\xBD\0\0\0\0\0\0\0\0\0\xA0\x8Eg\0\0\0\0\0\0\0\0\0\0\0\0\0@4@\0X\x06s\x01\0\0\0\0@4@\0\x1C\x06s\x01\0\0\0\0\x96\x1EK\0\0\0\0\0\xA4\xA8:\0\0\0\0\0\x80ZR\0\xE02V\0\0\0\0\0\0\0\0\0\0\0\0\0\x84J\x13\0\xA0\t\x1A\0\xC08R\0@IX\0\0\0\0\0\x8C\x867\x01\0\0\0\0\0\0\0\0\0\0\0\0T\xC8\xE2\0D\xC8\xF2\0\0[\xA3\x01\xD8\xF6\xA7\x01\0\0\0\0T\xC8\xE2\0D\xC8\xF2\0\xD8\xF6\xA7\x01\xC0\xA4\xA8\x01\0\0\0\0\x18-`\0xe\xE5\0\xC4Z\xA3\x01\0\0\0\0\0\xA7\xD0\0\x80\xC8\xF2\0\0\0\0\0\xC0r\x90\0\0\0\0\0D\xC8\xF2\0@\xEA\x01\x01\xC4Z\xA3\x01\0\0\0\0\x18-`\0x\x02g\0\xC4Z\xA3\x01\0\0\0\0\xC0r\x90\0\xC4Z\xA3\x01\0\0\0\0\0[\xA3\x01\0\0\0\0T\xC8\xE2\0D\xC8\xF2\0\xD8\xF6\xA7\x01\xC0\xA4\xA8\x01\0\0\0\0\0[\xA3\x01\0\0\0\0`$0\0\x1C\xF7\x82\0\xE0\xCB\xF8\0\0\0\0\0\0\0\0\0\x80L`\0\0\0\0\0\0\0\0\0 Y\xC2\0\x80\x96~\x01`\xB5\x7F\x01\0\0\0\0D\x01\xD8\0\0\0\0\0\0\0\0\0x\xAC&\08q)\0x5o\x01\xC08\x8D\x01\0\0\0\0\0\0\0\0\0\xB8\x1A\0\0\")\0\x8C\xE5Q\0\xD0\x8D\xB0\0\xC0j\xB6\0\xA0\x97\xB8\0\xC0\xB1\xD8\0$\x8A#\x01\0\0\0\0 /8\0\0\0\0\0\x80>P\0\0\0\0\0\x80h\x80\0\0\0\0\0\xD8\x1AI\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xB0\x9D\xC0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0x\x0Ei\x01\0\0\0\0\x04\x94\xA3\0\0\0\0\0\xA0\xDD\t\0\xB8G;\x01\0\0\0\0 /8\0\0\0\0\0 \xE7R\0\xA0m\x88\0\0\0\0\0`C\xE3\0\0\0\0\0\0\0\0\0\x80Yb\0\x80W\x82\0`\x0B\x85\0\0\0\0\0\xBC\r6\0\xDC{\xB6\0|\xA1\xD2\0\0\0\0\0 2b\0\xBC{\xB8\0P\0\0\0\0\0\x80L`\0\0\0\0\0\0\0\0\0\xA0\x8Eg\0\0\0\0\0\x80>P\0\0\0\0\0`9H\0\0\0\0\0\0\0\0\0dnK\0\x80>P\0\0\0\0\0\0\0\0\0\0\0\0\0\xE0]v\0\0\0\0\0\xCC\xF4z\0\xB0\x12\xF1\0\xE0\xFC\x99\x01\0\0\0\0\xBC9\x81\x01\x18?\x89\x01\0\0\0\0\x8C\x1C\x93\0\0\0\0\0\0\0\0\0\xCC%\xA3\x01 \xEB\xA7\x01\0\0\0\0\0\0\0\0`9H\08\x98j\x01T\xBE\x82\x01\0\0\0\0 \x82N\0`\xB7Q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xDCVr\0\x18\x0C\xAE\0\x10\xE8B\x01\0\0\0\0@\x04Q\x01\0\0\0\0@\xD82\0\xA0w\xF6\0\0\0\0\0L\xE8B\x01\x88\xE8B\x01\0\0\0\0<\xEA2\x01\0\0\0\0\0\xBC\xE8\0\x90\xF6w\x01\0\0\0\0\xE43B\0 #D\0\xE8\xF5l\0\xB8\x0Cw\0d\xC3\"\x01@\xF0(\x01\xBC\xE8J\x01\\\xEEJ\x01\x9C\x0Ec\x01<\x14c\x01\xE0\xA7v\x01\0\0\0\0\0\0\0\0\0\0\0\0d1L\0\0\0\0\0\0\0\0\0\x90Wr\0 \x93\xD3\0\xC4\xE8B\x01\0\0\0\0\x90Wr\08}\xA4\0@I\xB2\0\xC0?\xC3\x004?\xD7\0\xFC\xA0\xDA\0\xC4\xE8B\x01\xD8\x0Ec\x01\x18\xACg\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x000L)\0\xA0\xA4o\0\x94\xF7\x82\0\xD0\xF7\x82\0\0\0\0\0(\xAE\x1A\0\xB86 \0x\xAC&\0\xC8J)\0 \xEB \x01\0\0\0\0\xF4K)\0\xA0\xA4o\0X\xF7\x82\0\x94\xF7\x82\0\0\0\0\0\xA0\xAE\x1A\08\xD4 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\x15\x18\0\xA87 \08\xAC*\0\0\0\0\0\0\0\0\0(\xAE\x1A\0 \xEB \x01\0\0\0\0(\xAE\x1A\0 \xEB \x01\0\0\0\0|K)\0\xB8\xF6n\0\x1C\xF7\x82\0\0\0\0\0\xA4\xF6\x82\0x\xEB\"\x01\0\0\0\0\0\0\0\0(\xAE\x1A\0\xB86 \0x\xAC&\0\0\0\0\08\xAD\x1A\0\0\0\0\0\xA4\xEC\"\x01\0\0\0\0\x1C\xF7\x82\0\xF8\xD2o\x01\xD8\xF8\x87\x01\xF8\xA9\x89\x01\0\0\0\0\xE0\xEC\"\x01\0\0\0\0\xE0\xEC\"\x01\0\0\0\0\0\0\0\0(\xAE\x1A\0x\xEB\"\x01\xA4\xEC\"\x01\x98\xAF/\x01\0\0\0\x000L)\0\xA0\xA4o\0X\xF7\x82\0\xD0\xF7\x82\0\0\0\0\0\0\0\0\0\x1C\xF7\x82\0\0\0\0\0(\xAE\x1A\0x\xEB\"\x01\0\0\0\0(\xAE\x1A\0x\xEB\"\x01\xA4\xEC\"\x01\xD8t*\x01\0\0\0\0\xA4\xF6\x82\0x\xEB\"\x01\xA4\xEC\"\x01\x98\xAF/\x01\0\0\0\0x\xD5G\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0X\x86\x12\0\0\xE7'\0p6g\x01\0\0\0\0\x80CZ\0\xE0H^\0\xA0Hb\0L\xE8B\x01\0\0\0\0\x10\xE8B\x01L\xE8B\x01\0\0\0\0dnK\0\x80>P\0\0\0\0\0\0\0\0\0\xB4t0\x01\xD6\xD2s\x01\0\0\0\0\0\0\0\0\0\0\0\0 \xB4+\0\0\0\0\0P\x16\xB7\0\0\0\0\0\0\0\0\0\x18\xEBF\x01@\x04Q\x01\xEC/\x97\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0") }, unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"\x08\0\x08\x08 \0$\0\xE0\0\xE0\0\x08\x08\x08\0\x08\x08 \x08 \0 \x08\x18\x08 \0 \x08 \0\xE0\0\x08\0@\0X\0@\0X\0@\0X\0@\0X\0@\0X\0@\0X\0@\0X\0@\0X\0@\08\0(\08\0(\08\0P\x000\0(\0`\x08\xE8\x08\xE8\0\xE0\x08\xE0\0\xE8\0\0\0\xE8\0\x18\0\0\0\0\x108\0\0\08\0(\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xE8\x08\xE8\0\xE8\x08\xE0\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xE8\x08\xE8\0\xE8\x08\xE0\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xE8\0\xE0\0\xE8\x08\xE8\0\xE8\x08\xE0\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xE8\0\xE0\0\xE8\x08\xE8\0\xE8\x08\xE0\0\xE0\x08\xE0\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xE8\x08\xE8\0\xE8\x08\xE0\0\xE0\x08\xE0\0\xE8\x08\xE8\0\xE0\x08\xE8\0\xE0\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xE8\0\xE8\x08\xE0\0\xE0\x08\xE0\0\xE0\x08\xE0\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xE8\0\xE0\0\xE8\x08\xE8\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xE8\0\xE0\0\xE8\x08\xE8\0\xE8\x08\xE0\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xE8\x08\xE8\0\xE8\x08\xE0\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xE8\0\xE0\0\xE8\x08\xE8\0\xE8\x08\xE0\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xE8\0\xE0\0\xE8\x08\xE8\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xE8\0\xE0\0\xE8\x08\xE8\0\xA8\0\x08\x08\x08\0\x08\x08L\0L\x08L\0L\x08L\0L\x08P\0P\x08P\0L\0F\x08F\0P\x08P\0P\x08P\0P\x08P\0P\0T\x08T\0T\x04P\0P\x08P\x08@\x08@\0P\0P\x08\xE0\0 \x08 \0 \x08\x18\x08 \x08 \0\x08\0\x08\x08\xE0\x08\xE0\x000\x000\x080\0\x08\0\x08\x08\0\0\x10\0\x10\x08\x10\0\x10\x08 \0\x18\0\x10\0\x08\0\xE0\0\xE0\x08@\0\xE0\0\xE0\0\xE8\x08\xE8\0\xE8\x08\xE8\0\xE8\x08\xE8\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xE0\x08\xE0\0\xE0\x08\xE0\0\xE0\x08\xE0\0\xE0\x08\xE0\0\xD8\x08\xD8\0\xD8\x08\xD8\0\xE0\0\xD8\0\xF0\x08\xF0\0\xF0\x08\xF0\0\xF0\x08\xF0\0\xE8\x08\xE8\0\xE8\x08\xE8\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xE0\x08\xE0\0\xE8\x08\xE8\0\xE8\x08\xE8\0\xE8\x08\xE8\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xD8\x08\xD8\0\xE0\0\xD8\0\xE8\x08\xE8\0\xE8\x08\xE8\0\xE8\x08\xE8\0\xE8\x08\xE8\0\xE8\x08\xE8\0\xE8\x08\xE8\0\xE0\x08\xE0\0\xE8\0\xD8\x08\xD8\0\xD8\x08,\x000\0\x10\0\x18\x08\x18\0\x18\x08\x10\x08\x10\0\x18\0\xD0\x08\xD0\0\xC8\0\xC8\x08\xC8\0\xC8\x08\xC0\x08\xC0\0\xC0\x08\xC8\0\xE0\0\xE0\x08\xE0\0\xE0\x08\xE0\x08\xE0\x10\xE0\x08\xE0\0\xE0\x08\xE0\x08\xE0\0\xE0\x08\xD8\x08\xD0\x08\xD8\x08\xE0\x08\xE0\0\xE0\x08\xE0\0\xE0\x08\xD0\x08\xD8\0\xD0\x08\xD0\0\xD8\0\xD0\x08\xD0\0\xE4\x08\xE4\x10\xE4\x08\xE4\0\xE4\x08\xD8\x08\xD8\0\xD8\x08\xC0\x08\xC0\0\xC0\x08\xD0\x08\xD0\0\xD0\x08\xE0\0\xC8\x08\xD0\0\xD8\0\xD0\0\xC8\x08\xB8\0\xC0\0\xC0\x08\xC8\0\xC0\x08\xC8\0\xD0\x08\xD8\0\xD0\x08\xC8\0\xC8\x08\xC0\x08\xC8\x08\xC0\0\xC0\x08\xC8\0\xC8\0\xD0\0\xD8\x004\0\x10\0\x08\0\x08\0\x08\0\x08\0\x08\x08\0\0\xAC\0\xB0\x04\xB0\0\xC8\x08\xD0\x08\xE0\x08\xE0\0\xE8\0\xE0\x08\x08\0@\x08@\x000\0\xD8\x08\xD8\0\xD0\x08\xD0\0\xD8\x08\xF0\0\xF8\08\0\x10\x08\x10\0\x10\x08\x18\0\x10\x08\x10\x08\x10\0\x10\x08\x08\0\x08\x08\x08\0\x08\x08\x08\0\x08\x08\x18\0\x08\0\x08\x08\xE0\0\xD8\x04\xD8\0\xE0\0\xD8\x08\xE0\0\0\x08\0\0\x08\x08\x08\0\0\x08\0\0\x08\0\xD8\0\xD0\x08\xD0\0\xD8\x08\xD8\0\x18\x08\x10\x08\x10\0\x18\x08\x10\x08\x10\x08\xF8\0\0\x08\0\0\0\x08\0\0\x18\0\0\x08\0\0\x08\0\x08\x08\0\0\0\x08\x08\x08\x08\0\x08\x08\x18\0\x10\x08\x10\0\x10\x08\x10\x08\x10\0\x10\x08`\x08`\0\xE0\0\xE8\x08\xE8\0\xE0\x08\xE8\0`\0X\0X\0P\0\0\0\0\x08\x08\x08\x08\0\x08\x08\x08\0\x10\x08\x10\0\x10\x08\x10\0\x10\x08\x10\0\x10\x08\x10\0\x10\x08\x08\0\0\x08\0\0\0\x08\xE0\0 \x08\x18\0 \x08\x18\x08 \0\xE8\0\x08\0\0\x08\0\0\0\x08\0\0\x08\0\x08\x08\xE8\0\xE8\x08\0\0\xE8\0\xE8\x08\xF0\0\xF0\x08\xF0\0\xF0\x08\xF0\0\xF8\x08\xF0\x08\xE0\x08\0\0\0\0\0\0\xE0\0\xE0\0\xE0\0\x08\0\x10\x08\x10\0\x10\x08\xF0\0\xD0\x08\xD0\0P\x08P\0\xF8\0\0\0\xE2\0\xE8\0\xE0\0\x10\x08\x10\0\x10\x08\x10\0\x10\x08@\x08@\0\xD0\x08\xD0\0\x08\0\x08\x08\xD8\x08\x08\x08\x08\0\x08\x08H\08\0@\0@\08\0\x08\0\0\x08\0\0\0\x08\x08\0\0\x08\0\0\0\x08,\0(\x000\0\x18\0\x18\x08\x18\0\x1C\0 \x08 \0\x1C\x08\x1C\0\0\0\x08\x08\x08\0\x08\x08\x10\x08\x08\0\0\x08\0\0\0\x08\xD8\0\xD8\x08\xD8\0\x10\x08\x10\0\x18\0H\0\x18\x000\x08(\x000\x08(\x080\08\0\xAB\0\xB0\0p\0\xA0\0\xA8\0h\0`\0\x18\0\xE0\0H\0D\0H\0H\x08H\0\x18\0\xD8\0(\x000\0(\x08(\0(\x08 \x08(\0(\0(\x080\0(\x08(\0(\x08 \x08(\x000\x080\x000\x08(\x080\0(\0(\x000\0(\x08(\0(\x08 \x08(\0(\0(\x080\0(\x08(\0(\x08 \x080\0(\0(\0(\x080\0(\x08(\x000\x08(\x08 \x080\0(\0(\0(\x080\0(\x08(\0(\x08 \x08(\08\0\x10\x08\xE0\0\x08\0\x08\x08,\x004\x000\0,\0\xFB\0\0\0\x10\0\x18\x08\x10\0\x08\x08\x10\0\x18\x08\x10\x08\x08\0\x08\x08\x18\x08\x10\x08\x10\0\x10\x08\x10\0\x18\x08\x10\x08\x10\0\x08\x08\x08\0\x10\0\x08\0\x10\0\x08\0\x10\0\0\x08\0\0\x08\0\0\x08\0\0\0\x08\0\0\x08\x08\x08\0\x08\x08\x18\x08\x10\0\x18\x08\x10\x08\x08\0\x08\x08\x18\0\xA0\0`\0`\0\x08\0\x08\x08\0\x004\x000\08\x088\08\0@\x08@\0@\x08@\0P\x08P\0\xE0\0\xE0\x08\xE0\0\0\0\xE0\0\x08\x08\x08\0\x08\x08\x08\0\x08\x08 \x08 \0(\0\x10\0\xD0\0\xD0\x08\xC8\x08\xC8\0\xD0\0\xD0\0\xD0\x08\xC8\x08\xD0\0\xC8\x08\xD0\0\xD8\0\xD0\x08\xD8\0\xC8\0\xC8\x08\xC8\0\xD0\0\xD0\x08\xD0\x08\xD0\0\xD0\x08\xD0\0\xD0\0\xD8\0\xD0\x08\xD0\0\xD0\0\xD0\x08\xD0\0\xC8\x08\xC8\0\xD0\0\xD0\x08\xC8\x08\xD0\0\xD0\x08\xC8\x08\xD0\0\xC0\0\xC0\x08\xC0\0\xC0\x08@\0<\0@\0\x10\0\x10\0\x08\x08\x08\0\x10\0X\x08X\0\x08\0\\\0\\\x08\\\0X\0X\x08\x08\0\xD0\0\xD8\0\xD0\x08\xD0\0\xD8\0\xD0\0\xD8\0\xD0\x08\xD0\0\x08\0\x08\x08\x08\0\x08\x08,\0.\0\\\0`\0\xA8\0`\x08f\x08 \0\xD8\0\xD8\x08\xD8\0\xB8\0\xB4\0\xB0\0P\0P\0X\0@\x08@\0(\0(\x08(\0\x08\0\x08\x08\xE0\0\xE8\0\xE8\x08\xBC\0\xC0\0\xE0\0\0\0\0\x08\0\0\0\x08\x08\0\0\x08\x08\x08\0\x08\xF8\0\xF8\x08\0\x08\xF8\x08H\0\xE0\0\xE8\0\xE0\x08\xE0\0\xE8\0 \0\x18\0 \0\x10\x08\x10\0\x10\x08\x10\0\x10\x08\x08\0\x08\x08 \x08 \0 \x08\x18\x08\x18\0 \0\x18\0 \08\x088\08\x080\x080\08\x000\08\0H\x08@\x08H\0P\0@\0H\0h\x08`\x08X\x08`\0X\0`\0X\x08P\x08X\0`\0P\0X\0@\x088\x08@\0H\0@\0\x18\x08\x10\x08\x10\0\x18\0\x10\0H\x08H\0P\x08H\x08@\x08P\0X\0P\0H\08\x080\x088\0@\08\0 \x08\x18\0 \x08\x18\x08\x10\x08 \0\x18\0 \0 \x08 \0 \x08\x18\x08\x18\0 \0\x18\0\x18\x08\x10\x08\x18\0 \0\x18\08\x080\x088\x000\08\x000\x08(\x080\08\x000\08\x088\08\x080\x080\08\x000\08\0`\x08X\x08`\0X\0`\0 \x08 \0 \x08\x18\x08\x18\0 \0\x18\0 \0X\x08P\x08X\0`\0X\08\x088\08\x080\x080\08\x000\08\0 \x08\x18\x08\x10\x08\x18\0 \0\x18\0 \0H\0X\x08P\x08X\0`\0X\0P\0X\x08X\0X\x08P\x08P\0X\0P\0X\0 \x08 \0 \x08\x18\x08\x18\0 \0\x18\0 \0\x18\0P\x08H\x08P\0X\0P\0(\x08 \x08(\x000\0(\0H\x08@\x08H\0P\0H\0\x10\0\x18\0X\0 \0\x10\x08\x10\0\x18\0\x10\0\x08\0\x08\x08<\0@\0\0\0\x08\0\x08\x08\x08\0\x08\x08\x08\0\x08\x08\0\0\x08\x08\x08\0\x08\x08\0\0\x18\0\xE4\0\xE8\0\x10\x08\x10\0\x18\0\x10\0\0\0\x08\0\0\0\xD0\x08\xD0\0\xE0\0\x10\x08\x10\0\x18\0\x10\0\xD8\0\xD8\x08\xE0\0\xD8\x08\x08\0\x08\x08\x08\0(\0\0\08\x000\x08(\x080\x08(\0\xA8\0h\0H\0@\0H\0(\x08 \x08(\0\x08\x08\x08\0h\0h\x08h\0\x10\x08\x10\0\x18\x08\x18\0\x10\x08\x10\0\x10\x08\x10\0\x10\x08\x10\0\x10\x08\x18\0\xE0\0`\0@\x08@\0\x18\0\x18\x08\x10\x08\x18\x08\x10\x08\x18\x08\x18\0\x10\0\x10\x08\x18\x08\x18\0\x18\x08\x10\x08 \0\x18\0\x18\0`\0\xA8\0\xA8\x08\xB0\0\xB0\x08\xA8\x08\xB0\x08\xD8\x08\xD8\0\xD0\x08\xD8\x08\xD8\0\xD8\x08\xB0\x08\xB8\0\xB8\x08\xB0\x08\xB8\x08\xC8\x08\xC8\0\xC8\x08\xD0\x08\xC8\x08\xD8\0\xD8\x08\xD8\0\xD8\x08\xB0\0\xD8\x08\xD8\0\xD8\x08\xD8\x08\xD8\0\xD8\x08\xC0\x08\xC0\0\xC0\x08\xB8\x08\xD0\x08\xD8\0\xD0\x08\xC0\x08\xD8\x08\xD8\0\xD0\x08\xD8\x08\xD8\0\xD0\x08\xD0\x08\xD8\x08\xC0\x08\xC0\0\xB8\x08\xC0\0\xB8\x08\xC8\x08\xD0\x08\xC8\x08\xD0\x08\xD8\x08\xD8\x08\xD8\0\xD0\x08\xD0\0\xD8\x08\xA8\x08\xB8\0\xB8\x08\xA8\x08\xB8\x08\xC8\0\xC0\x08\xB8\x08\xD8\x08\xD8\0\xD0\x08\xD8\x08\xD8\0\xD0\x08\xD0\0\xD8\x08\xD0\x08\xD8\0\xD0\x08\xD0\0\xD8\x08\xC8\x08\xD0\x08\xB8\x08\0\0\x08\0\x10\0\x18\0 \0(\x000\08\0@\0H\0P\0X\0`\0h\0p\0\xF8\0\xF0\0\xE8\0\xE0\0\xD8\0\xD0\0\xC8\0\xC0\0\xB8\0\xB0\0\xA8\0\xA0\0\xE8\x08\xE8\0\xE8\x08\xE8\0(\0(\x080\0(\x08(\x000\x08(\x08(\0\x08\x08\x08\0\x08\x08\xE0\0\xE0\0\xDC\0\xE0\0\xE0\0\xE0\0@\08\0X\x08X\0`\0\xA8\x08\xA8\0h\x08h\0\x18\0\x18\0\x10\0\x10\0\x10\0") }) }); } #[clippy::msrv = "1.81"] - impl icu_provider::DataProvider for $provider { - fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> { + impl icu_provider::DataProvider for $provider { + fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> { if req.id.locale.is_default() { Ok(icu_provider::DataResponse { payload: icu_provider::DataPayload::from_static_ref(Self::SINGLETON_ZONE_OFFSET_PERIOD_V1), metadata: icu_provider::DataResponseMetadata::default() }) } else { - Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) + Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) } } } @@ -35,7 +35,7 @@ macro_rules! __impl_zone_offset_period_v1 { ($ provider : ty , ITER) => { __impl_zone_offset_period_v1!($provider); #[clippy::msrv = "1.81"] - impl icu_provider::IterableDataProvider for $provider { + impl icu_provider::IterableDataProvider for $provider { fn iter_ids(&self) -> Result>, icu_provider::DataError> { Ok([Default::default()].into_iter().collect()) } @@ -44,12 +44,12 @@ macro_rules! __impl_zone_offset_period_v1 { ($ provider : ty , DRY) => { __impl_zone_offset_period_v1!($provider); #[clippy::msrv = "1.81"] - impl icu_provider::DryDataProvider for $provider { + impl icu_provider::DryDataProvider for $provider { fn dry_load(&self, req: icu_provider::DataRequest) -> Result { if req.id.locale.is_default() { Ok(icu_provider::DataResponseMetadata::default()) } else { - Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) + Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) } } } @@ -57,17 +57,17 @@ macro_rules! __impl_zone_offset_period_v1 { ($ provider : ty , DRY , ITER) => { __impl_zone_offset_period_v1!($provider); #[clippy::msrv = "1.81"] - impl icu_provider::DryDataProvider for $provider { + impl icu_provider::DryDataProvider for $provider { fn dry_load(&self, req: icu_provider::DataRequest) -> Result { if req.id.locale.is_default() { Ok(icu_provider::DataResponseMetadata::default()) } else { - Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) + Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) } } } #[clippy::msrv = "1.81"] - impl icu_provider::IterableDataProvider for $provider { + impl icu_provider::IterableDataProvider for $provider { fn iter_ids(&self) -> Result>, icu_provider::DataError> { Ok([Default::default()].into_iter().collect()) } diff --git a/provider/data/timezone/data/bcp47_to_iana_map_v1.rs.data b/provider/data/timezone/data/bcp47_to_iana_map_v1.rs.data deleted file mode 100644 index 3b6c8132dd1..00000000000 --- a/provider/data/timezone/data/bcp47_to_iana_map_v1.rs.data +++ /dev/null @@ -1,77 +0,0 @@ -// @generated -/// Implement `DataProvider` on the given struct using the data -/// hardcoded in this file. This allows the struct to be used with -/// `icu`'s `_unstable` constructors. -/// -/// Using this implementation will embed the following data in the binary's data segment: -/// * 7622B[^1] for the singleton data struct -/// -/// [^1]: these numbers can be smaller in practice due to linker deduplication -#[doc(hidden)] -#[macro_export] -macro_rules! __impl_bcp47_to_iana_map_v1 { - ($ provider : ty) => { - #[clippy::msrv = "1.81"] - const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO; - #[clippy::msrv = "1.81"] - impl $provider { - #[doc(hidden)] - pub const SINGLETON_BCP47_TO_IANA_MAP_V1: &'static ::DataStruct = &icu::timezone::provider::names::Bcp47ToIanaMap { canonical_iana_ids: unsafe { zerovec::vecs::VarZeroVec16::from_bytes_unchecked(b"\xBD\x01\x0E\0\x18\0\"\x001\0A\0N\0Z\0i\0v\0\x86\0\x96\0\xAF\0\xC0\0\xD2\0\xE3\0\xF5\0\x05\x01\x15\x01&\x01D\x01]\x01x\x01\x92\x01\xA9\x01\xC3\x01\xDC\x01\xFA\x01\x11\x02*\x02D\x02]\x02n\x02{\x02\x8D\x02\xA2\x02\xB4\x02\xC4\x02\xD3\x02\xE3\x02\xF5\x02\x08\x03\x1B\x03/\x03>\x03N\x03[\x03d\x03s\x03\x83\x03\x8D\x03\x9C\x03\xAE\x03\xBA\x03\xC6\x03\xD6\x03\xE7\x03\xF7\x03\x02\x04\x10\x04\"\x043\x04@\x04Q\x04_\x04s\x04\x83\x04\x92\x04\xA3\x04\xB1\x04\xBF\x04\xD2\x04\xE4\x04\xF2\x04\x03\x05\x10\x05 \x05.\x05:\x05I\x05U\x05c\x05r\x05\x82\x05\x95\x05\xA6\x05\xB7\x05\xC6\x05\xD5\x05\xE4\x05\xF4\x05\x02\x06\x12\x06!\x062\x06B\x06V\x06k\x06y\x06\x8D\x06\xA1\x06\xAF\x06\xC1\x06\xD6\x06\xE6\x06\xF2\x06\x03\x07\x12\x07\x1F\x071\x07>\x07L\x07]\x07k\x07\x7F\x07\x8F\x07\x9C\x07\xA9\x07\xB4\x07\xC2\x07\xD4\x07\xE2\x07\xF5\x07\x05\x08\x13\x08\x1F\x08,\x089\x08H\x08W\x08h\x08x\x08\x8D\x08\x9B\x08\xAC\x08\xBD\x08\xCB\x08\xD7\x08\xE6\x08\xF3\x08\xFF\x08\x0E\t\x1B\t-\t<\tL\tX\th\tv\t\x85\t\x92\t\xA0\t\xAC\t\xBD\t\xC6\t\xD3\t\xE2\t\xEE\t\xFD\t\x0C\n\x18\n(\n<\nH\n\\\ni\nv\n}\n\x8B\n\x9D\n\xAC\n\xC1\n\xCE\n\xDB\n\xF1\n\x02\x0B\x0E\x0B\x1B\x0B)\x0B4\x0BB\x0BU\x0Bb\x0Bx\x0B\x87\x0B\x94\x0B\xA0\x0B\xAD\x0B\xBB\x0B\xC8\x0B\xDA\x0B\xE6\x0B\xF3\x0B\xFF\x0B\n\x0C\x1C\x0C'\x0C5\x0CB\x0CQ\x0C[\x0Ce\x0Cs\x0C\x7F\x0C\x8E\x0C\xA0\x0C\xAE\x0C\xBC\x0C\xC9\x0C\xD9\x0C\xE7\x0C\xF1\x0C\xFC\x0C\n\r\x14\r\x1F\r*\r5\rB\rP\rY\rg\rr\r\x82\r\x8E\r\x9A\r\xA9\r\xB6\r\xC4\r\xD5\r\xE0\r\xEE\r\xFF\r\x0C\x0E\x1B\x0E+\x0E>\x0EO\x0E]\x0Ej\x0Ew\x0E\x82\x0E\x8B\x0E\x9B\x0E\xA5\x0E\xB3\x0E\xC5\x0E\xD6\x0E\xE8\x0E\xF4\x0E\x04\x0F\x13\x0F\"\x0F3\x0FH\x0FV\x0Fh\x0Fy\x0F\x8C\x0F\x9A\x0F\xAB\x0F\xBB\x0F\xCA\x0F\xE0\x0F\xEF\x0F\xFB\x0F\x0C\x10\x19\x10(\x106\x10C\x10R\x10^\x10m\x10}\x10\x88\x10\x96\x10\xA3\x10\xAF\x10\xBF\x10\xCE\x10\xD9\x10\xE7\x10\xF3\x10\x02\x11\x13\x11!\x115\x11I\x11T\x11`\x11m\x11}\x11\x8D\x11\xA0\x11\xB0\x11\xBD\x11\xCC\x11\xD9\x11\xE9\x11\xF3\x11\x01\x12\x11\x12 \x120\x12<\x12F\x12Q\x12]\x12i\x12{\x12\x88\x12\x98\x12\xA5\x12\xB1\x12\xBE\x12\xCF\x12\xD8\x12\xE8\x12\xF6\x12\x04\x13\x16\x13 \x130\x13=\x13J\x13Z\x13j\x13|\x13\x88\x13\x95\x13\xA0\x13\xB3\x13\xBE\x13\xCD\x13\xDD\x13\xEB\x13\xFD\x13\r\x14 \x141\x14@\x14Q\x14]\x14m\x14\x7F\x14\x8A\x14\x99\x14\xAC\x14\xC1\x14\xCE\x14\xDC\x14\xEE\x14\xFD\x14\r\x15\x18\x15$\x151\x15@\x15I\x15V\x15b\x15s\x15\x82\x15\x97\x15\xA7\x15\xB2\x15\xC6\x15\xD1\x15\xE2\x15\xF0\x15\xFC\x15\n\x16\x16\x16-\x16>\x16K\x16Z\x16h\x16w\x16\x87\x16\xA3\x16\xB8\x16\xC6\x16\xDA\x16\xED\x16\x08\x17\x19\x174\x17F\x17a\x17\x7F\x17\x8F\x17\xA8\x17\xB4\x17\xC3\x17\xD0\x17\xE9\x17\0\x18\x1A\x185\x18D\x18K\x18T\x18]\x18f\x18o\x18x\x18\x81\x18\x8A\x18\x93\x18\x9C\x18\xA6\x18\xB0\x18\xBA\x18\xC4\x18\xCE\x18\xD7\x18\xE0\x18\xE9\x18\xF2\x18\xFB\x18\x04\x19\r\x19\x16\x19\x1F\x19)\x193\x19=\x19O\x19]\x19j\x19x\x19\x8A\x19\x99\x19\xA8\x19\xB9\x19\xC9\x19\xD6\x19\xE4\x19\xF0\x19\xF9\x19\x07\x1A\x1A\x1A'\x1AEurope/AndorraAsia/DubaiAsia/KabulAmerica/AntiguaAmerica/AnguillaEurope/TiraneAsia/YerevanAmerica/CuracaoAfrica/LuandaAntarctica/CaseyAntarctica/DavisAntarctica/DumontDUrvilleAntarctica/MawsonAntarctica/McMurdoAntarctica/PalmerAntarctica/RotheraAntarctica/SyowaAntarctica/TrollAntarctica/VostokAmerica/Argentina/Buenos_AiresAmerica/Argentina/CordobaAmerica/Argentina/CatamarcaAmerica/Argentina/La_RiojaAmerica/Argentina/JujuyAmerica/Argentina/San_LuisAmerica/Argentina/MendozaAmerica/Argentina/Rio_GallegosAmerica/Argentina/SaltaAmerica/Argentina/TucumanAmerica/Argentina/San_JuanAmerica/Argentina/UshuaiaPacific/Pago_PagoEurope/ViennaAustralia/AdelaideAustralia/Broken_HillAustralia/BrisbaneAustralia/DarwinAustralia/EuclaAustralia/HobartAustralia/LindemanAustralia/Lord_HoweAustralia/MelbourneAntarctica/MacquarieAustralia/PerthAustralia/SydneyAmerica/ArubaAsia/BakuEurope/SarajevoAmerica/BarbadosAsia/DhakaEurope/BrusselsAfrica/OuagadougouEurope/SofiaAsia/BahrainAfrica/BujumburaAfrica/Porto-NovoAtlantic/BermudaAsia/BruneiAmerica/La_PazAmerica/KralendijkAmerica/AraguainaAmerica/BelemAmerica/Boa_VistaAmerica/CuiabaAmerica/Campo_GrandeAmerica/EirunepeAmerica/NoronhaAmerica/FortalezaAmerica/ManausAmerica/MaceioAmerica/Porto_VelhoAmerica/Rio_BrancoAmerica/RecifeAmerica/Sao_PauloAmerica/BahiaAmerica/SantaremAmerica/NassauAsia/ThimphuAfrica/GaboroneEurope/MinskAmerica/BelizeAmerica/CrestonAmerica/EdmontonAmerica/Fort_NelsonAmerica/Glace_BayAmerica/Goose_BayAmerica/HalifaxAmerica/IqaluitAmerica/MonctonAmerica/ResoluteAmerica/ReginaAmerica/St_JohnsAmerica/TorontoAmerica/VancouverAmerica/WinnipegAmerica/Blanc-SablonAmerica/Cambridge_BayAmerica/DawsonAmerica/Dawson_CreekAmerica/Rankin_InletAmerica/InuvikAmerica/WhitehorseAmerica/Swift_CurrentAmerica/AtikokanIndian/CocosAfrica/LubumbashiAfrica/KinshasaAfrica/BanguiAfrica/BrazzavilleEurope/ZurichAfrica/AbidjanPacific/RarotongaPacific/EasterAmerica/Punta_ArenasAmerica/SantiagoAfrica/DoualaAsia/ShanghaiAsia/UrumqiAmerica/BogotaAmerica/Costa_RicaAmerica/HavanaAtlantic/Cape_VerdeIndian/ChristmasAsia/FamagustaAsia/NicosiaEurope/PragueEurope/BerlinEurope/BusingenAfrica/DjiboutiEurope/CopenhagenAmerica/DominicaAmerica/Santo_DomingoAfrica/AlgiersPacific/GalapagosAmerica/GuayaquilEurope/TallinnAfrica/CairoAfrica/El_AaiunAfrica/AsmaraAfrica/CeutaAtlantic/CanaryEurope/MadridAfrica/Addis_AbabaEurope/HelsinkiEurope/MariehamnPacific/FijiAtlantic/StanleyPacific/KosraePacific/PohnpeiPacific/ChuukAtlantic/FaroeEurope/ParisAfrica/LibrevilleAsia/GazaEurope/LondonAmerica/GrenadaAsia/TbilisiAmerica/CayenneEurope/GuernseyAfrica/AccraEurope/GibraltarAmerica/DanmarkshavnAmerica/NuukAmerica/ScoresbysundAmerica/ThuleAfrica/BanjulEtc/GMTAfrica/ConakryAmerica/GuadeloupeAmerica/MarigotAmerica/St_BarthelemyAfrica/MalaboEurope/AthensAtlantic/South_GeorgiaAmerica/GuatemalaPacific/GuamAfrica/BissauAmerica/GuyanaAsia/HebronAsia/Hong_KongAmerica/TegucigalpaEurope/ZagrebAmerica/Port-au-PrinceEurope/BudapestAsia/JayapuraAsia/JakartaAsia/MakassarAsia/PontianakEurope/DublinEurope/Isle_of_ManAsia/KolkataIndian/ChagosAsia/BaghdadAsia/TehranAtlantic/ReykjavikEurope/RomeAsia/JerusalemEurope/JerseyAmerica/JamaicaAsia/AmmanAsia/TokyoAfrica/NairobiAsia/BishkekAsia/Phnom_PenhPacific/KiritimatiPacific/KantonPacific/TarawaIndian/ComoroAmerica/St_KittsAsia/PyongyangAsia/SeoulAsia/KuwaitAmerica/CaymanAsia/AqtauAsia/AqtobeAsia/AlmatyAsia/AtyrauAsia/QostanayAsia/QyzylordaAsia/OralAsia/VientianeAsia/BeirutAmerica/St_LuciaEurope/VaduzAsia/ColomboAfrica/MonroviaAfrica/MaseruEurope/VilniusEurope/LuxembourgEurope/RigaAfrica/TripoliAfrica/CasablancaEurope/MonacoEurope/ChisinauEurope/PodgoricaIndian/AntananarivoPacific/KwajaleinPacific/MajuroEurope/SkopjeAfrica/BamakoAsia/YangonAsia/HovdAsia/UlaanbaatarAsia/MacauPacific/SaipanAmerica/MartiniqueAfrica/NouakchottAmerica/MontserratEurope/MaltaIndian/MauritiusIndian/MaldivesAfrica/BlantyreAmerica/ChihuahuaAmerica/Ciudad_JuarezAmerica/CancunAmerica/HermosilloAmerica/MatamorosAmerica/Mexico_CityAmerica/MeridaAmerica/MonterreyAmerica/MazatlanAmerica/OjinagaAmerica/Bahia_BanderasAmerica/TijuanaAsia/KuchingAsia/Kuala_LumpurAfrica/MaputoAfrica/WindhoekPacific/NoumeaAfrica/NiameyPacific/NorfolkAfrica/LagosAmerica/ManaguaEurope/AmsterdamEurope/OsloAsia/KathmanduPacific/NauruPacific/NiuePacific/AucklandPacific/ChathamAsia/MuscatAmerica/PanamaAmerica/LimaPacific/GambierPacific/MarquesasPacific/TahitiPacific/Port_MoresbyPacific/BougainvilleAsia/ManilaAsia/KarachiEurope/WarsawAmerica/MiquelonPacific/PitcairnAmerica/Puerto_RicoAtlantic/MadeiraEurope/LisbonAtlantic/AzoresPacific/PalauAmerica/AsuncionAsia/QatarIndian/ReunionEurope/BucharestEurope/BelgradeEurope/AstrakhanAsia/BarnaulAsia/ChitaAsia/AnadyrAsia/MagadanAsia/IrkutskEurope/KaliningradAsia/KhandygaAsia/KrasnoyarskEurope/SamaraEurope/KirovEurope/MoscowAsia/NovokuznetskAsia/OmskAsia/NovosibirskAsia/KamchatkaEurope/SaratovAsia/SrednekolymskAsia/TomskEurope/UlyanovskAsia/Ust-NeraAsia/SakhalinEurope/VolgogradAsia/VladivostokAsia/YekaterinburgAsia/YakutskAfrica/KigaliAsia/RiyadhPacific/GuadalcanalIndian/MaheAfrica/KhartoumEurope/StockholmAsia/SingaporeAtlantic/St_HelenaEurope/LjubljanaArctic/LongyearbyenEurope/BratislavaAfrica/FreetownEurope/San_MarinoAfrica/DakarAfrica/MogadishuAmerica/ParamariboAfrica/JubaAfrica/Sao_TomeAmerica/El_SalvadorAmerica/Lower_PrincesAsia/DamascusAfrica/MbabaneAmerica/Grand_TurkAfrica/NdjamenaIndian/KerguelenAfrica/LomeAsia/BangkokAsia/DushanbePacific/FakaofoAsia/DiliAsia/AshgabatAfrica/TunisPacific/TongatapuEurope/IstanbulAmerica/Port_of_SpainPacific/FunafutiAsia/TaipeiAfrica/Dar_es_SalaamEurope/KyivEurope/SimferopolAfrica/KampalaPacific/WakePacific/MidwayAmerica/AdakAmerica/Indiana/MarengoAmerica/AnchorageAmerica/BoiseAmerica/ChicagoAmerica/DenverAmerica/DetroitPacific/HonoluluAmerica/Indiana/IndianapolisAmerica/Indiana/VevayAmerica/JuneauAmerica/Indiana/KnoxAmerica/Los_AngelesAmerica/Kentucky/LouisvilleAmerica/MenomineeAmerica/Kentucky/MonticelloAmerica/MetlakatlaAmerica/North_Dakota/CenterAmerica/North_Dakota/New_SalemAmerica/New_YorkAmerica/Indiana/VincennesAmerica/NomeAmerica/PhoenixAmerica/SitkaAmerica/Indiana/Tell_CityAmerica/Indiana/WinamacAmerica/Indiana/PetersburgAmerica/North_Dakota/BeulahAmerica/YakutatEtc/UTCEtc/GMT-1Etc/GMT-2Etc/GMT-3Etc/GMT-4Etc/GMT-5Etc/GMT-6Etc/GMT-7Etc/GMT-8Etc/GMT-9Etc/GMT-10Etc/GMT-11Etc/GMT-12Etc/GMT-13Etc/GMT-14Etc/GMT+1Etc/GMT+2Etc/GMT+3Etc/GMT+4Etc/GMT+5Etc/GMT+6Etc/GMT+7Etc/GMT+8Etc/GMT+9Etc/GMT+10Etc/GMT+11Etc/GMT+12America/MontevideoAsia/SamarkandAsia/TashkentEurope/VaticanAmerica/St_VincentAmerica/CaracasAmerica/TortolaAmerica/St_ThomasAsia/Ho_Chi_MinhPacific/EfatePacific/WallisPacific/ApiaAsia/AdenIndian/MayotteAfrica/JohannesburgAfrica/LusakaAfrica/Harare") } }; - #[doc(hidden)] - pub const SINGLETON_BCP47_TO_IANA_MAP_V1_CHECKSUM: u64 = 1359598211242524719u64; - } - #[clippy::msrv = "1.81"] - impl icu_provider::DataProvider for $provider { - fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> { - if req.id.locale.is_default() { - Ok(icu_provider::DataResponse { payload: icu_provider::DataPayload::from_static_ref(Self::SINGLETON_BCP47_TO_IANA_MAP_V1), metadata: icu_provider::DataResponseMetadata::default().with_checksum(Self::SINGLETON_BCP47_TO_IANA_MAP_V1_CHECKSUM) }) - } else { - Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) - } - } - } - }; - ($ provider : ty , ITER) => { - __impl_bcp47_to_iana_map_v1!($provider); - #[clippy::msrv = "1.81"] - impl icu_provider::IterableDataProvider for $provider { - fn iter_ids(&self) -> Result>, icu_provider::DataError> { - Ok([Default::default()].into_iter().collect()) - } - } - }; - ($ provider : ty , DRY) => { - __impl_bcp47_to_iana_map_v1!($provider); - #[clippy::msrv = "1.81"] - impl icu_provider::DryDataProvider for $provider { - fn dry_load(&self, req: icu_provider::DataRequest) -> Result { - if req.id.locale.is_default() { - Ok(icu_provider::DataResponseMetadata::default().with_checksum(Self::SINGLETON_BCP47_TO_IANA_MAP_V1_CHECKSUM)) - } else { - Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) - } - } - } - }; - ($ provider : ty , DRY , ITER) => { - __impl_bcp47_to_iana_map_v1!($provider); - #[clippy::msrv = "1.81"] - impl icu_provider::DryDataProvider for $provider { - fn dry_load(&self, req: icu_provider::DataRequest) -> Result { - if req.id.locale.is_default() { - Ok(icu_provider::DataResponseMetadata::default().with_checksum(Self::SINGLETON_BCP47_TO_IANA_MAP_V1_CHECKSUM)) - } else { - Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) - } - } - } - #[clippy::msrv = "1.81"] - impl icu_provider::IterableDataProvider for $provider { - fn iter_ids(&self) -> Result>, icu_provider::DataError> { - Ok([Default::default()].into_iter().collect()) - } - } - }; -} -#[doc(inline)] -pub use __impl_bcp47_to_iana_map_v1 as impl_bcp47_to_iana_map_v1; diff --git a/provider/data/timezone/data/iana_to_bcp47_map_v3.rs.data b/provider/data/timezone/data/iana_to_bcp47_map_v3.rs.data deleted file mode 100644 index 625d6f9ea29..00000000000 --- a/provider/data/timezone/data/iana_to_bcp47_map_v3.rs.data +++ /dev/null @@ -1,77 +0,0 @@ -// @generated -/// Implement `DataProvider` on the given struct using the data -/// hardcoded in this file. This allows the struct to be used with -/// `icu`'s `_unstable` constructors. -/// -/// Using this implementation will embed the following data in the binary's data segment: -/// * 9543B[^1] for the singleton data struct -/// -/// [^1]: these numbers can be smaller in practice due to linker deduplication -#[doc(hidden)] -#[macro_export] -macro_rules! __impl_iana_to_bcp47_map_v3 { - ($ provider : ty) => { - #[clippy::msrv = "1.81"] - const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO; - #[clippy::msrv = "1.81"] - impl $provider { - #[doc(hidden)] - pub const SINGLETON_IANA_TO_BCP47_MAP_V3: &'static ::DataStruct = &icu::timezone::provider::names::IanaToBcp47Map { map: zerotrie::ZeroAsciiIgnoreCaseTrie { store: unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"\xE1i_ABCEIMPU\x01\x10\x10\x11\x14\x14\x14\x16TW~\x13C\xB5\xD8\x8D\xE1qCEGHIJKLMNPRSTUWZ\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\x01\x141Zi\x80\x8F\x99\x9F\xAF\xC2\xE2\xEB\xF5\xFC\x11\x1C\xC3ESu\x03\nT\x90TT6CDT\x95`ba\x91`\xC4EgiS\x03\x08\x0CT\x92Hypt\x92\0re\x92hT\x94\"5EDT\x95~\xC3BMr\t\x1A\x92$-Eire\x92$T\x92<\xC3+-0\x03\x060\x92<0\x92<\x92C\x91XT8PDT\x95pO\xC2CK\x02\x95J\x93\x14ingapore\x95\x0Eurkey\x95D\xC3CnT\x03\x0CT\x96\x12iversal\x96\x12C\x96\x12\xC2-E\x04SU\x94dT\x94>ulu\x96\x12\xE1gfmnrstu\x02\t\t\t\r\x0E*+\xAC\xBF\x83\trica/\xE1rABCDEFGHJKLMNOPSTW\0\0\0\0\0\0\0\0\0\x01\x01\x01\x01\x01\x01\x01\x015v\x99\xC1\xCA\xD3\xDC\xE3\xF7\x1CP\x85\xAC\xB8\xC3\xCC\xE6\xC5bcdls\x07\x0C\x17\x1Eidjan\x91Mcra\x92/dis_Ababa\x92\rgiers\x91ym\xC2ae\x04ra\x92\x05ra\x92\x04\xC5ailru\x15\x1B#.\xC2mn\x05ako\x93O\xC2gj\x04ui\x91Gul\x92;ssau\x92Qantyre\x93gazzaville\x91Ijumbura\x90]\xC3aeo\x11\x16\xC2is\x04ro\x92\x01ablanca\x93?uta\x92\x07nakry\x92?\xC3ajo\x14\x1C\xC2kr\x04ar\x95\x1D_es_Salaam\x95Mibouti\x91quala\x91Wl_Aaiun\x92\x03reetown\x95\x19aborone\x91\rarare\x96i\xC2ou\x0Channesburg\x96eba\x95#\xC3ahi\x07\x0Fmpala\x95Sartoum\x95\x0B\xC2gn\x05ali\x95\x03shasa\x91E\xC4aiou\x05\x0F\x13gos\x94\x0Fbreville\x92!me\x955\xC3abs\x05\x0Enda\x90\x01umbashi\x91Caka\x96g\xC3abo\x15\x1C\xC3lps\x05\nabo\x92Guto\x94\x05eru\x935abane\x95-\xC2gn\x08adishu\x95\x1Frovia\x933\xC4adio\x07\x0F\x15irobi\x93\x03jamena\x951amey\x94\x0Buakchott\x93]uagadougou\x90Worto-Novo\x90_ao_Tome\x95%\xC3iru\x08\x0Fmbuktu\x93Nipoli\x93=nis\x95Aindhoek\x94\x07erica/\xE1vABCDEFGHIJKLMNOPRSTVWY\0\x01\x01\x02\x02\x02\x02\x02\x03\x03\x03\x03\x04\x04\x04\x05\x05\x06\x06\x06\x06\xE5D\xE7 Ki\xC4\xE1Zr\xAA\xDF\x85\xDF\xE7Z\xA3@z\x8D\xA3\xC5dnrst\x04\x1D\xC5\xCDak\x95Y\xC3cgt\x08\x0Ehorage\x95]uilla\x89igua\x87\xC3agu\x08\x9Eguaina\x90ientina/\xC9BCJLMRSTU\r17@HUmuuenos_Aires\x90\x17\xC2ao\ttamarca\x90\x1B\xC2mr\rodRivadavia\x90\x1Adoba\x90\x19ujuy\x90\x1Fa_Rioja\x90\x1Dendoza\x90#io_Gallegos\x90%a\xC2ln\x04ta\x90'_\xC2JL\x05uan\x90+uis\x90!ucuman\x90)shuaia\x90-ba\x90Kuncion\x94E\xC2ik\x07kokan\x91?a\x95X\xC5aelou\x1A&2I\xC2hr\x0Fia\x91\x05_Banderas\x93}bados\x90Ql\xC2ei\x03m\x90kze\x91\x11anc-Sablon\x91/\xC3agi\x08\r_Vista\x90mota\x91]se\x95_enos_Aires\x90\x16\xC6ahioruCTa\x82\x89\xC5mnrty\x19\x1E$,\xC2bp\x0Bridge_Bay\x911o_Grande\x90qcun\x93macas\x96Samarca\x90\x1A\xC2em\x05nne\x92+an\x93\x19i\xC2ch\x05ago\x95auahua\x93iudad_Juarez\x93k\xC2rs\x14\xC2ad\x0Bl_Harbour\x91>oba\x90\x18ta_Rica\x91_eston\x91\x13\xC2ir\x05aba\x90oacao\x8F\xC3aeo\x1C+\xC2nw\x0Bmarkshavn\x923son\x913_Creek\x915\xC2nt\x05ver\x95croit\x95eminica\x91u\xC4diln\x08\x10\x1Bmonton\x91\x15runepe\x90s_Salvador\x95'senada\x93~ort\xC2_a\x11\xC2NW\x07elson\x91\x17ayne\x95hleza\x90w\xC4loru\t\x1B.ace_Bay\x91\x19\xC2do\x06thab\x924se_Bay\x91\x1B\xC2ae\tnd_Turk\x95/nada\x92'\xC2ay\x1C\xC3dty\x08\x0Feloupe\x92Aemala\x92Maquil\x91}ana\x92S\xC2ae\x0F\xC2lv\x06ifax\x91\x1Dana\x91armosillo\x93o\xC2nqn\xC2dueiana\xC2/pW\xC7IKMPTVW\r\x12\x1A%/Andianapolis\x95inox\x95oarengo\x95[etersburg\x96\rell_City\x96\t\xC2ei\x05vay\x95kncennes\x96\x01inamac\x96\x0Bolis\x95hvik\x919aluit\x91\x1F\xC2au\x07maica\x92}\xC2jn\x04uy\x90\x1Eeau\x95m\xC3enr!(ntucky/\xC2LM\x0Bouisville\x95sonticello\x95wox_IN\x95nalendijk\x90g\xC3aio\x06\n_Paz\x90ema\x94%\xC3suw\n\x13_Angeles\x95qisville\x95rer_Princes\x95)\xC4aeio;ks\xC5cnrtz\x05\x11\"*eio\x90{a\xC2gu\x04ua\x94\x11s\x90y\xC2it\x05got\x92Cinique\x93[amoros\x93qatlan\x93y\xC4nrtx\x10\x15\x1E\xC2do\x05oza\x90\"minee\x95uida\x93ulakatla\x95yico_City\x93squelon\x947n\xC2ct\x05ton\x91!\xC3ers\x0F\x14\xC2rv\x05rey\x93wideo\x96Ieal\x91(errat\x93_\xC5aeiou\x06\x0E\x15Lssau\x91\tw_York\x95\x7Fpigon\x91(\xC2mr\x03e\x96\x03\xC2ot\x05nha\x90uh_Dakota/\xC3BCN\x07\x0Eeulah\x96\x0Fenter\x95{ew_Salem\x95}uk\x925jinaga\x93{\xC4ahou\x1E%R\xC2nr\x11\xC2ag\x04ma\x94#nirtung\x91\x1Eamaribo\x95!oenix\x96\x05rt\xC3-_o\x0B\x15au-Prince\x92]of_Spain\x95G_\xC2AV\x05cre\x90~elho\x90}\xC2en\nrto_Rico\x94;ta_Arenas\x91S\xC4aeio\x190:\xC2in\nny_River\x91,kin_Inlet\x917\xC3cgs\x05\nife\x91\x01ina\x91%olute\x91#o_Branco\x90\x7Fsario\x90\x18\xC6achitw2>FK\x84\xC2no&t\xC3aio\x10\x15\xC2_r\x08Isabel\x93~em\x91\x07ago\x91U_Domingo\x91w_Paulo\x91\x03oresbysund\x927iprock\x95btka\x96\x07_\xC6BJKLTV\x0B\x11\x17\x1D$arthelemy\x92Eohns\x91'itts\x93\x11ucia\x93-homas\x96Wincent\x96Qift_Current\x91=\xC4ehio\x0B\x1C#gucigalpa\x92Yu\xC2ln\x03e\x929der_Bay\x91(juana\x93\x7Fr\xC2ot\x05nto\x91)ola\x96U\xC2ai\tncouver\x91+rgin\x96V\xC2hi\nitehorse\x91;nnipeg\x91-\xC2ae\x07kutat\x96\x11llowknife\x91\x14tarctica/\xC8CDMPRSTV\x06\x1D9@H[aasey\x90\x03\xC2au\x05vis\x90\x05montDUrville\x90\x07\xC2ac\x11\xC2cw\x08quarie\x90Eson\x90\tMurdo\x90\x0Balmer\x90\rothera\x90\x0F\xC2oy\nuth_Pole\x94\x1Cowa\x90\x11roll\x90\x13ostok\x90\x15ctic/Longyearbyen\x95\x15ia/\xE1uABCDFGHIJKMNOPQRSTUVY\0\0\0\0\0\0\x01\x01\x01\x01\x01\x02\x02\x02\x02\x02\x02\x03\x03\x03G\x87\xC1\xEF\xF9\xFE+>\\\xCE\xFB\x1D)Kgx\xBF\tBZ\xC7dlmnqst\x04\n\x0F\x15!3en\x96amaty\x93\x1Fman\x92\x7Fadyr\x94Ut\xC2ao\x03u\x93\x1Bbe\x93\x1Dh\xC2gk\x06abat\x95?habad\x95>yrau\x93!\xC4aeir%+2\xC5ghknr\x06\x0C\x0F\x15hdad\x92qrain\x90[u\x90Mgkok\x957naul\x94Qirut\x93+shkek\x93\x05unei\x90c\xC3aho\x08-lcutta\x92l\xC3iou\x04\x17ta\x94S\xC2in\x08balsan\x93Tgqing\x91Xngking\x91Xlombo\x931\xC4ahiu\x0F\x14\x18\xC2cm\x04ca\x90Rascus\x95+aka\x90Sli\x95=\xC2bs\x03ai\x83hanbe\x959amagusta\x91gaza\x92#\xC3aeo\x06\x0Crbin\x91Xbron\x92U\xC3_nv\n\x12Chi_Minh\x96Yg_Kong\x92Wd\x93S\xC2rs\x07kutsk\x94Ytanbul\x95D\xC2ae\x11\xC2ky\x06arta\x92capura\x92arusalem\x92y\xC5ahoru2:AL\xC5bmrst\x03\x0B\x11\x17ul\x85chatka\x94machi\x943hgar\x91Z\xC2hm\x07mandu\x94\x17andu\x94\x16andyga\x94]lkata\x92masnoyarsk\x94_\xC3acw\x0B\x11la_Lumpur\x94\x03hing\x94\x01ait\x93\x17\xC2au#\xC4cgkn\t\x0F\x16a\xC2ou\x02\x93V\x93Wadan\x94Wassar\x92eila\x941scat\x94!\xC2io\x07cosia\x91ivo\xC2ks\tuznetsk\x94gibirsk\x94k\xC2mr\x04sk\x94ial\x93'\xC3hoy\n\x13nom_Penh\x93\x07ntianak\x92gongyang\x93\x13\xC3aoy\x05\rtar\x94Gstanay\x93#zylorda\x93%\xC2ai\x07ngoon\x93Pyadh\x95\x05\xC5aehir\x1A\x1F'0\xC3ikm\x05\x0Cgon\x96Xhalin\x94yarkand\x96Koul\x93\x15anghai\x91Yngapore\x95\x0Fednekolymsk\x94q\xC5abeho\x10\x17'4\xC2is\x05pei\x95Khkent\x96Milisi\x92)\xC2hl\x05ran\x92s_Aviv\x92xim\xC2bp\x03u\x91\nhu\x91\x0B\xC2km\x04yo\x93\x01sk\x94s\xC4jlrs\r#)ung_Pandang\x92da\xC2an\tnbaatar\x93U_Bator\x93Tumqi\x91[t-Nera\x94w\xC2il\tentiane\x93)adivostok\x94}\xC2ae\x0F\xC2kn\x06utsk\x95\x01gon\x93Q\xC2kr\x0Caterinburg\x94\x7Fevan\x8Dlantic/\xC8ABCFJMRS\x07\x0F\"0:BLzores\x94Aermuda\x90aa\xC2np\x05ary\x92\te_Verde\x91ca\xC2er\x05roe\x92\x1Coe\x92\x1Dan_Mayen\x95\x14adeira\x94=eykjavik\x92u\xC2ot\ruth_Georgia\x92K\xC2_a\x08Helena\x95\x11nley\x92\x15stralia/\xD0ABCDEHLMNPQSTVWY\x0F%7>DKeo{\x81\x8C\x9B\xA4\xAD\xB2\xC2Cd\x03T\x90Helaide\x903r\xC2io\x07sbane\x907ken_Hill\x905\xC2au\x08nberra\x90Hrrie\x90Mao\xC2lr\x10\xC2ae\x05ska\x95\\utian\x95Xizona\x96\x04entral\x95`ast\xC2-e\tIndiana\x95hrn\x95~awaii\x95fndiana-Starke\x95n\xC2io\x08chigan\x95duntain\x95bacific\x95p-New\x95pamoa\x90.") } }, bcp47_ids: unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"adalv\0\0\0aedxb\0\0\0afkbl\0\0\0aganu\0\0\0aiaxa\0\0\0altia\0\0\0amevn\0\0\0ancur\0\0\0aolad\0\0\0aqcas\0\0\0aqdav\0\0\0aqddu\0\0\0aqmaw\0\0\0aqmcm\0\0\0aqplm\0\0\0aqrot\0\0\0aqsyw\0\0\0aqtrl\0\0\0aqvos\0\0\0arbue\0\0\0arcor\0\0\0arctc\0\0\0arirj\0\0\0arjuj\0\0\0arluq\0\0\0armdz\0\0\0arrgl\0\0\0arsla\0\0\0artuc\0\0\0aruaq\0\0\0arush\0\0\0asppg\0\0\0atvie\0\0\0auadl\0\0\0aubhq\0\0\0aubne\0\0\0audrw\0\0\0aueuc\0\0\0auhba\0\0\0auldc\0\0\0auldh\0\0\0aumel\0\0\0aumqi\0\0\0auper\0\0\0ausyd\0\0\0awaua\0\0\0azbak\0\0\0basjj\0\0\0bbbgi\0\0\0bddac\0\0\0bebru\0\0\0bfoua\0\0\0bgsof\0\0\0bhbah\0\0\0bibjm\0\0\0bjptn\0\0\0bmbda\0\0\0bnbwn\0\0\0bolpb\0\0\0bqkra\0\0\0braux\0\0\0brbel\0\0\0brbvb\0\0\0brcgb\0\0\0brcgr\0\0\0brern\0\0\0brfen\0\0\0brfor\0\0\0brmao\0\0\0brmcz\0\0\0brpvh\0\0\0brrbr\0\0\0brrec\0\0\0brsao\0\0\0brssa\0\0\0brstm\0\0\0bsnas\0\0\0btthi\0\0\0bwgbe\0\0\0bymsq\0\0\0bzbze\0\0\0cacfq\0\0\0caedm\0\0\0cafne\0\0\0caglb\0\0\0cagoo\0\0\0cahal\0\0\0caiql\0\0\0camon\0\0\0careb\0\0\0careg\0\0\0casjf\0\0\0cator\0\0\0cavan\0\0\0cawnp\0\0\0caybx\0\0\0caycb\0\0\0cayda\0\0\0caydq\0\0\0cayek\0\0\0cayev\0\0\0cayxy\0\0\0cayyn\0\0\0cayzs\0\0\0cccck\0\0\0cdfbm\0\0\0cdfih\0\0\0cfbgf\0\0\0cgbzv\0\0\0chzrh\0\0\0ciabj\0\0\0ckrar\0\0\0clipc\0\0\0clpuq\0\0\0clscl\0\0\0cmdla\0\0\0cnsha\0\0\0cnurc\0\0\0cobog\0\0\0crsjo\0\0\0cuhav\0\0\0cvrai\0\0\0cxxch\0\0\0cyfmg\0\0\0cynic\0\0\0czprg\0\0\0deber\0\0\0debsngn\0djjib\0\0\0dkcph\0\0\0dmdom\0\0\0dosdq\0\0\0dzalg\0\0\0ecgps\0\0\0ecgye\0\0\0eetll\0\0\0egcai\0\0\0eheai\0\0\0erasm\0\0\0esceu\0\0\0eslpa\0\0\0esmad\0\0\0etadd\0\0\0fihel\0\0\0fimhq\0\0\0fjsuv\0\0\0fkpsy\0\0\0fmksa\0\0\0fmpni\0\0\0fmtkk\0\0\0fotho\0\0\0frpar\0\0\0galbv\0\0\0gazastrpgblon\0\0\0gdgnd\0\0\0getbs\0\0\0gfcay\0\0\0gggci\0\0\0ghacc\0\0\0gigib\0\0\0gldkshvnglgoh\0\0\0globy\0\0\0glthu\0\0\0gmbjl\0\0\0gmt\0\0\0\0\0gncky\0\0\0gpbbr\0\0\0gpmsb\0\0\0gpsbh\0\0\0gqssg\0\0\0grath\0\0\0gsgrv\0\0\0gtgua\0\0\0gugum\0\0\0gwoxb\0\0\0gygeo\0\0\0hebron\0\0hkhkg\0\0\0hntgu\0\0\0hrzag\0\0\0htpap\0\0\0hubud\0\0\0iddjj\0\0\0idjkt\0\0\0idmak\0\0\0idpnk\0\0\0iedub\0\0\0imdgs\0\0\0inccu\0\0\0iodga\0\0\0iqbgw\0\0\0irthr\0\0\0isrey\0\0\0itrom\0\0\0jeruslm\0jesth\0\0\0jmkin\0\0\0joamm\0\0\0jptyo\0\0\0kenbo\0\0\0kgfru\0\0\0khpnh\0\0\0kicxi\0\0\0kipho\0\0\0kitrw\0\0\0kmyva\0\0\0knbas\0\0\0kpfnj\0\0\0krsel\0\0\0kwkwi\0\0\0kygec\0\0\0kzaau\0\0\0kzakx\0\0\0kzala\0\0\0kzguw\0\0\0kzksn\0\0\0kzkzo\0\0\0kzura\0\0\0lavte\0\0\0lbbey\0\0\0lccas\0\0\0livdz\0\0\0lkcmb\0\0\0lrmlw\0\0\0lsmsu\0\0\0ltvno\0\0\0lulux\0\0\0lvrix\0\0\0lytip\0\0\0macas\0\0\0mcmon\0\0\0mdkiv\0\0\0metgd\0\0\0mgtnr\0\0\0mhkwa\0\0\0mhmaj\0\0\0mkskp\0\0\0mlbko\0\0\0mmrgn\0\0\0mnhvd\0\0\0mnuln\0\0\0momfm\0\0\0mpspn\0\0\0mqfdf\0\0\0mrnkc\0\0\0msmni\0\0\0mtmla\0\0\0muplu\0\0\0mvmle\0\0\0mwblz\0\0\0mxchi\0\0\0mxcjs\0\0\0mxcun\0\0\0mxhmo\0\0\0mxmam\0\0\0mxmex\0\0\0mxmid\0\0\0mxmty\0\0\0mxmzt\0\0\0mxoji\0\0\0mxpvr\0\0\0mxtij\0\0\0mykch\0\0\0mykul\0\0\0mzmpm\0\0\0nawdh\0\0\0ncnou\0\0\0nenim\0\0\0nfnlk\0\0\0nglos\0\0\0nimga\0\0\0nlams\0\0\0noosl\0\0\0npktm\0\0\0nrinu\0\0\0nuiue\0\0\0nzakl\0\0\0nzcht\0\0\0ommct\0\0\0papty\0\0\0pelim\0\0\0pfgmr\0\0\0pfnhv\0\0\0pfppt\0\0\0pgpom\0\0\0pgraw\0\0\0phmnl\0\0\0pkkhi\0\0\0plwaw\0\0\0pmmqc\0\0\0pnpcn\0\0\0prsju\0\0\0ptfnc\0\0\0ptlis\0\0\0ptpdl\0\0\0pwror\0\0\0pyasu\0\0\0qadoh\0\0\0rereu\0\0\0robuh\0\0\0rsbeg\0\0\0ruasf\0\0\0rubax\0\0\0ruchita\0rudyr\0\0\0rugdx\0\0\0ruikt\0\0\0rukgd\0\0\0rukhndg\0rukra\0\0\0rukuf\0\0\0rukvx\0\0\0rumow\0\0\0runoz\0\0\0ruoms\0\0\0ruovb\0\0\0rupkc\0\0\0rurtw\0\0\0rusred\0\0rutof\0\0\0ruuly\0\0\0ruunera\0ruuus\0\0\0ruvog\0\0\0ruvvo\0\0\0ruyek\0\0\0ruyks\0\0\0rwkgl\0\0\0saruh\0\0\0sbhir\0\0\0scmaw\0\0\0sdkrt\0\0\0sesto\0\0\0sgsin\0\0\0shshn\0\0\0silju\0\0\0sjlyr\0\0\0skbts\0\0\0slfna\0\0\0smsai\0\0\0sndkr\0\0\0somgq\0\0\0srpbm\0\0\0ssjub\0\0\0sttms\0\0\0svsal\0\0\0sxphi\0\0\0sydam\0\0\0szqmn\0\0\0tcgdt\0\0\0tdndj\0\0\0tfpfr\0\0\0tglfw\0\0\0thbkk\0\0\0tjdyu\0\0\0tkfko\0\0\0tldil\0\0\0tmasb\0\0\0tntun\0\0\0totbu\0\0\0trist\0\0\0ttpos\0\0\0tvfun\0\0\0twtpe\0\0\0tzdar\0\0\0uaiev\0\0\0uasip\0\0\0ugkla\0\0\0umawk\0\0\0ummdy\0\0\0usadk\0\0\0usaeg\0\0\0usanc\0\0\0usboi\0\0\0uschi\0\0\0usden\0\0\0usdet\0\0\0ushnl\0\0\0usind\0\0\0usinvev\0usjnu\0\0\0usknx\0\0\0uslax\0\0\0uslui\0\0\0usmnm\0\0\0usmoc\0\0\0usmtm\0\0\0usndcnt\0usndnsl\0usnyc\0\0\0usoea\0\0\0usome\0\0\0usphx\0\0\0ussit\0\0\0ustel\0\0\0uswlz\0\0\0uswsq\0\0\0usxul\0\0\0usyak\0\0\0utc\0\0\0\0\0utce01\0\0utce02\0\0utce03\0\0utce04\0\0utce05\0\0utce06\0\0utce07\0\0utce08\0\0utce09\0\0utce10\0\0utce11\0\0utce12\0\0utce13\0\0utce14\0\0utcw01\0\0utcw02\0\0utcw03\0\0utcw04\0\0utcw05\0\0utcw06\0\0utcw07\0\0utcw08\0\0utcw09\0\0utcw10\0\0utcw11\0\0utcw12\0\0uymvd\0\0\0uzskd\0\0\0uztas\0\0\0vavat\0\0\0vcsvd\0\0\0veccs\0\0\0vgtov\0\0\0vistt\0\0\0vnsgn\0\0\0vuvli\0\0\0wfmau\0\0\0wsapw\0\0\0yeade\0\0\0ytmam\0\0\0zajnb\0\0\0zmlun\0\0\0zwhre\0\0\0") } }; - #[doc(hidden)] - pub const SINGLETON_IANA_TO_BCP47_MAP_V3_CHECKSUM: u64 = 1359598211242524719u64; - } - #[clippy::msrv = "1.81"] - impl icu_provider::DataProvider for $provider { - fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> { - if req.id.locale.is_default() { - Ok(icu_provider::DataResponse { payload: icu_provider::DataPayload::from_static_ref(Self::SINGLETON_IANA_TO_BCP47_MAP_V3), metadata: icu_provider::DataResponseMetadata::default().with_checksum(Self::SINGLETON_IANA_TO_BCP47_MAP_V3_CHECKSUM) }) - } else { - Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) - } - } - } - }; - ($ provider : ty , ITER) => { - __impl_iana_to_bcp47_map_v3!($provider); - #[clippy::msrv = "1.81"] - impl icu_provider::IterableDataProvider for $provider { - fn iter_ids(&self) -> Result>, icu_provider::DataError> { - Ok([Default::default()].into_iter().collect()) - } - } - }; - ($ provider : ty , DRY) => { - __impl_iana_to_bcp47_map_v3!($provider); - #[clippy::msrv = "1.81"] - impl icu_provider::DryDataProvider for $provider { - fn dry_load(&self, req: icu_provider::DataRequest) -> Result { - if req.id.locale.is_default() { - Ok(icu_provider::DataResponseMetadata::default().with_checksum(Self::SINGLETON_IANA_TO_BCP47_MAP_V3_CHECKSUM)) - } else { - Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) - } - } - } - }; - ($ provider : ty , DRY , ITER) => { - __impl_iana_to_bcp47_map_v3!($provider); - #[clippy::msrv = "1.81"] - impl icu_provider::DryDataProvider for $provider { - fn dry_load(&self, req: icu_provider::DataRequest) -> Result { - if req.id.locale.is_default() { - Ok(icu_provider::DataResponseMetadata::default().with_checksum(Self::SINGLETON_IANA_TO_BCP47_MAP_V3_CHECKSUM)) - } else { - Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) - } - } - } - #[clippy::msrv = "1.81"] - impl icu_provider::IterableDataProvider for $provider { - fn iter_ids(&self) -> Result>, icu_provider::DataError> { - Ok([Default::default()].into_iter().collect()) - } - } - }; -} -#[doc(inline)] -pub use __impl_iana_to_bcp47_map_v3 as impl_iana_to_bcp47_map_v3; diff --git a/provider/data/timezone/data/windows_zones_to_bcp47_map_v1.rs.data b/provider/data/timezone/data/windows_zones_to_bcp47_map_v1.rs.data deleted file mode 100644 index 6fcac4bab51..00000000000 --- a/provider/data/timezone/data/windows_zones_to_bcp47_map_v1.rs.data +++ /dev/null @@ -1,75 +0,0 @@ -// @generated -/// Implement `DataProvider` on the given struct using the data -/// hardcoded in this file. This allows the struct to be used with -/// `icu`'s `_unstable` constructors. -/// -/// Using this implementation will embed the following data in the binary's data segment: -/// * 8634B[^1] for the singleton data struct -/// -/// [^1]: these numbers can be smaller in practice due to linker deduplication -#[doc(hidden)] -#[macro_export] -macro_rules! __impl_windows_zones_to_bcp47_map_v1 { - ($ provider : ty) => { - #[clippy::msrv = "1.81"] - const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO; - #[clippy::msrv = "1.81"] - impl $provider { - #[doc(hidden)] - pub const SINGLETON_WINDOWS_ZONES_TO_BCP47_MAP_V1: &'static ::DataStruct = &icu::timezone::provider::windows::WindowsZonesToBcp47Map { map: zerotrie::ZeroTrieSimpleAscii { store: unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"\xE1xABCDEFGHIJKLMNOPQRSTUVWY\x02\x02\x05\x05\x06\x07\x08\x08\x08\t\t\t\x0B\x0C\x0C\r\r\r\x11\x12\x13\x13\x15-\xBCRs\xE8AS\xA2\xFF\x1Eb\xCF<|\x995W\xE6\x15Z\x90\xFB\xBA\xE1hUflrstuz\0\0\0\x01\x01\x01\x01Fg\xC6]~\xA8\xCES \xC2CE entral Standard Time/\xC20A\x0401\x90\x06U\x90\x06astern Standard Time/\xC20A\x0401\x90\x0BU\x90\x0Bghanistan Standard Time/\xC20A\x0301\x82F\x82\xC3aet\x1E=skan Standard Time/\xC20U\x0401\x92&S\x92&utian Standard Time/\xC20U\x0401\x92%S\x92%ai Standard Time/\xC20R\x0401\x91gU\x91g\xC2agsb\xC2 i-Standard Time/\xC60BKQSY\x04\x07\n\r\x1001\x91{H\x90\x14W\x91\x17A\x91bA\x91{E\x92T\xC2ac#n Standard Time/\xC40AOZ\x03\x05\x0801\x81E\x81M\x91PZ\x922 Standard Time/\xC20I\x0401\x91\x04Q\x91\x04entina Standard Time/\xC20A\x0401\x90\x01R\x90\x01trakhan Standard Time/\xC20R\x0401\x91fU\x91flantic Standard Time/\xC40BCG\x04\x07\n01\x90*M\x90\x17A\x90*L\x90js Central W. Standard Time/\xC20A\x0401\x90\x07U\x90\x07\xC2eo!rbaijan Standard Time/\xC20A\x0401\x90\rZ\x90\rres Standard Time/\xC30GP\x04\x0701\x91_L\x90iT\x91_\xC3aeoFe\xC2hn\x1Cia Standard Time/\xC20B\x0401\x90\"R\x90\"gladesh Standard Time/\xC20B\x0401\x90\x10\xC2DT\x02\x90\x10\x90$larus Standard Time/\xC20B\x0401\x90&Y\x90&ugainville Standard Time/\xC20P\x0401\x91WG\x91W\xE1daehu\0\x02\x02n\x1En\xC3npu%Kada Central Standard Time/\xC20C\x0401\x90+A\x90+e Verde Standard Time/\xC30CZ\x04\x0701\x90DV\x90DZ\x92=casus Standard Time/\xC20A\x0301\x86M\x86n\xE1b.t\0$ Australia Standard Time/\xC20A\x0401\x90\x04U\x90\x04ral \xE1eABEPS\0\0\x01\x01v\x98\x019\xC2msBerica Standard Time/\xC90BCEGHNSZ\x04\x07\n\r\x10\x13\x16\x1901\x90sZ\x90'R\x90BC\x90NT\x90sN\x90yI\x91HV\x92\x0CZ\x92Bia Standard Time/\xC60ACIKZ\x04\x07\n\r\x1001\x91\x0EQ\x90\0N\x90@O\x91\x03G\x91\x0EZ\x924razilian Standard Time/\xC20B\x0401\x90\x1CR\x90\x1Curope\xC2 a6Standard Time/\xC70ACHMRS\x04\x06\t\x0C\x0F\x1201\x90|L\x85Z\x90GU\x90|E\x91)S\x91e\xC2IK\x02\x92\x02\x92\x04n Standard Time/\xC50BHMP\x04\x07\n\r01\x91ZA\x90\x0ER\x90zK\x91,L\x91Zacific Standard Time/\xC70AFNSVZ\x04\x06\t\x0C\x0F\x1201\x91|Q\x89M\x90[C\x91DB\x91|U\x92QZ\x929tandard Time\xC2 /\x14(Mexico)/\xC20M\x0401\x91>X\x91>\xC40CMU\x04\x07\n01\x92'A\x90/X\x91=S\x92'\xC2ai&tham Islands Standard Time/\xC20N\x0401\x91OZ\x91Ona Standard Time/\xC40CHM\x04\x07\n01\x90?N\x90?K\x90xO\x911ba Standard Time/\xC20C\x0401\x90CU\x90Cateline Standard Time/\xC20Z\x0401\x92HZ\x92H\xE1d.agk\0\x01\x01\xC5(E \xC3AESy\x98\xC2fuTrica Standard Time/\xCB0ADEKMSTUYZ\x04\x06\t\x11\x19\x1C\x1F\"%(01\x91\rQ\x8FJ\x90I\xC2RT\x02\x90S\x90V\xC2EM\x02\x91\r\x91\x13G\x91*O\x92\x08Z\x92\x1FG\x92\"T\x92UZ\x921stralia Standard Time/\xC20A\x0401\x90\x05U\x90\x05urope Standard Time/\xC20M\x0401\x91(D\x91(outh America Standard Time/\xC20B\x0401\x90!R\x90!ster\xC2 n Island Standard Time/\xC20C\x0401\x90;L\x90; Standard Time\xC2 /\x14(Mexico)/\xC20M\x0401\x91;X\x91;\xC40BCU\x04\x07\n01\x92,S\x90#A\x90-S\x92,ypt Standard Time/\xC20E\x0401\x90QG\x90Qaterinburg Standard Time/\xC20R\x0401\x91xU\x91x\xC2Li9E Standard Time/\xC70ABEFLU\x04\x07\n\r\x10\x1801\x92 X\x90XG\x90\x13E\x90PI\x90W\xC2TV\x02\x91\"\x91$A\x92 ji Standard Time/\xC20F\x0401\x90YJ\x90Y\xE1dMTer\0\0\0>c\x83T Standard Time/\xC70EFGIJP\x04\x07\n\x12\x1A\x1D01\x90`S\x90TO\x90]\xC2BG\x02\x90`\x90d\xC2EM\x02\x91\0\x91\x01E\x91\tT\x91^B Standard Time/\xC40CGR\x04\x07\n01\x91dY\x90FR\x90qO\x91dorgian Standard Time/\xC20G\x0401\x90bE\x90been\xC2lw\x1Dand Standard Time/\xC20G\x0401\x90hL\x90hich Standard Time/\xC90BCGILMST\x04\x07\n\x1E!$,801\x91\x06F\x90\x12I\x909\xC5HLMNW\x02\x04\x06\x08\x90e\x90g\x90k\x90l\x90uS\x91\x06R\x91 \xC2LR\x02\x91-\x914\xC3HLN\x02\x04\x92\x01\x92\x05\x92\x07G\x92\x13a\xC2iw\x1Cti Standard Time/\xC20H\x0401\x90{T\x90{aiian Standard Time/\xC50CPUZ\x04\x07\n\r01\x92)K\x90:F\x91US\x92)Z\x92F\xC3nrs\x1D9dia Standard Time/\xC20I\x0401\x91\x02N\x91\x02an Standard Time/\xC20I\x0401\x91\x05R\x91\x05rael Standard Time/\xC20I\x0401\x91\x08L\x91\x08ordan Standard Time/\xC20J\x0401\x91\x0BO\x91\x0B\xC2ao#liningrad Standard Time/\xC20R\x0401\x91kU\x91krea Standard Time/\xC20K\x0401\x91\x16R\x91\x16\xC2ioH\xC2bn\x1Cya Standard Time/\xC20L\x0401\x91%Y\x91%e Islands Standard Time/\xC30KZ\x04\x0701\x91\x10I\x91\x10Z\x92\xC3289\x16'/\xC40BGZ\x04\x07\n01\x92>R\x90\x1DS\x90rZ\x92>/\xC30PZ\x04\x0701\x92DN\x91\\Z\x92D/\xC30PZ\x04\x0701\x92EF\x91SZ\x92E1/\xC50ANUZ\x04\x07\n\r01\x92GS\x90\x02U\x91MM\x92$Z\x92G\xC20Z\x0401\x92.Z\x92.aanbaatar Standard Time/\xC20M\x0401\x910N\x910\xC3elo!Dnezuela Standard Time/\xC20V\x0401\x92ME\x92Madivostok Standard Time/\xC20R\x0401\x91wU\x91wlgograd Standard Time/\xC20R\x0401\x91vU\x91v\xE1b.e\x01\x1D \xE1dACEM\0\0\0\"\x87\xEFustralia Standard Time/\xC20A\x0401\x90\nU\x90\nentral Africa Standard Time/\xC90ABCDGNTZ\x04\x06\t\x19\x1C$,401\x91GO\x88J\x90\x16\xC4DFGM\x02\x04\x06\x905\x906\x907\x90>Z\x90M\xC2AQ\x02\x90_\x90p\xC2EG\x02\x91E\x91G\xC2DN\x02\x92\x11\x92\x19Z\x92/urope Standard Time/\xCB0ACDGILMNSV\x04\x0B\x0E\x11\x14\x17\x1F'/;01\x90H\xC2DT\x01\x80\x90\x03H\x908E\x90HI\x90fT\x91\x07\xC2IU\x02\x91\x1E\x91#\xC2CT\x02\x91'\x916\xC2LO\x02\x91I\x91J\xC3EJM\x02\x04\x91\x7F\x92\x03\x92\x06A\x92Kongolia Standard Time/\xC20M\x0401\x91/N\x91/st \xC3ABP>[sia Standard Time/\xC70AKMTUZ\x04\x06\t\x0C\x18\x1B01\x92JQ\x8CZ\x91\x1AV\x918\xC3FJM\x02\x04\x92\x12\x92\x15\x92\x18Z\x92JZ\x923ank Standard Time/\xC20P\x0401\x90wS\x90wacific Standard Time/\xC70AFGMPZ\x04\x06\t\x0C\x0F\x1201\x91VQ\x8BM\x90\\U\x90tP\x912G\x91VZ\x928\xC2au\x1Fkutsk Standard Time/\xC20R\x0401\x91yU\x91ykon Standard Time/\xC20C\x0401\x901A\x901") } }, bcp47_ids: unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"adalv\0\0\0aedxb\0\0\0afkbl\0\0\0aganu\0\0\0aiaxa\0\0\0altia\0\0\0amevn\0\0\0ancur\0\0\0aolad\0\0\0aqcas\0\0\0aqdav\0\0\0aqddu\0\0\0aqmaw\0\0\0aqmcm\0\0\0aqrot\0\0\0aqsyw\0\0\0aqvos\0\0\0arbue\0\0\0asppg\0\0\0atvie\0\0\0auadl\0\0\0aubne\0\0\0audrw\0\0\0aueuc\0\0\0auhba\0\0\0auldh\0\0\0auper\0\0\0ausyd\0\0\0awaua\0\0\0azbak\0\0\0basjj\0\0\0bbbgi\0\0\0bddac\0\0\0bebru\0\0\0bfoua\0\0\0bgsof\0\0\0bhbah\0\0\0bibjm\0\0\0bjptn\0\0\0bmbda\0\0\0bnbwn\0\0\0bolpb\0\0\0bqkra\0\0\0braux\0\0\0brcgb\0\0\0brfen\0\0\0brfor\0\0\0brmao\0\0\0brrbr\0\0\0brsao\0\0\0brssa\0\0\0bsnas\0\0\0btthi\0\0\0bwgbe\0\0\0bymsq\0\0\0bzbze\0\0\0cacfq\0\0\0caedm\0\0\0cahal\0\0\0careg\0\0\0casjf\0\0\0cator\0\0\0cavan\0\0\0cawnp\0\0\0caybx\0\0\0cayxy\0\0\0cayzs\0\0\0cccck\0\0\0cdfbm\0\0\0cdfih\0\0\0cfbgf\0\0\0cgbzv\0\0\0chzrh\0\0\0ciabj\0\0\0ckrar\0\0\0clipc\0\0\0clpuq\0\0\0clscl\0\0\0cmdla\0\0\0cnsha\0\0\0cnurc\0\0\0cobog\0\0\0crsjo\0\0\0cuhav\0\0\0cvrai\0\0\0cxxch\0\0\0cynic\0\0\0czprg\0\0\0deber\0\0\0djjib\0\0\0dkcph\0\0\0dmdom\0\0\0dosdq\0\0\0dzalg\0\0\0ecgps\0\0\0ecgye\0\0\0eetll\0\0\0egcai\0\0\0eheai\0\0\0erasm\0\0\0eslpa\0\0\0esmad\0\0\0etadd\0\0\0fihel\0\0\0fimhq\0\0\0fjsuv\0\0\0fkpsy\0\0\0fmpni\0\0\0fmtkk\0\0\0fotho\0\0\0frpar\0\0\0galbv\0\0\0gblon\0\0\0gdgnd\0\0\0getbs\0\0\0gfcay\0\0\0gggci\0\0\0ghacc\0\0\0gigib\0\0\0gldkshvnglgoh\0\0\0globy\0\0\0glthu\0\0\0gmbjl\0\0\0gncky\0\0\0gpbbr\0\0\0gpmsb\0\0\0gpsbh\0\0\0gqssg\0\0\0grath\0\0\0gsgrv\0\0\0gtgua\0\0\0gugum\0\0\0gwoxb\0\0\0gygeo\0\0\0hebron\0\0hkhkg\0\0\0hntgu\0\0\0hrzag\0\0\0htpap\0\0\0hubud\0\0\0iddjj\0\0\0idjkt\0\0\0idmak\0\0\0iedub\0\0\0imdgs\0\0\0inccu\0\0\0iodga\0\0\0iqbgw\0\0\0irthr\0\0\0isrey\0\0\0itrom\0\0\0jeruslm\0jesth\0\0\0jmkin\0\0\0joamm\0\0\0jptyo\0\0\0kenbo\0\0\0kgfru\0\0\0khpnh\0\0\0kicxi\0\0\0kipho\0\0\0kitrw\0\0\0kmyva\0\0\0knbas\0\0\0kpfnj\0\0\0krsel\0\0\0kwkwi\0\0\0kygec\0\0\0kzkzo\0\0\0kzura\0\0\0lavte\0\0\0lbbey\0\0\0lccas\0\0\0livdz\0\0\0lkcmb\0\0\0lrmlw\0\0\0lsmsu\0\0\0ltvno\0\0\0lulux\0\0\0lvrix\0\0\0lytip\0\0\0macas\0\0\0mcmon\0\0\0mdkiv\0\0\0metgd\0\0\0mgtnr\0\0\0mhmaj\0\0\0mkskp\0\0\0mlbko\0\0\0mmrgn\0\0\0mnhvd\0\0\0mnuln\0\0\0momfm\0\0\0mpspn\0\0\0mqfdf\0\0\0mrnkc\0\0\0msmni\0\0\0mtmla\0\0\0muplu\0\0\0mvmle\0\0\0mwblz\0\0\0mxcjs\0\0\0mxcun\0\0\0mxhmo\0\0\0mxmam\0\0\0mxmex\0\0\0mxmzt\0\0\0mxtij\0\0\0mykul\0\0\0mzmpm\0\0\0nawdh\0\0\0ncnou\0\0\0nenim\0\0\0nfnlk\0\0\0nglos\0\0\0nimga\0\0\0nlams\0\0\0noosl\0\0\0npktm\0\0\0nrinu\0\0\0nuiue\0\0\0nzakl\0\0\0nzcht\0\0\0ommct\0\0\0papty\0\0\0pelim\0\0\0pfgmr\0\0\0pfnhv\0\0\0pfppt\0\0\0pgpom\0\0\0pgraw\0\0\0phmnl\0\0\0pkkhi\0\0\0plwaw\0\0\0pmmqc\0\0\0pnpcn\0\0\0prsju\0\0\0ptlis\0\0\0ptpdl\0\0\0pwror\0\0\0pyasu\0\0\0qadoh\0\0\0rereu\0\0\0robuh\0\0\0rsbeg\0\0\0ruasf\0\0\0rubax\0\0\0ruchita\0rugdx\0\0\0ruikt\0\0\0rukgd\0\0\0rukra\0\0\0rukuf\0\0\0rumow\0\0\0ruoms\0\0\0ruovb\0\0\0rupkc\0\0\0rurtw\0\0\0rusred\0\0rutof\0\0\0ruuus\0\0\0ruvog\0\0\0ruvvo\0\0\0ruyek\0\0\0ruyks\0\0\0rwkgl\0\0\0saruh\0\0\0sbhir\0\0\0scmaw\0\0\0sdkrt\0\0\0sesto\0\0\0sgsin\0\0\0shshn\0\0\0silju\0\0\0sjlyr\0\0\0skbts\0\0\0slfna\0\0\0smsai\0\0\0sndkr\0\0\0somgq\0\0\0srpbm\0\0\0ssjub\0\0\0sttms\0\0\0svsal\0\0\0sxphi\0\0\0sydam\0\0\0szqmn\0\0\0tcgdt\0\0\0tdndj\0\0\0tfpfr\0\0\0tglfw\0\0\0thbkk\0\0\0tjdyu\0\0\0tkfko\0\0\0tldil\0\0\0tmasb\0\0\0tntun\0\0\0totbu\0\0\0trist\0\0\0ttpos\0\0\0tvfun\0\0\0twtpe\0\0\0tzdar\0\0\0uaiev\0\0\0uasip\0\0\0ugkla\0\0\0umawk\0\0\0ummdy\0\0\0usadk\0\0\0usanc\0\0\0uschi\0\0\0usden\0\0\0ushnl\0\0\0usind\0\0\0uslax\0\0\0usnyc\0\0\0usphx\0\0\0utc\0\0\0\0\0utce01\0\0utce02\0\0utce03\0\0utce04\0\0utce05\0\0utce06\0\0utce07\0\0utce08\0\0utce09\0\0utce10\0\0utce11\0\0utce12\0\0utce13\0\0utce14\0\0utcw01\0\0utcw02\0\0utcw03\0\0utcw04\0\0utcw05\0\0utcw06\0\0utcw07\0\0utcw08\0\0utcw09\0\0utcw10\0\0utcw11\0\0utcw12\0\0uymvd\0\0\0uztas\0\0\0vavat\0\0\0vcsvd\0\0\0veccs\0\0\0vgtov\0\0\0vistt\0\0\0vnsgn\0\0\0vuvli\0\0\0wfmau\0\0\0wsapw\0\0\0yeade\0\0\0ytmam\0\0\0zajnb\0\0\0zmlun\0\0\0zwhre\0\0\0") } }; - } - #[clippy::msrv = "1.81"] - impl icu_provider::DataProvider for $provider { - fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> { - if req.id.locale.is_default() { - Ok(icu_provider::DataResponse { payload: icu_provider::DataPayload::from_static_ref(Self::SINGLETON_WINDOWS_ZONES_TO_BCP47_MAP_V1), metadata: icu_provider::DataResponseMetadata::default() }) - } else { - Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) - } - } - } - }; - ($ provider : ty , ITER) => { - __impl_windows_zones_to_bcp47_map_v1!($provider); - #[clippy::msrv = "1.81"] - impl icu_provider::IterableDataProvider for $provider { - fn iter_ids(&self) -> Result>, icu_provider::DataError> { - Ok([Default::default()].into_iter().collect()) - } - } - }; - ($ provider : ty , DRY) => { - __impl_windows_zones_to_bcp47_map_v1!($provider); - #[clippy::msrv = "1.81"] - impl icu_provider::DryDataProvider for $provider { - fn dry_load(&self, req: icu_provider::DataRequest) -> Result { - if req.id.locale.is_default() { - Ok(icu_provider::DataResponseMetadata::default()) - } else { - Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) - } - } - } - }; - ($ provider : ty , DRY , ITER) => { - __impl_windows_zones_to_bcp47_map_v1!($provider); - #[clippy::msrv = "1.81"] - impl icu_provider::DryDataProvider for $provider { - fn dry_load(&self, req: icu_provider::DataRequest) -> Result { - if req.id.locale.is_default() { - Ok(icu_provider::DataResponseMetadata::default()) - } else { - Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) - } - } - } - #[clippy::msrv = "1.81"] - impl icu_provider::IterableDataProvider for $provider { - fn iter_ids(&self) -> Result>, icu_provider::DataError> { - Ok([Default::default()].into_iter().collect()) - } - } - }; -} -#[doc(inline)] -pub use __impl_windows_zones_to_bcp47_map_v1 as impl_windows_zones_to_bcp47_map_v1; diff --git a/provider/data/timezone/stubdata/bcp47_to_iana_map_v1.rs.data b/provider/data/timezone/stubdata/bcp47_to_iana_map_v1.rs.data deleted file mode 100644 index 3b6c8132dd1..00000000000 --- a/provider/data/timezone/stubdata/bcp47_to_iana_map_v1.rs.data +++ /dev/null @@ -1,77 +0,0 @@ -// @generated -/// Implement `DataProvider` on the given struct using the data -/// hardcoded in this file. This allows the struct to be used with -/// `icu`'s `_unstable` constructors. -/// -/// Using this implementation will embed the following data in the binary's data segment: -/// * 7622B[^1] for the singleton data struct -/// -/// [^1]: these numbers can be smaller in practice due to linker deduplication -#[doc(hidden)] -#[macro_export] -macro_rules! __impl_bcp47_to_iana_map_v1 { - ($ provider : ty) => { - #[clippy::msrv = "1.81"] - const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO; - #[clippy::msrv = "1.81"] - impl $provider { - #[doc(hidden)] - pub const SINGLETON_BCP47_TO_IANA_MAP_V1: &'static ::DataStruct = &icu::timezone::provider::names::Bcp47ToIanaMap { canonical_iana_ids: unsafe { zerovec::vecs::VarZeroVec16::from_bytes_unchecked(b"\xBD\x01\x0E\0\x18\0\"\x001\0A\0N\0Z\0i\0v\0\x86\0\x96\0\xAF\0\xC0\0\xD2\0\xE3\0\xF5\0\x05\x01\x15\x01&\x01D\x01]\x01x\x01\x92\x01\xA9\x01\xC3\x01\xDC\x01\xFA\x01\x11\x02*\x02D\x02]\x02n\x02{\x02\x8D\x02\xA2\x02\xB4\x02\xC4\x02\xD3\x02\xE3\x02\xF5\x02\x08\x03\x1B\x03/\x03>\x03N\x03[\x03d\x03s\x03\x83\x03\x8D\x03\x9C\x03\xAE\x03\xBA\x03\xC6\x03\xD6\x03\xE7\x03\xF7\x03\x02\x04\x10\x04\"\x043\x04@\x04Q\x04_\x04s\x04\x83\x04\x92\x04\xA3\x04\xB1\x04\xBF\x04\xD2\x04\xE4\x04\xF2\x04\x03\x05\x10\x05 \x05.\x05:\x05I\x05U\x05c\x05r\x05\x82\x05\x95\x05\xA6\x05\xB7\x05\xC6\x05\xD5\x05\xE4\x05\xF4\x05\x02\x06\x12\x06!\x062\x06B\x06V\x06k\x06y\x06\x8D\x06\xA1\x06\xAF\x06\xC1\x06\xD6\x06\xE6\x06\xF2\x06\x03\x07\x12\x07\x1F\x071\x07>\x07L\x07]\x07k\x07\x7F\x07\x8F\x07\x9C\x07\xA9\x07\xB4\x07\xC2\x07\xD4\x07\xE2\x07\xF5\x07\x05\x08\x13\x08\x1F\x08,\x089\x08H\x08W\x08h\x08x\x08\x8D\x08\x9B\x08\xAC\x08\xBD\x08\xCB\x08\xD7\x08\xE6\x08\xF3\x08\xFF\x08\x0E\t\x1B\t-\t<\tL\tX\th\tv\t\x85\t\x92\t\xA0\t\xAC\t\xBD\t\xC6\t\xD3\t\xE2\t\xEE\t\xFD\t\x0C\n\x18\n(\n<\nH\n\\\ni\nv\n}\n\x8B\n\x9D\n\xAC\n\xC1\n\xCE\n\xDB\n\xF1\n\x02\x0B\x0E\x0B\x1B\x0B)\x0B4\x0BB\x0BU\x0Bb\x0Bx\x0B\x87\x0B\x94\x0B\xA0\x0B\xAD\x0B\xBB\x0B\xC8\x0B\xDA\x0B\xE6\x0B\xF3\x0B\xFF\x0B\n\x0C\x1C\x0C'\x0C5\x0CB\x0CQ\x0C[\x0Ce\x0Cs\x0C\x7F\x0C\x8E\x0C\xA0\x0C\xAE\x0C\xBC\x0C\xC9\x0C\xD9\x0C\xE7\x0C\xF1\x0C\xFC\x0C\n\r\x14\r\x1F\r*\r5\rB\rP\rY\rg\rr\r\x82\r\x8E\r\x9A\r\xA9\r\xB6\r\xC4\r\xD5\r\xE0\r\xEE\r\xFF\r\x0C\x0E\x1B\x0E+\x0E>\x0EO\x0E]\x0Ej\x0Ew\x0E\x82\x0E\x8B\x0E\x9B\x0E\xA5\x0E\xB3\x0E\xC5\x0E\xD6\x0E\xE8\x0E\xF4\x0E\x04\x0F\x13\x0F\"\x0F3\x0FH\x0FV\x0Fh\x0Fy\x0F\x8C\x0F\x9A\x0F\xAB\x0F\xBB\x0F\xCA\x0F\xE0\x0F\xEF\x0F\xFB\x0F\x0C\x10\x19\x10(\x106\x10C\x10R\x10^\x10m\x10}\x10\x88\x10\x96\x10\xA3\x10\xAF\x10\xBF\x10\xCE\x10\xD9\x10\xE7\x10\xF3\x10\x02\x11\x13\x11!\x115\x11I\x11T\x11`\x11m\x11}\x11\x8D\x11\xA0\x11\xB0\x11\xBD\x11\xCC\x11\xD9\x11\xE9\x11\xF3\x11\x01\x12\x11\x12 \x120\x12<\x12F\x12Q\x12]\x12i\x12{\x12\x88\x12\x98\x12\xA5\x12\xB1\x12\xBE\x12\xCF\x12\xD8\x12\xE8\x12\xF6\x12\x04\x13\x16\x13 \x130\x13=\x13J\x13Z\x13j\x13|\x13\x88\x13\x95\x13\xA0\x13\xB3\x13\xBE\x13\xCD\x13\xDD\x13\xEB\x13\xFD\x13\r\x14 \x141\x14@\x14Q\x14]\x14m\x14\x7F\x14\x8A\x14\x99\x14\xAC\x14\xC1\x14\xCE\x14\xDC\x14\xEE\x14\xFD\x14\r\x15\x18\x15$\x151\x15@\x15I\x15V\x15b\x15s\x15\x82\x15\x97\x15\xA7\x15\xB2\x15\xC6\x15\xD1\x15\xE2\x15\xF0\x15\xFC\x15\n\x16\x16\x16-\x16>\x16K\x16Z\x16h\x16w\x16\x87\x16\xA3\x16\xB8\x16\xC6\x16\xDA\x16\xED\x16\x08\x17\x19\x174\x17F\x17a\x17\x7F\x17\x8F\x17\xA8\x17\xB4\x17\xC3\x17\xD0\x17\xE9\x17\0\x18\x1A\x185\x18D\x18K\x18T\x18]\x18f\x18o\x18x\x18\x81\x18\x8A\x18\x93\x18\x9C\x18\xA6\x18\xB0\x18\xBA\x18\xC4\x18\xCE\x18\xD7\x18\xE0\x18\xE9\x18\xF2\x18\xFB\x18\x04\x19\r\x19\x16\x19\x1F\x19)\x193\x19=\x19O\x19]\x19j\x19x\x19\x8A\x19\x99\x19\xA8\x19\xB9\x19\xC9\x19\xD6\x19\xE4\x19\xF0\x19\xF9\x19\x07\x1A\x1A\x1A'\x1AEurope/AndorraAsia/DubaiAsia/KabulAmerica/AntiguaAmerica/AnguillaEurope/TiraneAsia/YerevanAmerica/CuracaoAfrica/LuandaAntarctica/CaseyAntarctica/DavisAntarctica/DumontDUrvilleAntarctica/MawsonAntarctica/McMurdoAntarctica/PalmerAntarctica/RotheraAntarctica/SyowaAntarctica/TrollAntarctica/VostokAmerica/Argentina/Buenos_AiresAmerica/Argentina/CordobaAmerica/Argentina/CatamarcaAmerica/Argentina/La_RiojaAmerica/Argentina/JujuyAmerica/Argentina/San_LuisAmerica/Argentina/MendozaAmerica/Argentina/Rio_GallegosAmerica/Argentina/SaltaAmerica/Argentina/TucumanAmerica/Argentina/San_JuanAmerica/Argentina/UshuaiaPacific/Pago_PagoEurope/ViennaAustralia/AdelaideAustralia/Broken_HillAustralia/BrisbaneAustralia/DarwinAustralia/EuclaAustralia/HobartAustralia/LindemanAustralia/Lord_HoweAustralia/MelbourneAntarctica/MacquarieAustralia/PerthAustralia/SydneyAmerica/ArubaAsia/BakuEurope/SarajevoAmerica/BarbadosAsia/DhakaEurope/BrusselsAfrica/OuagadougouEurope/SofiaAsia/BahrainAfrica/BujumburaAfrica/Porto-NovoAtlantic/BermudaAsia/BruneiAmerica/La_PazAmerica/KralendijkAmerica/AraguainaAmerica/BelemAmerica/Boa_VistaAmerica/CuiabaAmerica/Campo_GrandeAmerica/EirunepeAmerica/NoronhaAmerica/FortalezaAmerica/ManausAmerica/MaceioAmerica/Porto_VelhoAmerica/Rio_BrancoAmerica/RecifeAmerica/Sao_PauloAmerica/BahiaAmerica/SantaremAmerica/NassauAsia/ThimphuAfrica/GaboroneEurope/MinskAmerica/BelizeAmerica/CrestonAmerica/EdmontonAmerica/Fort_NelsonAmerica/Glace_BayAmerica/Goose_BayAmerica/HalifaxAmerica/IqaluitAmerica/MonctonAmerica/ResoluteAmerica/ReginaAmerica/St_JohnsAmerica/TorontoAmerica/VancouverAmerica/WinnipegAmerica/Blanc-SablonAmerica/Cambridge_BayAmerica/DawsonAmerica/Dawson_CreekAmerica/Rankin_InletAmerica/InuvikAmerica/WhitehorseAmerica/Swift_CurrentAmerica/AtikokanIndian/CocosAfrica/LubumbashiAfrica/KinshasaAfrica/BanguiAfrica/BrazzavilleEurope/ZurichAfrica/AbidjanPacific/RarotongaPacific/EasterAmerica/Punta_ArenasAmerica/SantiagoAfrica/DoualaAsia/ShanghaiAsia/UrumqiAmerica/BogotaAmerica/Costa_RicaAmerica/HavanaAtlantic/Cape_VerdeIndian/ChristmasAsia/FamagustaAsia/NicosiaEurope/PragueEurope/BerlinEurope/BusingenAfrica/DjiboutiEurope/CopenhagenAmerica/DominicaAmerica/Santo_DomingoAfrica/AlgiersPacific/GalapagosAmerica/GuayaquilEurope/TallinnAfrica/CairoAfrica/El_AaiunAfrica/AsmaraAfrica/CeutaAtlantic/CanaryEurope/MadridAfrica/Addis_AbabaEurope/HelsinkiEurope/MariehamnPacific/FijiAtlantic/StanleyPacific/KosraePacific/PohnpeiPacific/ChuukAtlantic/FaroeEurope/ParisAfrica/LibrevilleAsia/GazaEurope/LondonAmerica/GrenadaAsia/TbilisiAmerica/CayenneEurope/GuernseyAfrica/AccraEurope/GibraltarAmerica/DanmarkshavnAmerica/NuukAmerica/ScoresbysundAmerica/ThuleAfrica/BanjulEtc/GMTAfrica/ConakryAmerica/GuadeloupeAmerica/MarigotAmerica/St_BarthelemyAfrica/MalaboEurope/AthensAtlantic/South_GeorgiaAmerica/GuatemalaPacific/GuamAfrica/BissauAmerica/GuyanaAsia/HebronAsia/Hong_KongAmerica/TegucigalpaEurope/ZagrebAmerica/Port-au-PrinceEurope/BudapestAsia/JayapuraAsia/JakartaAsia/MakassarAsia/PontianakEurope/DublinEurope/Isle_of_ManAsia/KolkataIndian/ChagosAsia/BaghdadAsia/TehranAtlantic/ReykjavikEurope/RomeAsia/JerusalemEurope/JerseyAmerica/JamaicaAsia/AmmanAsia/TokyoAfrica/NairobiAsia/BishkekAsia/Phnom_PenhPacific/KiritimatiPacific/KantonPacific/TarawaIndian/ComoroAmerica/St_KittsAsia/PyongyangAsia/SeoulAsia/KuwaitAmerica/CaymanAsia/AqtauAsia/AqtobeAsia/AlmatyAsia/AtyrauAsia/QostanayAsia/QyzylordaAsia/OralAsia/VientianeAsia/BeirutAmerica/St_LuciaEurope/VaduzAsia/ColomboAfrica/MonroviaAfrica/MaseruEurope/VilniusEurope/LuxembourgEurope/RigaAfrica/TripoliAfrica/CasablancaEurope/MonacoEurope/ChisinauEurope/PodgoricaIndian/AntananarivoPacific/KwajaleinPacific/MajuroEurope/SkopjeAfrica/BamakoAsia/YangonAsia/HovdAsia/UlaanbaatarAsia/MacauPacific/SaipanAmerica/MartiniqueAfrica/NouakchottAmerica/MontserratEurope/MaltaIndian/MauritiusIndian/MaldivesAfrica/BlantyreAmerica/ChihuahuaAmerica/Ciudad_JuarezAmerica/CancunAmerica/HermosilloAmerica/MatamorosAmerica/Mexico_CityAmerica/MeridaAmerica/MonterreyAmerica/MazatlanAmerica/OjinagaAmerica/Bahia_BanderasAmerica/TijuanaAsia/KuchingAsia/Kuala_LumpurAfrica/MaputoAfrica/WindhoekPacific/NoumeaAfrica/NiameyPacific/NorfolkAfrica/LagosAmerica/ManaguaEurope/AmsterdamEurope/OsloAsia/KathmanduPacific/NauruPacific/NiuePacific/AucklandPacific/ChathamAsia/MuscatAmerica/PanamaAmerica/LimaPacific/GambierPacific/MarquesasPacific/TahitiPacific/Port_MoresbyPacific/BougainvilleAsia/ManilaAsia/KarachiEurope/WarsawAmerica/MiquelonPacific/PitcairnAmerica/Puerto_RicoAtlantic/MadeiraEurope/LisbonAtlantic/AzoresPacific/PalauAmerica/AsuncionAsia/QatarIndian/ReunionEurope/BucharestEurope/BelgradeEurope/AstrakhanAsia/BarnaulAsia/ChitaAsia/AnadyrAsia/MagadanAsia/IrkutskEurope/KaliningradAsia/KhandygaAsia/KrasnoyarskEurope/SamaraEurope/KirovEurope/MoscowAsia/NovokuznetskAsia/OmskAsia/NovosibirskAsia/KamchatkaEurope/SaratovAsia/SrednekolymskAsia/TomskEurope/UlyanovskAsia/Ust-NeraAsia/SakhalinEurope/VolgogradAsia/VladivostokAsia/YekaterinburgAsia/YakutskAfrica/KigaliAsia/RiyadhPacific/GuadalcanalIndian/MaheAfrica/KhartoumEurope/StockholmAsia/SingaporeAtlantic/St_HelenaEurope/LjubljanaArctic/LongyearbyenEurope/BratislavaAfrica/FreetownEurope/San_MarinoAfrica/DakarAfrica/MogadishuAmerica/ParamariboAfrica/JubaAfrica/Sao_TomeAmerica/El_SalvadorAmerica/Lower_PrincesAsia/DamascusAfrica/MbabaneAmerica/Grand_TurkAfrica/NdjamenaIndian/KerguelenAfrica/LomeAsia/BangkokAsia/DushanbePacific/FakaofoAsia/DiliAsia/AshgabatAfrica/TunisPacific/TongatapuEurope/IstanbulAmerica/Port_of_SpainPacific/FunafutiAsia/TaipeiAfrica/Dar_es_SalaamEurope/KyivEurope/SimferopolAfrica/KampalaPacific/WakePacific/MidwayAmerica/AdakAmerica/Indiana/MarengoAmerica/AnchorageAmerica/BoiseAmerica/ChicagoAmerica/DenverAmerica/DetroitPacific/HonoluluAmerica/Indiana/IndianapolisAmerica/Indiana/VevayAmerica/JuneauAmerica/Indiana/KnoxAmerica/Los_AngelesAmerica/Kentucky/LouisvilleAmerica/MenomineeAmerica/Kentucky/MonticelloAmerica/MetlakatlaAmerica/North_Dakota/CenterAmerica/North_Dakota/New_SalemAmerica/New_YorkAmerica/Indiana/VincennesAmerica/NomeAmerica/PhoenixAmerica/SitkaAmerica/Indiana/Tell_CityAmerica/Indiana/WinamacAmerica/Indiana/PetersburgAmerica/North_Dakota/BeulahAmerica/YakutatEtc/UTCEtc/GMT-1Etc/GMT-2Etc/GMT-3Etc/GMT-4Etc/GMT-5Etc/GMT-6Etc/GMT-7Etc/GMT-8Etc/GMT-9Etc/GMT-10Etc/GMT-11Etc/GMT-12Etc/GMT-13Etc/GMT-14Etc/GMT+1Etc/GMT+2Etc/GMT+3Etc/GMT+4Etc/GMT+5Etc/GMT+6Etc/GMT+7Etc/GMT+8Etc/GMT+9Etc/GMT+10Etc/GMT+11Etc/GMT+12America/MontevideoAsia/SamarkandAsia/TashkentEurope/VaticanAmerica/St_VincentAmerica/CaracasAmerica/TortolaAmerica/St_ThomasAsia/Ho_Chi_MinhPacific/EfatePacific/WallisPacific/ApiaAsia/AdenIndian/MayotteAfrica/JohannesburgAfrica/LusakaAfrica/Harare") } }; - #[doc(hidden)] - pub const SINGLETON_BCP47_TO_IANA_MAP_V1_CHECKSUM: u64 = 1359598211242524719u64; - } - #[clippy::msrv = "1.81"] - impl icu_provider::DataProvider for $provider { - fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> { - if req.id.locale.is_default() { - Ok(icu_provider::DataResponse { payload: icu_provider::DataPayload::from_static_ref(Self::SINGLETON_BCP47_TO_IANA_MAP_V1), metadata: icu_provider::DataResponseMetadata::default().with_checksum(Self::SINGLETON_BCP47_TO_IANA_MAP_V1_CHECKSUM) }) - } else { - Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) - } - } - } - }; - ($ provider : ty , ITER) => { - __impl_bcp47_to_iana_map_v1!($provider); - #[clippy::msrv = "1.81"] - impl icu_provider::IterableDataProvider for $provider { - fn iter_ids(&self) -> Result>, icu_provider::DataError> { - Ok([Default::default()].into_iter().collect()) - } - } - }; - ($ provider : ty , DRY) => { - __impl_bcp47_to_iana_map_v1!($provider); - #[clippy::msrv = "1.81"] - impl icu_provider::DryDataProvider for $provider { - fn dry_load(&self, req: icu_provider::DataRequest) -> Result { - if req.id.locale.is_default() { - Ok(icu_provider::DataResponseMetadata::default().with_checksum(Self::SINGLETON_BCP47_TO_IANA_MAP_V1_CHECKSUM)) - } else { - Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) - } - } - } - }; - ($ provider : ty , DRY , ITER) => { - __impl_bcp47_to_iana_map_v1!($provider); - #[clippy::msrv = "1.81"] - impl icu_provider::DryDataProvider for $provider { - fn dry_load(&self, req: icu_provider::DataRequest) -> Result { - if req.id.locale.is_default() { - Ok(icu_provider::DataResponseMetadata::default().with_checksum(Self::SINGLETON_BCP47_TO_IANA_MAP_V1_CHECKSUM)) - } else { - Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) - } - } - } - #[clippy::msrv = "1.81"] - impl icu_provider::IterableDataProvider for $provider { - fn iter_ids(&self) -> Result>, icu_provider::DataError> { - Ok([Default::default()].into_iter().collect()) - } - } - }; -} -#[doc(inline)] -pub use __impl_bcp47_to_iana_map_v1 as impl_bcp47_to_iana_map_v1; diff --git a/provider/data/timezone/stubdata/iana_to_bcp47_map_v3.rs.data b/provider/data/timezone/stubdata/iana_to_bcp47_map_v3.rs.data deleted file mode 100644 index 625d6f9ea29..00000000000 --- a/provider/data/timezone/stubdata/iana_to_bcp47_map_v3.rs.data +++ /dev/null @@ -1,77 +0,0 @@ -// @generated -/// Implement `DataProvider` on the given struct using the data -/// hardcoded in this file. This allows the struct to be used with -/// `icu`'s `_unstable` constructors. -/// -/// Using this implementation will embed the following data in the binary's data segment: -/// * 9543B[^1] for the singleton data struct -/// -/// [^1]: these numbers can be smaller in practice due to linker deduplication -#[doc(hidden)] -#[macro_export] -macro_rules! __impl_iana_to_bcp47_map_v3 { - ($ provider : ty) => { - #[clippy::msrv = "1.81"] - const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO; - #[clippy::msrv = "1.81"] - impl $provider { - #[doc(hidden)] - pub const SINGLETON_IANA_TO_BCP47_MAP_V3: &'static ::DataStruct = &icu::timezone::provider::names::IanaToBcp47Map { map: zerotrie::ZeroAsciiIgnoreCaseTrie { store: unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"\xE1i_ABCEIMPU\x01\x10\x10\x11\x14\x14\x14\x16TW~\x13C\xB5\xD8\x8D\xE1qCEGHIJKLMNPRSTUWZ\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\x01\x141Zi\x80\x8F\x99\x9F\xAF\xC2\xE2\xEB\xF5\xFC\x11\x1C\xC3ESu\x03\nT\x90TT6CDT\x95`ba\x91`\xC4EgiS\x03\x08\x0CT\x92Hypt\x92\0re\x92hT\x94\"5EDT\x95~\xC3BMr\t\x1A\x92$-Eire\x92$T\x92<\xC3+-0\x03\x060\x92<0\x92<\x92C\x91XT8PDT\x95pO\xC2CK\x02\x95J\x93\x14ingapore\x95\x0Eurkey\x95D\xC3CnT\x03\x0CT\x96\x12iversal\x96\x12C\x96\x12\xC2-E\x04SU\x94dT\x94>ulu\x96\x12\xE1gfmnrstu\x02\t\t\t\r\x0E*+\xAC\xBF\x83\trica/\xE1rABCDEFGHJKLMNOPSTW\0\0\0\0\0\0\0\0\0\x01\x01\x01\x01\x01\x01\x01\x015v\x99\xC1\xCA\xD3\xDC\xE3\xF7\x1CP\x85\xAC\xB8\xC3\xCC\xE6\xC5bcdls\x07\x0C\x17\x1Eidjan\x91Mcra\x92/dis_Ababa\x92\rgiers\x91ym\xC2ae\x04ra\x92\x05ra\x92\x04\xC5ailru\x15\x1B#.\xC2mn\x05ako\x93O\xC2gj\x04ui\x91Gul\x92;ssau\x92Qantyre\x93gazzaville\x91Ijumbura\x90]\xC3aeo\x11\x16\xC2is\x04ro\x92\x01ablanca\x93?uta\x92\x07nakry\x92?\xC3ajo\x14\x1C\xC2kr\x04ar\x95\x1D_es_Salaam\x95Mibouti\x91quala\x91Wl_Aaiun\x92\x03reetown\x95\x19aborone\x91\rarare\x96i\xC2ou\x0Channesburg\x96eba\x95#\xC3ahi\x07\x0Fmpala\x95Sartoum\x95\x0B\xC2gn\x05ali\x95\x03shasa\x91E\xC4aiou\x05\x0F\x13gos\x94\x0Fbreville\x92!me\x955\xC3abs\x05\x0Enda\x90\x01umbashi\x91Caka\x96g\xC3abo\x15\x1C\xC3lps\x05\nabo\x92Guto\x94\x05eru\x935abane\x95-\xC2gn\x08adishu\x95\x1Frovia\x933\xC4adio\x07\x0F\x15irobi\x93\x03jamena\x951amey\x94\x0Buakchott\x93]uagadougou\x90Worto-Novo\x90_ao_Tome\x95%\xC3iru\x08\x0Fmbuktu\x93Nipoli\x93=nis\x95Aindhoek\x94\x07erica/\xE1vABCDEFGHIJKLMNOPRSTVWY\0\x01\x01\x02\x02\x02\x02\x02\x03\x03\x03\x03\x04\x04\x04\x05\x05\x06\x06\x06\x06\xE5D\xE7 Ki\xC4\xE1Zr\xAA\xDF\x85\xDF\xE7Z\xA3@z\x8D\xA3\xC5dnrst\x04\x1D\xC5\xCDak\x95Y\xC3cgt\x08\x0Ehorage\x95]uilla\x89igua\x87\xC3agu\x08\x9Eguaina\x90ientina/\xC9BCJLMRSTU\r17@HUmuuenos_Aires\x90\x17\xC2ao\ttamarca\x90\x1B\xC2mr\rodRivadavia\x90\x1Adoba\x90\x19ujuy\x90\x1Fa_Rioja\x90\x1Dendoza\x90#io_Gallegos\x90%a\xC2ln\x04ta\x90'_\xC2JL\x05uan\x90+uis\x90!ucuman\x90)shuaia\x90-ba\x90Kuncion\x94E\xC2ik\x07kokan\x91?a\x95X\xC5aelou\x1A&2I\xC2hr\x0Fia\x91\x05_Banderas\x93}bados\x90Ql\xC2ei\x03m\x90kze\x91\x11anc-Sablon\x91/\xC3agi\x08\r_Vista\x90mota\x91]se\x95_enos_Aires\x90\x16\xC6ahioruCTa\x82\x89\xC5mnrty\x19\x1E$,\xC2bp\x0Bridge_Bay\x911o_Grande\x90qcun\x93macas\x96Samarca\x90\x1A\xC2em\x05nne\x92+an\x93\x19i\xC2ch\x05ago\x95auahua\x93iudad_Juarez\x93k\xC2rs\x14\xC2ad\x0Bl_Harbour\x91>oba\x90\x18ta_Rica\x91_eston\x91\x13\xC2ir\x05aba\x90oacao\x8F\xC3aeo\x1C+\xC2nw\x0Bmarkshavn\x923son\x913_Creek\x915\xC2nt\x05ver\x95croit\x95eminica\x91u\xC4diln\x08\x10\x1Bmonton\x91\x15runepe\x90s_Salvador\x95'senada\x93~ort\xC2_a\x11\xC2NW\x07elson\x91\x17ayne\x95hleza\x90w\xC4loru\t\x1B.ace_Bay\x91\x19\xC2do\x06thab\x924se_Bay\x91\x1B\xC2ae\tnd_Turk\x95/nada\x92'\xC2ay\x1C\xC3dty\x08\x0Feloupe\x92Aemala\x92Maquil\x91}ana\x92S\xC2ae\x0F\xC2lv\x06ifax\x91\x1Dana\x91armosillo\x93o\xC2nqn\xC2dueiana\xC2/pW\xC7IKMPTVW\r\x12\x1A%/Andianapolis\x95inox\x95oarengo\x95[etersburg\x96\rell_City\x96\t\xC2ei\x05vay\x95kncennes\x96\x01inamac\x96\x0Bolis\x95hvik\x919aluit\x91\x1F\xC2au\x07maica\x92}\xC2jn\x04uy\x90\x1Eeau\x95m\xC3enr!(ntucky/\xC2LM\x0Bouisville\x95sonticello\x95wox_IN\x95nalendijk\x90g\xC3aio\x06\n_Paz\x90ema\x94%\xC3suw\n\x13_Angeles\x95qisville\x95rer_Princes\x95)\xC4aeio;ks\xC5cnrtz\x05\x11\"*eio\x90{a\xC2gu\x04ua\x94\x11s\x90y\xC2it\x05got\x92Cinique\x93[amoros\x93qatlan\x93y\xC4nrtx\x10\x15\x1E\xC2do\x05oza\x90\"minee\x95uida\x93ulakatla\x95yico_City\x93squelon\x947n\xC2ct\x05ton\x91!\xC3ers\x0F\x14\xC2rv\x05rey\x93wideo\x96Ieal\x91(errat\x93_\xC5aeiou\x06\x0E\x15Lssau\x91\tw_York\x95\x7Fpigon\x91(\xC2mr\x03e\x96\x03\xC2ot\x05nha\x90uh_Dakota/\xC3BCN\x07\x0Eeulah\x96\x0Fenter\x95{ew_Salem\x95}uk\x925jinaga\x93{\xC4ahou\x1E%R\xC2nr\x11\xC2ag\x04ma\x94#nirtung\x91\x1Eamaribo\x95!oenix\x96\x05rt\xC3-_o\x0B\x15au-Prince\x92]of_Spain\x95G_\xC2AV\x05cre\x90~elho\x90}\xC2en\nrto_Rico\x94;ta_Arenas\x91S\xC4aeio\x190:\xC2in\nny_River\x91,kin_Inlet\x917\xC3cgs\x05\nife\x91\x01ina\x91%olute\x91#o_Branco\x90\x7Fsario\x90\x18\xC6achitw2>FK\x84\xC2no&t\xC3aio\x10\x15\xC2_r\x08Isabel\x93~em\x91\x07ago\x91U_Domingo\x91w_Paulo\x91\x03oresbysund\x927iprock\x95btka\x96\x07_\xC6BJKLTV\x0B\x11\x17\x1D$arthelemy\x92Eohns\x91'itts\x93\x11ucia\x93-homas\x96Wincent\x96Qift_Current\x91=\xC4ehio\x0B\x1C#gucigalpa\x92Yu\xC2ln\x03e\x929der_Bay\x91(juana\x93\x7Fr\xC2ot\x05nto\x91)ola\x96U\xC2ai\tncouver\x91+rgin\x96V\xC2hi\nitehorse\x91;nnipeg\x91-\xC2ae\x07kutat\x96\x11llowknife\x91\x14tarctica/\xC8CDMPRSTV\x06\x1D9@H[aasey\x90\x03\xC2au\x05vis\x90\x05montDUrville\x90\x07\xC2ac\x11\xC2cw\x08quarie\x90Eson\x90\tMurdo\x90\x0Balmer\x90\rothera\x90\x0F\xC2oy\nuth_Pole\x94\x1Cowa\x90\x11roll\x90\x13ostok\x90\x15ctic/Longyearbyen\x95\x15ia/\xE1uABCDFGHIJKMNOPQRSTUVY\0\0\0\0\0\0\x01\x01\x01\x01\x01\x02\x02\x02\x02\x02\x02\x03\x03\x03G\x87\xC1\xEF\xF9\xFE+>\\\xCE\xFB\x1D)Kgx\xBF\tBZ\xC7dlmnqst\x04\n\x0F\x15!3en\x96amaty\x93\x1Fman\x92\x7Fadyr\x94Ut\xC2ao\x03u\x93\x1Bbe\x93\x1Dh\xC2gk\x06abat\x95?habad\x95>yrau\x93!\xC4aeir%+2\xC5ghknr\x06\x0C\x0F\x15hdad\x92qrain\x90[u\x90Mgkok\x957naul\x94Qirut\x93+shkek\x93\x05unei\x90c\xC3aho\x08-lcutta\x92l\xC3iou\x04\x17ta\x94S\xC2in\x08balsan\x93Tgqing\x91Xngking\x91Xlombo\x931\xC4ahiu\x0F\x14\x18\xC2cm\x04ca\x90Rascus\x95+aka\x90Sli\x95=\xC2bs\x03ai\x83hanbe\x959amagusta\x91gaza\x92#\xC3aeo\x06\x0Crbin\x91Xbron\x92U\xC3_nv\n\x12Chi_Minh\x96Yg_Kong\x92Wd\x93S\xC2rs\x07kutsk\x94Ytanbul\x95D\xC2ae\x11\xC2ky\x06arta\x92capura\x92arusalem\x92y\xC5ahoru2:AL\xC5bmrst\x03\x0B\x11\x17ul\x85chatka\x94machi\x943hgar\x91Z\xC2hm\x07mandu\x94\x17andu\x94\x16andyga\x94]lkata\x92masnoyarsk\x94_\xC3acw\x0B\x11la_Lumpur\x94\x03hing\x94\x01ait\x93\x17\xC2au#\xC4cgkn\t\x0F\x16a\xC2ou\x02\x93V\x93Wadan\x94Wassar\x92eila\x941scat\x94!\xC2io\x07cosia\x91ivo\xC2ks\tuznetsk\x94gibirsk\x94k\xC2mr\x04sk\x94ial\x93'\xC3hoy\n\x13nom_Penh\x93\x07ntianak\x92gongyang\x93\x13\xC3aoy\x05\rtar\x94Gstanay\x93#zylorda\x93%\xC2ai\x07ngoon\x93Pyadh\x95\x05\xC5aehir\x1A\x1F'0\xC3ikm\x05\x0Cgon\x96Xhalin\x94yarkand\x96Koul\x93\x15anghai\x91Yngapore\x95\x0Fednekolymsk\x94q\xC5abeho\x10\x17'4\xC2is\x05pei\x95Khkent\x96Milisi\x92)\xC2hl\x05ran\x92s_Aviv\x92xim\xC2bp\x03u\x91\nhu\x91\x0B\xC2km\x04yo\x93\x01sk\x94s\xC4jlrs\r#)ung_Pandang\x92da\xC2an\tnbaatar\x93U_Bator\x93Tumqi\x91[t-Nera\x94w\xC2il\tentiane\x93)adivostok\x94}\xC2ae\x0F\xC2kn\x06utsk\x95\x01gon\x93Q\xC2kr\x0Caterinburg\x94\x7Fevan\x8Dlantic/\xC8ABCFJMRS\x07\x0F\"0:BLzores\x94Aermuda\x90aa\xC2np\x05ary\x92\te_Verde\x91ca\xC2er\x05roe\x92\x1Coe\x92\x1Dan_Mayen\x95\x14adeira\x94=eykjavik\x92u\xC2ot\ruth_Georgia\x92K\xC2_a\x08Helena\x95\x11nley\x92\x15stralia/\xD0ABCDEHLMNPQSTVWY\x0F%7>DKeo{\x81\x8C\x9B\xA4\xAD\xB2\xC2Cd\x03T\x90Helaide\x903r\xC2io\x07sbane\x907ken_Hill\x905\xC2au\x08nberra\x90Hrrie\x90Mao\xC2lr\x10\xC2ae\x05ska\x95\\utian\x95Xizona\x96\x04entral\x95`ast\xC2-e\tIndiana\x95hrn\x95~awaii\x95fndiana-Starke\x95n\xC2io\x08chigan\x95duntain\x95bacific\x95p-New\x95pamoa\x90.") } }, bcp47_ids: unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"adalv\0\0\0aedxb\0\0\0afkbl\0\0\0aganu\0\0\0aiaxa\0\0\0altia\0\0\0amevn\0\0\0ancur\0\0\0aolad\0\0\0aqcas\0\0\0aqdav\0\0\0aqddu\0\0\0aqmaw\0\0\0aqmcm\0\0\0aqplm\0\0\0aqrot\0\0\0aqsyw\0\0\0aqtrl\0\0\0aqvos\0\0\0arbue\0\0\0arcor\0\0\0arctc\0\0\0arirj\0\0\0arjuj\0\0\0arluq\0\0\0armdz\0\0\0arrgl\0\0\0arsla\0\0\0artuc\0\0\0aruaq\0\0\0arush\0\0\0asppg\0\0\0atvie\0\0\0auadl\0\0\0aubhq\0\0\0aubne\0\0\0audrw\0\0\0aueuc\0\0\0auhba\0\0\0auldc\0\0\0auldh\0\0\0aumel\0\0\0aumqi\0\0\0auper\0\0\0ausyd\0\0\0awaua\0\0\0azbak\0\0\0basjj\0\0\0bbbgi\0\0\0bddac\0\0\0bebru\0\0\0bfoua\0\0\0bgsof\0\0\0bhbah\0\0\0bibjm\0\0\0bjptn\0\0\0bmbda\0\0\0bnbwn\0\0\0bolpb\0\0\0bqkra\0\0\0braux\0\0\0brbel\0\0\0brbvb\0\0\0brcgb\0\0\0brcgr\0\0\0brern\0\0\0brfen\0\0\0brfor\0\0\0brmao\0\0\0brmcz\0\0\0brpvh\0\0\0brrbr\0\0\0brrec\0\0\0brsao\0\0\0brssa\0\0\0brstm\0\0\0bsnas\0\0\0btthi\0\0\0bwgbe\0\0\0bymsq\0\0\0bzbze\0\0\0cacfq\0\0\0caedm\0\0\0cafne\0\0\0caglb\0\0\0cagoo\0\0\0cahal\0\0\0caiql\0\0\0camon\0\0\0careb\0\0\0careg\0\0\0casjf\0\0\0cator\0\0\0cavan\0\0\0cawnp\0\0\0caybx\0\0\0caycb\0\0\0cayda\0\0\0caydq\0\0\0cayek\0\0\0cayev\0\0\0cayxy\0\0\0cayyn\0\0\0cayzs\0\0\0cccck\0\0\0cdfbm\0\0\0cdfih\0\0\0cfbgf\0\0\0cgbzv\0\0\0chzrh\0\0\0ciabj\0\0\0ckrar\0\0\0clipc\0\0\0clpuq\0\0\0clscl\0\0\0cmdla\0\0\0cnsha\0\0\0cnurc\0\0\0cobog\0\0\0crsjo\0\0\0cuhav\0\0\0cvrai\0\0\0cxxch\0\0\0cyfmg\0\0\0cynic\0\0\0czprg\0\0\0deber\0\0\0debsngn\0djjib\0\0\0dkcph\0\0\0dmdom\0\0\0dosdq\0\0\0dzalg\0\0\0ecgps\0\0\0ecgye\0\0\0eetll\0\0\0egcai\0\0\0eheai\0\0\0erasm\0\0\0esceu\0\0\0eslpa\0\0\0esmad\0\0\0etadd\0\0\0fihel\0\0\0fimhq\0\0\0fjsuv\0\0\0fkpsy\0\0\0fmksa\0\0\0fmpni\0\0\0fmtkk\0\0\0fotho\0\0\0frpar\0\0\0galbv\0\0\0gazastrpgblon\0\0\0gdgnd\0\0\0getbs\0\0\0gfcay\0\0\0gggci\0\0\0ghacc\0\0\0gigib\0\0\0gldkshvnglgoh\0\0\0globy\0\0\0glthu\0\0\0gmbjl\0\0\0gmt\0\0\0\0\0gncky\0\0\0gpbbr\0\0\0gpmsb\0\0\0gpsbh\0\0\0gqssg\0\0\0grath\0\0\0gsgrv\0\0\0gtgua\0\0\0gugum\0\0\0gwoxb\0\0\0gygeo\0\0\0hebron\0\0hkhkg\0\0\0hntgu\0\0\0hrzag\0\0\0htpap\0\0\0hubud\0\0\0iddjj\0\0\0idjkt\0\0\0idmak\0\0\0idpnk\0\0\0iedub\0\0\0imdgs\0\0\0inccu\0\0\0iodga\0\0\0iqbgw\0\0\0irthr\0\0\0isrey\0\0\0itrom\0\0\0jeruslm\0jesth\0\0\0jmkin\0\0\0joamm\0\0\0jptyo\0\0\0kenbo\0\0\0kgfru\0\0\0khpnh\0\0\0kicxi\0\0\0kipho\0\0\0kitrw\0\0\0kmyva\0\0\0knbas\0\0\0kpfnj\0\0\0krsel\0\0\0kwkwi\0\0\0kygec\0\0\0kzaau\0\0\0kzakx\0\0\0kzala\0\0\0kzguw\0\0\0kzksn\0\0\0kzkzo\0\0\0kzura\0\0\0lavte\0\0\0lbbey\0\0\0lccas\0\0\0livdz\0\0\0lkcmb\0\0\0lrmlw\0\0\0lsmsu\0\0\0ltvno\0\0\0lulux\0\0\0lvrix\0\0\0lytip\0\0\0macas\0\0\0mcmon\0\0\0mdkiv\0\0\0metgd\0\0\0mgtnr\0\0\0mhkwa\0\0\0mhmaj\0\0\0mkskp\0\0\0mlbko\0\0\0mmrgn\0\0\0mnhvd\0\0\0mnuln\0\0\0momfm\0\0\0mpspn\0\0\0mqfdf\0\0\0mrnkc\0\0\0msmni\0\0\0mtmla\0\0\0muplu\0\0\0mvmle\0\0\0mwblz\0\0\0mxchi\0\0\0mxcjs\0\0\0mxcun\0\0\0mxhmo\0\0\0mxmam\0\0\0mxmex\0\0\0mxmid\0\0\0mxmty\0\0\0mxmzt\0\0\0mxoji\0\0\0mxpvr\0\0\0mxtij\0\0\0mykch\0\0\0mykul\0\0\0mzmpm\0\0\0nawdh\0\0\0ncnou\0\0\0nenim\0\0\0nfnlk\0\0\0nglos\0\0\0nimga\0\0\0nlams\0\0\0noosl\0\0\0npktm\0\0\0nrinu\0\0\0nuiue\0\0\0nzakl\0\0\0nzcht\0\0\0ommct\0\0\0papty\0\0\0pelim\0\0\0pfgmr\0\0\0pfnhv\0\0\0pfppt\0\0\0pgpom\0\0\0pgraw\0\0\0phmnl\0\0\0pkkhi\0\0\0plwaw\0\0\0pmmqc\0\0\0pnpcn\0\0\0prsju\0\0\0ptfnc\0\0\0ptlis\0\0\0ptpdl\0\0\0pwror\0\0\0pyasu\0\0\0qadoh\0\0\0rereu\0\0\0robuh\0\0\0rsbeg\0\0\0ruasf\0\0\0rubax\0\0\0ruchita\0rudyr\0\0\0rugdx\0\0\0ruikt\0\0\0rukgd\0\0\0rukhndg\0rukra\0\0\0rukuf\0\0\0rukvx\0\0\0rumow\0\0\0runoz\0\0\0ruoms\0\0\0ruovb\0\0\0rupkc\0\0\0rurtw\0\0\0rusred\0\0rutof\0\0\0ruuly\0\0\0ruunera\0ruuus\0\0\0ruvog\0\0\0ruvvo\0\0\0ruyek\0\0\0ruyks\0\0\0rwkgl\0\0\0saruh\0\0\0sbhir\0\0\0scmaw\0\0\0sdkrt\0\0\0sesto\0\0\0sgsin\0\0\0shshn\0\0\0silju\0\0\0sjlyr\0\0\0skbts\0\0\0slfna\0\0\0smsai\0\0\0sndkr\0\0\0somgq\0\0\0srpbm\0\0\0ssjub\0\0\0sttms\0\0\0svsal\0\0\0sxphi\0\0\0sydam\0\0\0szqmn\0\0\0tcgdt\0\0\0tdndj\0\0\0tfpfr\0\0\0tglfw\0\0\0thbkk\0\0\0tjdyu\0\0\0tkfko\0\0\0tldil\0\0\0tmasb\0\0\0tntun\0\0\0totbu\0\0\0trist\0\0\0ttpos\0\0\0tvfun\0\0\0twtpe\0\0\0tzdar\0\0\0uaiev\0\0\0uasip\0\0\0ugkla\0\0\0umawk\0\0\0ummdy\0\0\0usadk\0\0\0usaeg\0\0\0usanc\0\0\0usboi\0\0\0uschi\0\0\0usden\0\0\0usdet\0\0\0ushnl\0\0\0usind\0\0\0usinvev\0usjnu\0\0\0usknx\0\0\0uslax\0\0\0uslui\0\0\0usmnm\0\0\0usmoc\0\0\0usmtm\0\0\0usndcnt\0usndnsl\0usnyc\0\0\0usoea\0\0\0usome\0\0\0usphx\0\0\0ussit\0\0\0ustel\0\0\0uswlz\0\0\0uswsq\0\0\0usxul\0\0\0usyak\0\0\0utc\0\0\0\0\0utce01\0\0utce02\0\0utce03\0\0utce04\0\0utce05\0\0utce06\0\0utce07\0\0utce08\0\0utce09\0\0utce10\0\0utce11\0\0utce12\0\0utce13\0\0utce14\0\0utcw01\0\0utcw02\0\0utcw03\0\0utcw04\0\0utcw05\0\0utcw06\0\0utcw07\0\0utcw08\0\0utcw09\0\0utcw10\0\0utcw11\0\0utcw12\0\0uymvd\0\0\0uzskd\0\0\0uztas\0\0\0vavat\0\0\0vcsvd\0\0\0veccs\0\0\0vgtov\0\0\0vistt\0\0\0vnsgn\0\0\0vuvli\0\0\0wfmau\0\0\0wsapw\0\0\0yeade\0\0\0ytmam\0\0\0zajnb\0\0\0zmlun\0\0\0zwhre\0\0\0") } }; - #[doc(hidden)] - pub const SINGLETON_IANA_TO_BCP47_MAP_V3_CHECKSUM: u64 = 1359598211242524719u64; - } - #[clippy::msrv = "1.81"] - impl icu_provider::DataProvider for $provider { - fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> { - if req.id.locale.is_default() { - Ok(icu_provider::DataResponse { payload: icu_provider::DataPayload::from_static_ref(Self::SINGLETON_IANA_TO_BCP47_MAP_V3), metadata: icu_provider::DataResponseMetadata::default().with_checksum(Self::SINGLETON_IANA_TO_BCP47_MAP_V3_CHECKSUM) }) - } else { - Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) - } - } - } - }; - ($ provider : ty , ITER) => { - __impl_iana_to_bcp47_map_v3!($provider); - #[clippy::msrv = "1.81"] - impl icu_provider::IterableDataProvider for $provider { - fn iter_ids(&self) -> Result>, icu_provider::DataError> { - Ok([Default::default()].into_iter().collect()) - } - } - }; - ($ provider : ty , DRY) => { - __impl_iana_to_bcp47_map_v3!($provider); - #[clippy::msrv = "1.81"] - impl icu_provider::DryDataProvider for $provider { - fn dry_load(&self, req: icu_provider::DataRequest) -> Result { - if req.id.locale.is_default() { - Ok(icu_provider::DataResponseMetadata::default().with_checksum(Self::SINGLETON_IANA_TO_BCP47_MAP_V3_CHECKSUM)) - } else { - Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) - } - } - } - }; - ($ provider : ty , DRY , ITER) => { - __impl_iana_to_bcp47_map_v3!($provider); - #[clippy::msrv = "1.81"] - impl icu_provider::DryDataProvider for $provider { - fn dry_load(&self, req: icu_provider::DataRequest) -> Result { - if req.id.locale.is_default() { - Ok(icu_provider::DataResponseMetadata::default().with_checksum(Self::SINGLETON_IANA_TO_BCP47_MAP_V3_CHECKSUM)) - } else { - Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) - } - } - } - #[clippy::msrv = "1.81"] - impl icu_provider::IterableDataProvider for $provider { - fn iter_ids(&self) -> Result>, icu_provider::DataError> { - Ok([Default::default()].into_iter().collect()) - } - } - }; -} -#[doc(inline)] -pub use __impl_iana_to_bcp47_map_v3 as impl_iana_to_bcp47_map_v3; diff --git a/provider/data/timezone/stubdata/windows_zones_to_bcp47_map_v1.rs.data b/provider/data/timezone/stubdata/windows_zones_to_bcp47_map_v1.rs.data deleted file mode 100644 index 6fcac4bab51..00000000000 --- a/provider/data/timezone/stubdata/windows_zones_to_bcp47_map_v1.rs.data +++ /dev/null @@ -1,75 +0,0 @@ -// @generated -/// Implement `DataProvider` on the given struct using the data -/// hardcoded in this file. This allows the struct to be used with -/// `icu`'s `_unstable` constructors. -/// -/// Using this implementation will embed the following data in the binary's data segment: -/// * 8634B[^1] for the singleton data struct -/// -/// [^1]: these numbers can be smaller in practice due to linker deduplication -#[doc(hidden)] -#[macro_export] -macro_rules! __impl_windows_zones_to_bcp47_map_v1 { - ($ provider : ty) => { - #[clippy::msrv = "1.81"] - const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO; - #[clippy::msrv = "1.81"] - impl $provider { - #[doc(hidden)] - pub const SINGLETON_WINDOWS_ZONES_TO_BCP47_MAP_V1: &'static ::DataStruct = &icu::timezone::provider::windows::WindowsZonesToBcp47Map { map: zerotrie::ZeroTrieSimpleAscii { store: unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"\xE1xABCDEFGHIJKLMNOPQRSTUVWY\x02\x02\x05\x05\x06\x07\x08\x08\x08\t\t\t\x0B\x0C\x0C\r\r\r\x11\x12\x13\x13\x15-\xBCRs\xE8AS\xA2\xFF\x1Eb\xCF<|\x995W\xE6\x15Z\x90\xFB\xBA\xE1hUflrstuz\0\0\0\x01\x01\x01\x01Fg\xC6]~\xA8\xCES \xC2CE entral Standard Time/\xC20A\x0401\x90\x06U\x90\x06astern Standard Time/\xC20A\x0401\x90\x0BU\x90\x0Bghanistan Standard Time/\xC20A\x0301\x82F\x82\xC3aet\x1E=skan Standard Time/\xC20U\x0401\x92&S\x92&utian Standard Time/\xC20U\x0401\x92%S\x92%ai Standard Time/\xC20R\x0401\x91gU\x91g\xC2agsb\xC2 i-Standard Time/\xC60BKQSY\x04\x07\n\r\x1001\x91{H\x90\x14W\x91\x17A\x91bA\x91{E\x92T\xC2ac#n Standard Time/\xC40AOZ\x03\x05\x0801\x81E\x81M\x91PZ\x922 Standard Time/\xC20I\x0401\x91\x04Q\x91\x04entina Standard Time/\xC20A\x0401\x90\x01R\x90\x01trakhan Standard Time/\xC20R\x0401\x91fU\x91flantic Standard Time/\xC40BCG\x04\x07\n01\x90*M\x90\x17A\x90*L\x90js Central W. Standard Time/\xC20A\x0401\x90\x07U\x90\x07\xC2eo!rbaijan Standard Time/\xC20A\x0401\x90\rZ\x90\rres Standard Time/\xC30GP\x04\x0701\x91_L\x90iT\x91_\xC3aeoFe\xC2hn\x1Cia Standard Time/\xC20B\x0401\x90\"R\x90\"gladesh Standard Time/\xC20B\x0401\x90\x10\xC2DT\x02\x90\x10\x90$larus Standard Time/\xC20B\x0401\x90&Y\x90&ugainville Standard Time/\xC20P\x0401\x91WG\x91W\xE1daehu\0\x02\x02n\x1En\xC3npu%Kada Central Standard Time/\xC20C\x0401\x90+A\x90+e Verde Standard Time/\xC30CZ\x04\x0701\x90DV\x90DZ\x92=casus Standard Time/\xC20A\x0301\x86M\x86n\xE1b.t\0$ Australia Standard Time/\xC20A\x0401\x90\x04U\x90\x04ral \xE1eABEPS\0\0\x01\x01v\x98\x019\xC2msBerica Standard Time/\xC90BCEGHNSZ\x04\x07\n\r\x10\x13\x16\x1901\x90sZ\x90'R\x90BC\x90NT\x90sN\x90yI\x91HV\x92\x0CZ\x92Bia Standard Time/\xC60ACIKZ\x04\x07\n\r\x1001\x91\x0EQ\x90\0N\x90@O\x91\x03G\x91\x0EZ\x924razilian Standard Time/\xC20B\x0401\x90\x1CR\x90\x1Curope\xC2 a6Standard Time/\xC70ACHMRS\x04\x06\t\x0C\x0F\x1201\x90|L\x85Z\x90GU\x90|E\x91)S\x91e\xC2IK\x02\x92\x02\x92\x04n Standard Time/\xC50BHMP\x04\x07\n\r01\x91ZA\x90\x0ER\x90zK\x91,L\x91Zacific Standard Time/\xC70AFNSVZ\x04\x06\t\x0C\x0F\x1201\x91|Q\x89M\x90[C\x91DB\x91|U\x92QZ\x929tandard Time\xC2 /\x14(Mexico)/\xC20M\x0401\x91>X\x91>\xC40CMU\x04\x07\n01\x92'A\x90/X\x91=S\x92'\xC2ai&tham Islands Standard Time/\xC20N\x0401\x91OZ\x91Ona Standard Time/\xC40CHM\x04\x07\n01\x90?N\x90?K\x90xO\x911ba Standard Time/\xC20C\x0401\x90CU\x90Cateline Standard Time/\xC20Z\x0401\x92HZ\x92H\xE1d.agk\0\x01\x01\xC5(E \xC3AESy\x98\xC2fuTrica Standard Time/\xCB0ADEKMSTUYZ\x04\x06\t\x11\x19\x1C\x1F\"%(01\x91\rQ\x8FJ\x90I\xC2RT\x02\x90S\x90V\xC2EM\x02\x91\r\x91\x13G\x91*O\x92\x08Z\x92\x1FG\x92\"T\x92UZ\x921stralia Standard Time/\xC20A\x0401\x90\x05U\x90\x05urope Standard Time/\xC20M\x0401\x91(D\x91(outh America Standard Time/\xC20B\x0401\x90!R\x90!ster\xC2 n Island Standard Time/\xC20C\x0401\x90;L\x90; Standard Time\xC2 /\x14(Mexico)/\xC20M\x0401\x91;X\x91;\xC40BCU\x04\x07\n01\x92,S\x90#A\x90-S\x92,ypt Standard Time/\xC20E\x0401\x90QG\x90Qaterinburg Standard Time/\xC20R\x0401\x91xU\x91x\xC2Li9E Standard Time/\xC70ABEFLU\x04\x07\n\r\x10\x1801\x92 X\x90XG\x90\x13E\x90PI\x90W\xC2TV\x02\x91\"\x91$A\x92 ji Standard Time/\xC20F\x0401\x90YJ\x90Y\xE1dMTer\0\0\0>c\x83T Standard Time/\xC70EFGIJP\x04\x07\n\x12\x1A\x1D01\x90`S\x90TO\x90]\xC2BG\x02\x90`\x90d\xC2EM\x02\x91\0\x91\x01E\x91\tT\x91^B Standard Time/\xC40CGR\x04\x07\n01\x91dY\x90FR\x90qO\x91dorgian Standard Time/\xC20G\x0401\x90bE\x90been\xC2lw\x1Dand Standard Time/\xC20G\x0401\x90hL\x90hich Standard Time/\xC90BCGILMST\x04\x07\n\x1E!$,801\x91\x06F\x90\x12I\x909\xC5HLMNW\x02\x04\x06\x08\x90e\x90g\x90k\x90l\x90uS\x91\x06R\x91 \xC2LR\x02\x91-\x914\xC3HLN\x02\x04\x92\x01\x92\x05\x92\x07G\x92\x13a\xC2iw\x1Cti Standard Time/\xC20H\x0401\x90{T\x90{aiian Standard Time/\xC50CPUZ\x04\x07\n\r01\x92)K\x90:F\x91US\x92)Z\x92F\xC3nrs\x1D9dia Standard Time/\xC20I\x0401\x91\x02N\x91\x02an Standard Time/\xC20I\x0401\x91\x05R\x91\x05rael Standard Time/\xC20I\x0401\x91\x08L\x91\x08ordan Standard Time/\xC20J\x0401\x91\x0BO\x91\x0B\xC2ao#liningrad Standard Time/\xC20R\x0401\x91kU\x91krea Standard Time/\xC20K\x0401\x91\x16R\x91\x16\xC2ioH\xC2bn\x1Cya Standard Time/\xC20L\x0401\x91%Y\x91%e Islands Standard Time/\xC30KZ\x04\x0701\x91\x10I\x91\x10Z\x92\xC3289\x16'/\xC40BGZ\x04\x07\n01\x92>R\x90\x1DS\x90rZ\x92>/\xC30PZ\x04\x0701\x92DN\x91\\Z\x92D/\xC30PZ\x04\x0701\x92EF\x91SZ\x92E1/\xC50ANUZ\x04\x07\n\r01\x92GS\x90\x02U\x91MM\x92$Z\x92G\xC20Z\x0401\x92.Z\x92.aanbaatar Standard Time/\xC20M\x0401\x910N\x910\xC3elo!Dnezuela Standard Time/\xC20V\x0401\x92ME\x92Madivostok Standard Time/\xC20R\x0401\x91wU\x91wlgograd Standard Time/\xC20R\x0401\x91vU\x91v\xE1b.e\x01\x1D \xE1dACEM\0\0\0\"\x87\xEFustralia Standard Time/\xC20A\x0401\x90\nU\x90\nentral Africa Standard Time/\xC90ABCDGNTZ\x04\x06\t\x19\x1C$,401\x91GO\x88J\x90\x16\xC4DFGM\x02\x04\x06\x905\x906\x907\x90>Z\x90M\xC2AQ\x02\x90_\x90p\xC2EG\x02\x91E\x91G\xC2DN\x02\x92\x11\x92\x19Z\x92/urope Standard Time/\xCB0ACDGILMNSV\x04\x0B\x0E\x11\x14\x17\x1F'/;01\x90H\xC2DT\x01\x80\x90\x03H\x908E\x90HI\x90fT\x91\x07\xC2IU\x02\x91\x1E\x91#\xC2CT\x02\x91'\x916\xC2LO\x02\x91I\x91J\xC3EJM\x02\x04\x91\x7F\x92\x03\x92\x06A\x92Kongolia Standard Time/\xC20M\x0401\x91/N\x91/st \xC3ABP>[sia Standard Time/\xC70AKMTUZ\x04\x06\t\x0C\x18\x1B01\x92JQ\x8CZ\x91\x1AV\x918\xC3FJM\x02\x04\x92\x12\x92\x15\x92\x18Z\x92JZ\x923ank Standard Time/\xC20P\x0401\x90wS\x90wacific Standard Time/\xC70AFGMPZ\x04\x06\t\x0C\x0F\x1201\x91VQ\x8BM\x90\\U\x90tP\x912G\x91VZ\x928\xC2au\x1Fkutsk Standard Time/\xC20R\x0401\x91yU\x91ykon Standard Time/\xC20C\x0401\x901A\x901") } }, bcp47_ids: unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"adalv\0\0\0aedxb\0\0\0afkbl\0\0\0aganu\0\0\0aiaxa\0\0\0altia\0\0\0amevn\0\0\0ancur\0\0\0aolad\0\0\0aqcas\0\0\0aqdav\0\0\0aqddu\0\0\0aqmaw\0\0\0aqmcm\0\0\0aqrot\0\0\0aqsyw\0\0\0aqvos\0\0\0arbue\0\0\0asppg\0\0\0atvie\0\0\0auadl\0\0\0aubne\0\0\0audrw\0\0\0aueuc\0\0\0auhba\0\0\0auldh\0\0\0auper\0\0\0ausyd\0\0\0awaua\0\0\0azbak\0\0\0basjj\0\0\0bbbgi\0\0\0bddac\0\0\0bebru\0\0\0bfoua\0\0\0bgsof\0\0\0bhbah\0\0\0bibjm\0\0\0bjptn\0\0\0bmbda\0\0\0bnbwn\0\0\0bolpb\0\0\0bqkra\0\0\0braux\0\0\0brcgb\0\0\0brfen\0\0\0brfor\0\0\0brmao\0\0\0brrbr\0\0\0brsao\0\0\0brssa\0\0\0bsnas\0\0\0btthi\0\0\0bwgbe\0\0\0bymsq\0\0\0bzbze\0\0\0cacfq\0\0\0caedm\0\0\0cahal\0\0\0careg\0\0\0casjf\0\0\0cator\0\0\0cavan\0\0\0cawnp\0\0\0caybx\0\0\0cayxy\0\0\0cayzs\0\0\0cccck\0\0\0cdfbm\0\0\0cdfih\0\0\0cfbgf\0\0\0cgbzv\0\0\0chzrh\0\0\0ciabj\0\0\0ckrar\0\0\0clipc\0\0\0clpuq\0\0\0clscl\0\0\0cmdla\0\0\0cnsha\0\0\0cnurc\0\0\0cobog\0\0\0crsjo\0\0\0cuhav\0\0\0cvrai\0\0\0cxxch\0\0\0cynic\0\0\0czprg\0\0\0deber\0\0\0djjib\0\0\0dkcph\0\0\0dmdom\0\0\0dosdq\0\0\0dzalg\0\0\0ecgps\0\0\0ecgye\0\0\0eetll\0\0\0egcai\0\0\0eheai\0\0\0erasm\0\0\0eslpa\0\0\0esmad\0\0\0etadd\0\0\0fihel\0\0\0fimhq\0\0\0fjsuv\0\0\0fkpsy\0\0\0fmpni\0\0\0fmtkk\0\0\0fotho\0\0\0frpar\0\0\0galbv\0\0\0gblon\0\0\0gdgnd\0\0\0getbs\0\0\0gfcay\0\0\0gggci\0\0\0ghacc\0\0\0gigib\0\0\0gldkshvnglgoh\0\0\0globy\0\0\0glthu\0\0\0gmbjl\0\0\0gncky\0\0\0gpbbr\0\0\0gpmsb\0\0\0gpsbh\0\0\0gqssg\0\0\0grath\0\0\0gsgrv\0\0\0gtgua\0\0\0gugum\0\0\0gwoxb\0\0\0gygeo\0\0\0hebron\0\0hkhkg\0\0\0hntgu\0\0\0hrzag\0\0\0htpap\0\0\0hubud\0\0\0iddjj\0\0\0idjkt\0\0\0idmak\0\0\0iedub\0\0\0imdgs\0\0\0inccu\0\0\0iodga\0\0\0iqbgw\0\0\0irthr\0\0\0isrey\0\0\0itrom\0\0\0jeruslm\0jesth\0\0\0jmkin\0\0\0joamm\0\0\0jptyo\0\0\0kenbo\0\0\0kgfru\0\0\0khpnh\0\0\0kicxi\0\0\0kipho\0\0\0kitrw\0\0\0kmyva\0\0\0knbas\0\0\0kpfnj\0\0\0krsel\0\0\0kwkwi\0\0\0kygec\0\0\0kzkzo\0\0\0kzura\0\0\0lavte\0\0\0lbbey\0\0\0lccas\0\0\0livdz\0\0\0lkcmb\0\0\0lrmlw\0\0\0lsmsu\0\0\0ltvno\0\0\0lulux\0\0\0lvrix\0\0\0lytip\0\0\0macas\0\0\0mcmon\0\0\0mdkiv\0\0\0metgd\0\0\0mgtnr\0\0\0mhmaj\0\0\0mkskp\0\0\0mlbko\0\0\0mmrgn\0\0\0mnhvd\0\0\0mnuln\0\0\0momfm\0\0\0mpspn\0\0\0mqfdf\0\0\0mrnkc\0\0\0msmni\0\0\0mtmla\0\0\0muplu\0\0\0mvmle\0\0\0mwblz\0\0\0mxcjs\0\0\0mxcun\0\0\0mxhmo\0\0\0mxmam\0\0\0mxmex\0\0\0mxmzt\0\0\0mxtij\0\0\0mykul\0\0\0mzmpm\0\0\0nawdh\0\0\0ncnou\0\0\0nenim\0\0\0nfnlk\0\0\0nglos\0\0\0nimga\0\0\0nlams\0\0\0noosl\0\0\0npktm\0\0\0nrinu\0\0\0nuiue\0\0\0nzakl\0\0\0nzcht\0\0\0ommct\0\0\0papty\0\0\0pelim\0\0\0pfgmr\0\0\0pfnhv\0\0\0pfppt\0\0\0pgpom\0\0\0pgraw\0\0\0phmnl\0\0\0pkkhi\0\0\0plwaw\0\0\0pmmqc\0\0\0pnpcn\0\0\0prsju\0\0\0ptlis\0\0\0ptpdl\0\0\0pwror\0\0\0pyasu\0\0\0qadoh\0\0\0rereu\0\0\0robuh\0\0\0rsbeg\0\0\0ruasf\0\0\0rubax\0\0\0ruchita\0rugdx\0\0\0ruikt\0\0\0rukgd\0\0\0rukra\0\0\0rukuf\0\0\0rumow\0\0\0ruoms\0\0\0ruovb\0\0\0rupkc\0\0\0rurtw\0\0\0rusred\0\0rutof\0\0\0ruuus\0\0\0ruvog\0\0\0ruvvo\0\0\0ruyek\0\0\0ruyks\0\0\0rwkgl\0\0\0saruh\0\0\0sbhir\0\0\0scmaw\0\0\0sdkrt\0\0\0sesto\0\0\0sgsin\0\0\0shshn\0\0\0silju\0\0\0sjlyr\0\0\0skbts\0\0\0slfna\0\0\0smsai\0\0\0sndkr\0\0\0somgq\0\0\0srpbm\0\0\0ssjub\0\0\0sttms\0\0\0svsal\0\0\0sxphi\0\0\0sydam\0\0\0szqmn\0\0\0tcgdt\0\0\0tdndj\0\0\0tfpfr\0\0\0tglfw\0\0\0thbkk\0\0\0tjdyu\0\0\0tkfko\0\0\0tldil\0\0\0tmasb\0\0\0tntun\0\0\0totbu\0\0\0trist\0\0\0ttpos\0\0\0tvfun\0\0\0twtpe\0\0\0tzdar\0\0\0uaiev\0\0\0uasip\0\0\0ugkla\0\0\0umawk\0\0\0ummdy\0\0\0usadk\0\0\0usanc\0\0\0uschi\0\0\0usden\0\0\0ushnl\0\0\0usind\0\0\0uslax\0\0\0usnyc\0\0\0usphx\0\0\0utc\0\0\0\0\0utce01\0\0utce02\0\0utce03\0\0utce04\0\0utce05\0\0utce06\0\0utce07\0\0utce08\0\0utce09\0\0utce10\0\0utce11\0\0utce12\0\0utce13\0\0utce14\0\0utcw01\0\0utcw02\0\0utcw03\0\0utcw04\0\0utcw05\0\0utcw06\0\0utcw07\0\0utcw08\0\0utcw09\0\0utcw10\0\0utcw11\0\0utcw12\0\0uymvd\0\0\0uztas\0\0\0vavat\0\0\0vcsvd\0\0\0veccs\0\0\0vgtov\0\0\0vistt\0\0\0vnsgn\0\0\0vuvli\0\0\0wfmau\0\0\0wsapw\0\0\0yeade\0\0\0ytmam\0\0\0zajnb\0\0\0zmlun\0\0\0zwhre\0\0\0") } }; - } - #[clippy::msrv = "1.81"] - impl icu_provider::DataProvider for $provider { - fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> { - if req.id.locale.is_default() { - Ok(icu_provider::DataResponse { payload: icu_provider::DataPayload::from_static_ref(Self::SINGLETON_WINDOWS_ZONES_TO_BCP47_MAP_V1), metadata: icu_provider::DataResponseMetadata::default() }) - } else { - Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) - } - } - } - }; - ($ provider : ty , ITER) => { - __impl_windows_zones_to_bcp47_map_v1!($provider); - #[clippy::msrv = "1.81"] - impl icu_provider::IterableDataProvider for $provider { - fn iter_ids(&self) -> Result>, icu_provider::DataError> { - Ok([Default::default()].into_iter().collect()) - } - } - }; - ($ provider : ty , DRY) => { - __impl_windows_zones_to_bcp47_map_v1!($provider); - #[clippy::msrv = "1.81"] - impl icu_provider::DryDataProvider for $provider { - fn dry_load(&self, req: icu_provider::DataRequest) -> Result { - if req.id.locale.is_default() { - Ok(icu_provider::DataResponseMetadata::default()) - } else { - Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) - } - } - } - }; - ($ provider : ty , DRY , ITER) => { - __impl_windows_zones_to_bcp47_map_v1!($provider); - #[clippy::msrv = "1.81"] - impl icu_provider::DryDataProvider for $provider { - fn dry_load(&self, req: icu_provider::DataRequest) -> Result { - if req.id.locale.is_default() { - Ok(icu_provider::DataResponseMetadata::default()) - } else { - Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) - } - } - } - #[clippy::msrv = "1.81"] - impl icu_provider::IterableDataProvider for $provider { - fn iter_ids(&self) -> Result>, icu_provider::DataError> { - Ok([Default::default()].into_iter().collect()) - } - } - }; -} -#[doc(inline)] -pub use __impl_windows_zones_to_bcp47_map_v1 as impl_windows_zones_to_bcp47_map_v1; diff --git a/provider/registry/src/lib.rs b/provider/registry/src/lib.rs index 280babdd9de..81df5690e50 100644 --- a/provider/registry/src/lib.rs +++ b/provider/registry/src/lib.rs @@ -47,7 +47,7 @@ macro_rules! registry( icu::datetime::provider::time_zones::MetazoneSpecificNamesLongV1: MetazoneSpecificNamesLongV1, icu::datetime::provider::time_zones::MetazoneSpecificNamesShortV1: MetazoneSpecificNamesShortV1, icu::datetime::provider::time_zones::TimeZoneEssentialsV1: TimeZoneEssentialsV1, - icu::timezone::provider::ZoneOffsetPeriodV1: ZoneOffsetPeriodV1, + icu::time::provider::ZoneOffsetPeriodV1: ZoneOffsetPeriodV1, icu::decimal::provider::DecimalDigitsV1: DecimalDigitsV1, icu::decimal::provider::DecimalSymbolsV2: DecimalSymbolsV2, icu::list::provider::ListAndV2: ListAndV2, @@ -199,9 +199,9 @@ macro_rules! registry( icu::segmenter::provider::SentenceBreakDataV2: SentenceBreakDataV2, icu::segmenter::provider::WordBreakDataOverrideV1: WordBreakDataOverrideV1, icu::segmenter::provider::WordBreakDataV2: WordBreakDataV2, - icu::timezone::provider::names::Bcp47ToIanaMapV1: Bcp47ToIanaMapV1, - icu::timezone::provider::names::IanaToBcp47MapV3: IanaToBcp47MapV3, - icu::timezone::provider::windows::WindowsZonesToBcp47MapV1: WindowsZonesToBcp47MapV1, + icu::time::provider::names::Bcp47ToIanaMapV1: Bcp47ToIanaMapV1, + icu::time::provider::names::IanaToBcp47MapV3: IanaToBcp47MapV3, + icu::time::provider::windows::WindowsZonesToBcp47MapV1: WindowsZonesToBcp47MapV1, icu::datetime::provider::neo::WeekdayNamesV1: WeekdayNamesV1, icu::datetime::provider::neo::DayPeriodNamesV1: DayPeriodNamesV1, icu::datetime::provider::neo::GluePatternV1: GluePatternV1, diff --git a/provider/source/data/debug/timezone/Bcp47ToIanaMapV1.json b/provider/source/data/debug/time/Bcp47ToIanaMapV1.json similarity index 100% rename from provider/source/data/debug/timezone/Bcp47ToIanaMapV1.json rename to provider/source/data/debug/time/Bcp47ToIanaMapV1.json diff --git a/provider/source/data/debug/timezone/Bcp47ToIanaMapV1_checksum b/provider/source/data/debug/time/Bcp47ToIanaMapV1_checksum similarity index 100% rename from provider/source/data/debug/timezone/Bcp47ToIanaMapV1_checksum rename to provider/source/data/debug/time/Bcp47ToIanaMapV1_checksum diff --git a/provider/source/data/debug/timezone/IanaToBcp47MapV3.json b/provider/source/data/debug/time/IanaToBcp47MapV3.json similarity index 100% rename from provider/source/data/debug/timezone/IanaToBcp47MapV3.json rename to provider/source/data/debug/time/IanaToBcp47MapV3.json diff --git a/provider/source/data/debug/timezone/IanaToBcp47MapV3_checksum b/provider/source/data/debug/time/IanaToBcp47MapV3_checksum similarity index 100% rename from provider/source/data/debug/timezone/IanaToBcp47MapV3_checksum rename to provider/source/data/debug/time/IanaToBcp47MapV3_checksum diff --git a/provider/source/data/debug/timezone/WindowsZonesToBcp47MapV1.json b/provider/source/data/debug/time/WindowsZonesToBcp47MapV1.json similarity index 100% rename from provider/source/data/debug/timezone/WindowsZonesToBcp47MapV1.json rename to provider/source/data/debug/time/WindowsZonesToBcp47MapV1.json diff --git a/provider/source/data/debug/timezone/ZoneOffsetPeriodV1.json b/provider/source/data/debug/time/ZoneOffsetPeriodV1.json similarity index 100% rename from provider/source/data/debug/timezone/ZoneOffsetPeriodV1.json rename to provider/source/data/debug/time/ZoneOffsetPeriodV1.json diff --git a/provider/source/src/cldr_serde/time_zones/bcp47_tzid.rs b/provider/source/src/cldr_serde/time_zones/bcp47_tzid.rs index bb0bf041869..e112a2bee9b 100644 --- a/provider/source/src/cldr_serde/time_zones/bcp47_tzid.rs +++ b/provider/source/src/cldr_serde/time_zones/bcp47_tzid.rs @@ -7,7 +7,7 @@ //! Sample file: //! -use icu::timezone::TimeZoneBcp47Id; +use icu::time::TimeZone; use serde::Deserialize; use std::collections::BTreeMap; @@ -16,7 +16,7 @@ pub(crate) struct Bcp47TzidAliasData { #[serde(rename = "_deprecated")] pub(crate) deprecated: Option, #[serde(rename = "_preferred")] - pub(crate) preferred: Option, + pub(crate) preferred: Option, #[serde(rename = "_description")] pub(crate) description: String, #[serde(rename = "_alias")] @@ -32,7 +32,7 @@ pub(crate) struct Bcp47TimeZoneIds { pub(crate) _alias: String, pub(crate) _description: String, #[serde(flatten)] - pub(crate) values: BTreeMap, + pub(crate) values: BTreeMap, } #[derive(PartialEq, Debug, Deserialize)] diff --git a/provider/source/src/time_zones/convert.rs b/provider/source/src/time_zones/convert.rs index a358156064f..2a5a82e8620 100644 --- a/provider/source/src/time_zones/convert.rs +++ b/provider/source/src/time_zones/convert.rs @@ -12,10 +12,10 @@ use icu::calendar::Date; use icu::calendar::Iso; use icu::datetime::provider::time_zones::*; use icu::locale::LanguageIdentifier; -use icu::timezone::provider::*; -use icu::timezone::Time; -use icu::timezone::UtcOffset; -use icu::timezone::ZoneVariant; +use icu::time::provider::*; +use icu::time::zone::TimeZoneVariant; +use icu::time::zone::UtcOffset; +use icu::time::Time; use icu_provider::prelude::*; use parse_zoneinfo::line::Year; use parse_zoneinfo::table::Saving; @@ -67,13 +67,7 @@ impl SourceDataProvider { fn calculate_locations( &self, locale: &DataLocale, - ) -> Result< - ( - BTreeMap, - BTreeMap, - ), - DataError, - > { + ) -> Result<(BTreeMap, BTreeMap), DataError> { let time_zone_names = &self .cldr()? .dates("gregorian") @@ -329,11 +323,11 @@ impl SourceDataProvider { .filter_map(|(bcp47, iana)| Some((bcp47, tzdb.get_zoneset(iana)?))) .flat_map(|(bcp47, zoneset)| { let mut data = - Vec::<(IsoMinutesSinceEpoch, (UtcOffset, UtcOffset))>::new(); + Vec::<(MinutesSinceEpoch, (UtcOffset, UtcOffset))>::new(); fn store_offsets( - data: &mut Vec<(IsoMinutesSinceEpoch, (UtcOffset, UtcOffset))>, - end_time: IsoMinutesSinceEpoch, + data: &mut Vec<(MinutesSinceEpoch, (UtcOffset, UtcOffset))>, + end_time: MinutesSinceEpoch, utc_offset: i64, dst_offset_relative: i64, ) { @@ -354,8 +348,8 @@ impl SourceDataProvider { // even though the docs say that this is since the UNIX epoch (i.e. 1970-01-01 00:00:00 UTC). // This also assumes `t` uses the same offset as 1970-01-01 00:00:00. // While the local timestamps are what we want, the offset assumption probably needs fixing (TODO). - .map(|t| (t.to_timestamp() / 60) as IsoMinutesSinceEpoch) - .unwrap_or(IsoMinutesSinceEpoch::MAX); + .map(|t| (t.to_timestamp() / 60) as MinutesSinceEpoch) + .unwrap_or(MinutesSinceEpoch::MAX); if local_end_time <= 0 { continue; @@ -404,7 +398,7 @@ impl SourceDataProvider { zone_info.offset, rule.time_to_add, ) / 60) - as IsoMinutesSinceEpoch + as MinutesSinceEpoch } }, rule.time_to_add, @@ -731,7 +725,7 @@ impl DataProvider for SourceDataProvider { let Some(location) = locations.get(tz) else { return true; }; - if zv == ZoneVariant::Daylight { + if zv == TimeZoneVariant::Daylight { writeable::cmp_utf8( &time_zone_names_resource .region_format_dt @@ -739,7 +733,7 @@ impl DataProvider for SourceDataProvider { .interpolate([location]), v.as_bytes(), ) != Ordering::Equal - } else if zv == ZoneVariant::Standard { + } else if zv == TimeZoneVariant::Standard { writeable::cmp_utf8( &time_zone_names_resource .region_format_st @@ -748,7 +742,7 @@ impl DataProvider for SourceDataProvider { v.as_bytes(), ) != Ordering::Equal } else { - // tilde dep on icu_timezone + // tilde dep on icu_time unreachable!() } }) @@ -865,9 +859,9 @@ fn iter_mz_defaults<'a>( fn iter_mz_overrides<'a>( time_zone_names_resource: &'a TimeZoneNames, - bcp47_tzid_data: &'a BTreeMap, + bcp47_tzid_data: &'a BTreeMap, is_long: bool, -) -> impl Iterator { +) -> impl Iterator { time_zone_names_resource .zone .0 @@ -915,7 +909,7 @@ fn zone_variant_fallback(zone_format: &ZoneFormat) -> Option<&str> { .map(|s| s.as_str()) } -fn zone_variant_convert(zone_format: &ZoneFormat) -> impl Iterator { +fn zone_variant_convert(zone_format: &ZoneFormat) -> impl Iterator { zone_format .0 .iter() @@ -923,8 +917,8 @@ fn zone_variant_convert(zone_format: &ZoneFormat) -> impl Iterator ZoneVariant::Standard, - "daylight" => ZoneVariant::Daylight, + "standard" => TimeZoneVariant::Standard, + "daylight" => TimeZoneVariant::Daylight, _ => return None, }, value.as_str(), diff --git a/provider/source/src/time_zones/mod.rs b/provider/source/src/time_zones/mod.rs index 680a9d738b7..1b04c44821e 100644 --- a/provider/source/src/time_zones/mod.rs +++ b/provider/source/src/time_zones/mod.rs @@ -8,7 +8,7 @@ use crate::SourceDataProvider; use core::hash::Hash; use core::hash::Hasher; use icu::datetime::provider::time_zones::*; -use icu::timezone::provider::*; +use icu::time::provider::*; use icu_locale_core::subtags::Region; use icu_provider::prelude::*; use std::collections::BTreeMap; @@ -24,23 +24,23 @@ type Cache = OnceLock>; #[derive(Debug, Default)] pub(crate) struct Caches { - iana_to_bcp47: Cache>, - bcp47_to_canonical_iana: Cache>, + iana_to_bcp47: Cache>, + bcp47_to_canonical_iana: Cache>, metazone_to_short: Cache<(BTreeMap, u64)>, - primary_zones: Cache>, + primary_zones: Cache>, mz_period: Cache>, offset_period: Cache>, - reverse_metazones: Cache>>, + reverse_metazones: Cache>>, } impl SourceDataProvider { - fn reverse_metazones(&self) -> Result<&BTreeMap>, DataError> { + fn reverse_metazones(&self) -> Result<&BTreeMap>, DataError> { self.cldr()? .tz_caches .reverse_metazones .get_or_init(|| { let mz_period = self.metazone_period()?; - let mut reverse_metazones = BTreeMap::>::new(); + let mut reverse_metazones = BTreeMap::>::new(); for cursor in mz_period.list.iter0() { let tz = *cursor.key0(); for mz in cursor.iter1_copied().flat_map(|(_, mz)| mz) { @@ -56,7 +56,7 @@ impl SourceDataProvider { /// Returns a map from time zone long identifier to time zone BCP-47 ID. /// /// For example: "America/Chicago" to "uschi" - fn iana_to_bcp47_map(&self) -> Result<&BTreeMap, DataError> { + fn iana_to_bcp47_map(&self) -> Result<&BTreeMap, DataError> { self.cldr()? .tz_caches .iana_to_bcp47 @@ -93,7 +93,7 @@ impl SourceDataProvider { /// Returns a map from BCP-47 ID to a single canonical long identifier. /// /// For example: "inccu" to "Asia/Kolkata" - fn bcp47_to_canonical_iana_map(&self) -> Result<&BTreeMap, DataError> { + fn bcp47_to_canonical_iana_map(&self) -> Result<&BTreeMap, DataError> { self.cldr()? .tz_caches .bcp47_to_canonical_iana @@ -178,7 +178,7 @@ impl SourceDataProvider { .map_err(|&e| e) } - fn primary_zones_map(&self) -> Result<&BTreeMap, DataError> { + fn primary_zones_map(&self) -> Result<&BTreeMap, DataError> { self.cldr()? .tz_caches .primary_zones @@ -272,7 +272,7 @@ impl IterableDataProviderCached for SourceDataProvider { #[cfg(test)] mod tests { - use icu::timezone::ZoneVariant; + use icu::time::zone::TimeZoneVariant; use tinystr::tinystr; use super::*; @@ -306,7 +306,7 @@ mod tests { .payload .get() .locations - .get(&TimeZoneBcp47Id(tinystr!(8, "fmpni"))) + .get(&TimeZone(tinystr!(8, "fmpni"))) .unwrap() ); assert_eq!( @@ -315,7 +315,7 @@ mod tests { .payload .get() .locations - .get(&TimeZoneBcp47Id(tinystr!(8, "iedub"))) + .get(&TimeZone(tinystr!(8, "iedub"))) .unwrap() ); @@ -326,7 +326,7 @@ mod tests { .payload .get() .locations - .get(&TimeZoneBcp47Id(tinystr!(8, "itrom"))) + .get(&TimeZone(tinystr!(8, "itrom"))) .unwrap() ); @@ -353,7 +353,7 @@ mod tests { .payload .get() .defaults - .get(&metazone_now(TimeZoneBcp47Id(tinystr!(8, "aueuc")))) + .get(&metazone_now(TimeZone(tinystr!(8, "aueuc")))) .unwrap() ); assert_eq!( @@ -362,7 +362,7 @@ mod tests { .payload .get() .overrides - .get(&TimeZoneBcp47Id(tinystr!(8, "utc"))) + .get(&TimeZone(tinystr!(8, "utc"))) .unwrap() ); @@ -375,8 +375,8 @@ mod tests { .get() .defaults .get(&( - metazone_now(TimeZoneBcp47Id(tinystr!(8, "aueuc"))), - ZoneVariant::Standard + metazone_now(TimeZone(tinystr!(8, "aueuc"))), + TimeZoneVariant::Standard )) .unwrap() ); @@ -386,7 +386,7 @@ mod tests { .payload .get() .overrides - .get(&(TimeZoneBcp47Id(tinystr!(8, "utc")), ZoneVariant::Standard)) + .get(&(TimeZone(tinystr!(8, "utc")), TimeZoneVariant::Standard)) .unwrap() ); @@ -398,7 +398,7 @@ mod tests { .payload .get() .defaults - .get(&metazone_now(TimeZoneBcp47Id(tinystr!(8, "uslax")))) + .get(&metazone_now(TimeZone(tinystr!(8, "uslax")))) .unwrap() ); assert_eq!( @@ -407,7 +407,7 @@ mod tests { .payload .get() .overrides - .get(&TimeZoneBcp47Id(tinystr!(8, "utc"))) + .get(&TimeZone(tinystr!(8, "utc"))) .unwrap() ); @@ -420,8 +420,8 @@ mod tests { .get() .defaults .get(&( - metazone_now(TimeZoneBcp47Id(tinystr!(8, "uslax"))), - ZoneVariant::Daylight + metazone_now(TimeZone(tinystr!(8, "uslax"))), + TimeZoneVariant::Daylight )) .unwrap() ); @@ -431,7 +431,7 @@ mod tests { .payload .get() .overrides - .get(&(TimeZoneBcp47Id(tinystr!(8, "utc")), ZoneVariant::Standard)) + .get(&(TimeZone(tinystr!(8, "utc")), TimeZoneVariant::Standard)) .unwrap() ); } diff --git a/provider/source/src/time_zones/names.rs b/provider/source/src/time_zones/names.rs index c3bbff2feee..995213833c6 100644 --- a/provider/source/src/time_zones/names.rs +++ b/provider/source/src/time_zones/names.rs @@ -3,8 +3,8 @@ // (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). use crate::SourceDataProvider; -use icu::timezone::provider::names::*; -use icu::timezone::TimeZoneBcp47Id; +use icu::time::provider::names::*; +use icu::time::TimeZone; use icu_provider::prelude::*; use std::collections::BTreeMap; use std::collections::BTreeSet; @@ -18,8 +18,8 @@ impl DataProvider for SourceDataProvider { let iana2bcp = self.iana_to_bcp47_map()?; // Sort and deduplicate the BCP-47 IDs: - let bcp_set: BTreeSet = iana2bcp.values().copied().collect(); - let bcp47_ids: ZeroVec = bcp_set.into_iter().collect(); + let bcp_set: BTreeSet = iana2bcp.values().copied().collect(); + let bcp47_ids: ZeroVec = bcp_set.into_iter().collect(); let bcp47_ids_checksum = compute_bcp47_ids_hash(&bcp47_ids); // Get the canonical IANA names. @@ -41,7 +41,7 @@ impl DataProvider for SourceDataProvider { format!( "{}{iana}", char::from_u32( - icu::timezone::provider::names::NON_REGION_CITY_PREFIX as u32 + icu::time::provider::names::NON_REGION_CITY_PREFIX as u32 ) .unwrap() ) @@ -79,7 +79,7 @@ impl DataProvider for SourceDataProvider { // Note: The BTreeMap retains the order of the aliases, which is important for establishing // the canonical order of the IANA names. let bcp2iana = self.bcp47_to_canonical_iana_map()?; - let bcp47_ids: ZeroVec = bcp2iana.keys().copied().collect(); + let bcp47_ids: ZeroVec = bcp2iana.keys().copied().collect(); let bcp47_ids_checksum = compute_bcp47_ids_hash(&bcp47_ids); // Make the VarZeroVec of canonical IANA names. @@ -105,7 +105,7 @@ fn create_hasher() -> impl std::hash::Hasher { twox_hash::XxHash64::with_seed(0) } -fn compute_bcp47_ids_hash(bcp47_ids: &ZeroSlice) -> u64 { +fn compute_bcp47_ids_hash(bcp47_ids: &ZeroSlice) -> u64 { let mut hasher = create_hasher(); hasher.write(bcp47_ids.as_bytes()); hasher.finish() @@ -113,10 +113,10 @@ fn compute_bcp47_ids_hash(bcp47_ids: &ZeroSlice) -> u64 { #[test] fn test_compute_bcp47_ids_hash() { - let bcp47_ids: ZeroVec = [ - TimeZoneBcp47Id(tinystr::tinystr!(8, "aedxb")), - TimeZoneBcp47Id(tinystr::tinystr!(8, "brfor")), - TimeZoneBcp47Id(tinystr::tinystr!(8, "usinvev")), + let bcp47_ids: ZeroVec = [ + TimeZone(tinystr::tinystr!(8, "aedxb")), + TimeZone(tinystr::tinystr!(8, "brfor")), + TimeZone(tinystr::tinystr!(8, "usinvev")), ] .into_iter() .collect(); @@ -136,10 +136,10 @@ fn test_compute_bcp47_ids_hash() { // Checksum 3: hashing of a ZeroVec in a different order // (should not equal 1) - let bcp47_ids_rev: ZeroVec = [ - TimeZoneBcp47Id(tinystr::tinystr!(8, "usinvev")), - TimeZoneBcp47Id(tinystr::tinystr!(8, "aedxb")), - TimeZoneBcp47Id(tinystr::tinystr!(8, "brfor")), + let bcp47_ids_rev: ZeroVec = [ + TimeZone(tinystr::tinystr!(8, "usinvev")), + TimeZone(tinystr::tinystr!(8, "aedxb")), + TimeZone(tinystr::tinystr!(8, "brfor")), ] .into_iter() .collect(); @@ -148,10 +148,10 @@ fn test_compute_bcp47_ids_hash() { // Checksum 4: moving letters between the elements should change the hash // (should not equal 1) - let bcp47_ids_roll: ZeroVec = [ - TimeZoneBcp47Id(tinystr::tinystr!(8, "aedx")), - TimeZoneBcp47Id(tinystr::tinystr!(8, "bbrfor")), - TimeZoneBcp47Id(tinystr::tinystr!(8, "usinvev")), + let bcp47_ids_roll: ZeroVec = [ + TimeZone(tinystr::tinystr!(8, "aedx")), + TimeZone(tinystr::tinystr!(8, "bbrfor")), + TimeZone(tinystr::tinystr!(8, "usinvev")), ] .into_iter() .collect(); @@ -160,11 +160,11 @@ fn test_compute_bcp47_ids_hash() { // Checksum 5: empty strings at the end should change the hash // (should not equal 1) - let bcp47_ids_empty_end: ZeroVec = [ - TimeZoneBcp47Id(tinystr::tinystr!(8, "aedxb")), - TimeZoneBcp47Id(tinystr::tinystr!(8, "brfor")), - TimeZoneBcp47Id(tinystr::tinystr!(8, "usinvev")), - TimeZoneBcp47Id(tinystr::tinystr!(8, "")), + let bcp47_ids_empty_end: ZeroVec = [ + TimeZone(tinystr::tinystr!(8, "aedxb")), + TimeZone(tinystr::tinystr!(8, "brfor")), + TimeZone(tinystr::tinystr!(8, "usinvev")), + TimeZone(tinystr::tinystr!(8, "")), ] .into_iter() .collect(); @@ -173,11 +173,11 @@ fn test_compute_bcp47_ids_hash() { // Checksum 6: empty strings in the middle should change the hash // (should not equal 1 or 5) - let bcp47_ids_empty_middle: ZeroVec = [ - TimeZoneBcp47Id(tinystr::tinystr!(8, "aedxb")), - TimeZoneBcp47Id(tinystr::tinystr!(8, "")), - TimeZoneBcp47Id(tinystr::tinystr!(8, "brfor")), - TimeZoneBcp47Id(tinystr::tinystr!(8, "usinvev")), + let bcp47_ids_empty_middle: ZeroVec = [ + TimeZone(tinystr::tinystr!(8, "aedxb")), + TimeZone(tinystr::tinystr!(8, "")), + TimeZone(tinystr::tinystr!(8, "brfor")), + TimeZone(tinystr::tinystr!(8, "usinvev")), ] .into_iter() .collect(); @@ -204,7 +204,7 @@ fn test_normalize_canonicalize_iana_coverage() { let iana2bcp = provider.iana_to_bcp47_map().unwrap(); - let mapper = icu::timezone::TimeZoneIdMapper::try_new_unstable(&provider).unwrap(); + let mapper = icu::time::zone::IanaParser::try_new_unstable(&provider).unwrap(); let mapper = mapper.as_borrowed(); for iana_id in iana2bcp.keys() { diff --git a/provider/source/src/time_zones/windows.rs b/provider/source/src/time_zones/windows.rs index 1e3292cb722..d81241350a4 100644 --- a/provider/source/src/time_zones/windows.rs +++ b/provider/source/src/time_zones/windows.rs @@ -5,9 +5,9 @@ use std::collections::{BTreeMap, BTreeSet, HashSet}; use crate::{cldr_serde, SourceDataProvider}; -use icu::timezone::{ +use icu::time::{ provider::windows::{WindowsZonesToBcp47Map, WindowsZonesToBcp47MapV1}, - TimeZoneBcp47Id, + TimeZone, }; use icu_provider::prelude::*; use zerotrie::ZeroTrieSimpleAscii; @@ -24,8 +24,8 @@ impl DataProvider for SourceDataProvider { let windows_zones = &resource.supplemental.windows_zones; - let mut bcp47_set: BTreeSet = BTreeSet::default(); - let intermediary: Vec<(String, TimeZoneBcp47Id)> = windows_zones + let mut bcp47_set: BTreeSet = BTreeSet::default(); + let intermediary: Vec<(String, TimeZone)> = windows_zones .mapped_zones .iter() .map(|zone| { @@ -46,7 +46,7 @@ impl DataProvider for SourceDataProvider { }) .collect(); - let bcp47_ids: ZeroVec = bcp47_set.iter().copied().collect(); + let bcp47_ids: ZeroVec = bcp47_set.iter().copied().collect(); let windows2bcp_map: BTreeMap, usize> = intermediary .iter() @@ -85,7 +85,7 @@ impl crate::IterableDataProviderCached for SourceDataP #[cfg(test)] mod tests { - use icu::timezone::{provider::windows::WindowsZonesToBcp47MapV1, TimeZoneBcp47Id}; + use icu::time::{provider::windows::WindowsZonesToBcp47MapV1, TimeZone}; use icu_provider::{DataProvider, DataRequest, DataResponse}; use tinystr::tinystr; @@ -100,30 +100,30 @@ mod tests { let index = windows_zones.map.get("Eastern Standard Time/001").unwrap(); let result = windows_zones.bcp47_ids.get(index); - assert_eq!(result, Some(TimeZoneBcp47Id(tinystr!(8, "usnyc")))); + assert_eq!(result, Some(TimeZone(tinystr!(8, "usnyc")))); let index = windows_zones.map.get("Central Standard Time/001").unwrap(); let result = windows_zones.bcp47_ids.get(index); - assert_eq!(result, Some(TimeZoneBcp47Id(tinystr!(8, "uschi")))); + assert_eq!(result, Some(TimeZone(tinystr!(8, "uschi")))); let index = windows_zones.map.get("Hawaiian Standard Time/001").unwrap(); let result = windows_zones.bcp47_ids.get(index); - assert_eq!(result, Some(TimeZoneBcp47Id(tinystr!(8, "ushnl")))); + assert_eq!(result, Some(TimeZone(tinystr!(8, "ushnl")))); let index = windows_zones .map .get("Central Europe Standard Time/001") .unwrap(); let result = windows_zones.bcp47_ids.get(index); - assert_eq!(result, Some(TimeZoneBcp47Id(tinystr!(8, "hubud")))); + assert_eq!(result, Some(TimeZone(tinystr!(8, "hubud")))); let index = windows_zones.map.get("GMT Standard Time/001").unwrap(); let result = windows_zones.bcp47_ids.get(index); - assert_eq!(result, Some(TimeZoneBcp47Id(tinystr!(8, "gblon")))); + assert_eq!(result, Some(TimeZone(tinystr!(8, "gblon")))); let index = windows_zones.map.get("SE Asia Standard Time/001").unwrap(); let result = windows_zones.bcp47_ids.get(index); - assert_eq!(result, Some(TimeZoneBcp47Id(tinystr!(8, "thbkk")))); + assert_eq!(result, Some(TimeZone(tinystr!(8, "thbkk")))); } #[test] @@ -135,33 +135,33 @@ mod tests { let index = windows_zones.map.get("Eastern Standard Time/BS").unwrap(); let result = windows_zones.bcp47_ids.get(index); - assert_eq!(result, Some(TimeZoneBcp47Id(tinystr!(8, "bsnas")))); + assert_eq!(result, Some(TimeZone(tinystr!(8, "bsnas")))); let index = windows_zones.map.get("Central Standard Time/MX").unwrap(); let result = windows_zones.bcp47_ids.get(index); - assert_eq!(result, Some(TimeZoneBcp47Id(tinystr!(8, "mxmam")))); + assert_eq!(result, Some(TimeZone(tinystr!(8, "mxmam")))); let index = windows_zones .map .get("Central Europe Standard Time/CZ") .unwrap(); let result = windows_zones.bcp47_ids.get(index); - assert_eq!(result, Some(TimeZoneBcp47Id(tinystr!(8, "czprg")))); + assert_eq!(result, Some(TimeZone(tinystr!(8, "czprg")))); let index = windows_zones.map.get("GMT Standard Time/IE").unwrap(); let result = windows_zones.bcp47_ids.get(index); - assert_eq!(result, Some(TimeZoneBcp47Id(tinystr!(8, "iedub")))); + assert_eq!(result, Some(TimeZone(tinystr!(8, "iedub")))); let index = windows_zones.map.get("SE Asia Standard Time/AQ").unwrap(); let result = windows_zones.bcp47_ids.get(index); - assert_eq!(result, Some(TimeZoneBcp47Id(tinystr!(8, "aqdav")))); + assert_eq!(result, Some(TimeZone(tinystr!(8, "aqdav")))); let index = windows_zones.map.get("SE Asia Standard Time/KH").unwrap(); let result = windows_zones.bcp47_ids.get(index); - assert_eq!(result, Some(TimeZoneBcp47Id(tinystr!(8, "khpnh")))); + assert_eq!(result, Some(TimeZone(tinystr!(8, "khpnh")))); let index = windows_zones.map.get("SE Asia Standard Time/VN").unwrap(); let result = windows_zones.bcp47_ids.get(index); - assert_eq!(result, Some(TimeZoneBcp47Id(tinystr!(8, "vnsgn")))); + assert_eq!(result, Some(TimeZone(tinystr!(8, "vnsgn")))); } } diff --git a/tools/graveyard/Cargo.lock b/tools/graveyard/Cargo.lock new file mode 100644 index 00000000000..4b045b70615 --- /dev/null +++ b/tools/graveyard/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "icu_segmenter_lstm" +version = "1.0.0" diff --git a/tools/make/bakeddata/src/main.rs b/tools/make/bakeddata/src/main.rs index 4fd5947b212..16cd4e58d3a 100644 --- a/tools/make/bakeddata/src/main.rs +++ b/tools/make/bakeddata/src/main.rs @@ -38,7 +38,7 @@ const COMPONENTS: &[(&str, &[DataMarkerInfo], &str)] = &[ REPO_VERSION, ), ("segmenter", icu::segmenter::provider::MARKERS, REPO_VERSION), - ("timezone", icu::timezone::provider::MARKERS, REPO_VERSION), + ("time", icu::time::provider::MARKERS, REPO_VERSION), ( "experimental", icu::experimental::provider::MARKERS, diff --git a/tools/make/depcheck/src/allowlist.rs b/tools/make/depcheck/src/allowlist.rs index 52fc30a8b50..d9f2d0620fd 100644 --- a/tools/make/depcheck/src/allowlist.rs +++ b/tools/make/depcheck/src/allowlist.rs @@ -26,7 +26,7 @@ pub const BASIC_RUNTIME_DEPS: &[&str] = &[ "icu_plurals", "icu_properties", "icu_segmenter", - "icu_timezone", + "icu_time", // ICU4X utils "calendrical_calculations", "fixed_decimal", @@ -88,7 +88,7 @@ pub const EXTRA_DATA_DEPS: &[&str] = &[ "icu_plurals_data", "icu_properties_data", "icu_segmenter_data", - "icu_timezone_data", + "icu_time_data", ]; /// Dependencies allowed when opting in to experimental code diff --git a/tools/make/diplomat-coverage/src/allowlist.rs b/tools/make/diplomat-coverage/src/allowlist.rs index 6a2ca41579a..ac317730b7f 100644 --- a/tools/make/diplomat-coverage/src/allowlist.rs +++ b/tools/make/diplomat-coverage/src/allowlist.rs @@ -291,7 +291,7 @@ lazy_static::lazy_static! { // Scaffolding modules "icu::datetime::scaffold", - "icu::timezone::scaffold", + "icu::time::scaffold", // Provider modules // We could potentially expose them later, but it's hard to expose them @@ -307,13 +307,13 @@ lazy_static::lazy_static! { "icu::plurals::provider", "icu::properties::provider", "icu::segmenter::provider", - "icu::timezone::provider", + "icu::time::provider", "icu::transliterate::provider", // ULE types that are not in provider modules "icu::collections::codepointinvlist::CodePointInversionListULE", "icu::plurals::PluralCategoryULE", - "icu::timezone::types::ZoneVariantULE", + "icu::time::types::TimeZoneVariantULE", // Reexported "icu::calendar::any_calendar::AnyCalendar", @@ -321,18 +321,15 @@ lazy_static::lazy_static! { "icu::datetime::options::Length", "icu::casemap::titlecase::TitlecaseMapper", "icu::casemap::titlecase::TitlecaseMapperBorrowed", - "icu::timezone::types::Time", - "icu::timezone::types::DateTime", - "icu::timezone::types::UtcOffset", - "icu::timezone::types::ZoneVariant", - "icu::timezone::types::ZonedDateTime", "icu::datetime::input::Date", "icu::datetime::input::DateTime", "icu::datetime::input::Time", - "icu::datetime::input::TimeZoneBcp47Id", + "icu::datetime::input::TimeZone", "icu::datetime::input::TimeZoneInfo", "icu::datetime::input::UtcOffset", "icu::datetime::input::ZonedDateTime", + "icu::time::zone::IanaParser", + "icu::time::zone::WindowsParser", // "Internal" trait that should never be called directly "icu::calendar::Calendar", @@ -377,10 +374,10 @@ lazy_static::lazy_static! { "icu::calendar::types::MonthCode", "icu::calendar::types::WeekOfMonth", "icu::calendar::types::WeekOfYear", - "icu::timezone::types::IsoHour", - "icu::timezone::types::IsoMinute", - "icu::timezone::types::IsoSecond", - "icu::timezone::types::NanoSecond", + "icu::time::Hour", + "icu::time::Minute", + "icu::time::Second", + "icu::time::Nanosecond", // Convenience iterator for Rust. Useful but would require // allocations over FFI, so not worth it. @@ -399,7 +396,7 @@ lazy_static::lazy_static! { "icu_provider_adapters::fork::MultiForkByMarkerProvider", // Specialized constructor for separately constructed instances - "icu::timezone::TimeZoneIdMapperWithFastCanonicalization::try_new_with_mapper", + "icu::time::IanaParserExtended::try_new_with_mapper", // macros "icu::locale::langid", diff --git a/tutorials/.cargo/config.toml b/tutorials/.cargo/config.toml index 1715b912bb8..b4bc6706760 100644 --- a/tutorials/.cargo/config.toml +++ b/tutorials/.cargo/config.toml @@ -30,7 +30,7 @@ icu_pattern = { path = "../components/pattern" } icu_plurals = { path = "../components/plurals" } icu_properties = { path = "../components/properties" } icu_segmenter = { path = "../components/segmenter" } -icu_timezone = { path = "../components/timezone" } +icu_time = { path = "../components/time" } # FFI icu_capi = { path = "../ffi/capi" } @@ -62,7 +62,7 @@ icu_normalizer_data = { path = "../provider/data/normalizer" } icu_plurals_data = { path = "../provider/data/plurals" } icu_properties_data = { path = "../provider/data/properties"} icu_segmenter_data = { path = "../provider/data/segmenter" } -icu_timezone_data = { path = "../provider/data/timezone" } +icu_time_data = { path = "../provider/data/time" } bies = { path = "../utils/bies" } crlify = { path = "../utils/crlify" } diff --git a/tutorials/c-tiny/fixeddecimal/Cargo.lock b/tutorials/c-tiny/fixeddecimal/Cargo.lock index c81b2d0f47a..1b98e6f7538 100644 --- a/tutorials/c-tiny/fixeddecimal/Cargo.lock +++ b/tutorials/c-tiny/fixeddecimal/Cargo.lock @@ -476,11 +476,11 @@ name = "icu_segmenter_data" version = "2.0.0-beta1" [[patch.unused]] -name = "icu_timezone" +name = "icu_time" version = "2.0.0-beta1" [[patch.unused]] -name = "icu_timezone_data" +name = "icu_time_data" version = "2.0.0-beta1" [[patch.unused]] diff --git a/tutorials/c-tiny/segmenter/Cargo.lock b/tutorials/c-tiny/segmenter/Cargo.lock index c81b2d0f47a..1b98e6f7538 100644 --- a/tutorials/c-tiny/segmenter/Cargo.lock +++ b/tutorials/c-tiny/segmenter/Cargo.lock @@ -476,11 +476,11 @@ name = "icu_segmenter_data" version = "2.0.0-beta1" [[patch.unused]] -name = "icu_timezone" +name = "icu_time" version = "2.0.0-beta1" [[patch.unused]] -name = "icu_timezone_data" +name = "icu_time_data" version = "2.0.0-beta1" [[patch.unused]] diff --git a/tutorials/c/Cargo.lock b/tutorials/c/Cargo.lock index 87c6c09bad0..9f424ac1ec3 100644 --- a/tutorials/c/Cargo.lock +++ b/tutorials/c/Cargo.lock @@ -149,7 +149,7 @@ dependencies = [ "icu_provider", "icu_provider_adapters", "icu_segmenter", - "icu_timezone", + "icu_time", "log", "potential_utf", "simple_logger", @@ -231,7 +231,7 @@ dependencies = [ "icu_pattern", "icu_plurals", "icu_provider", - "icu_timezone", + "icu_time", "litemap", "potential_utf", "smallvec", @@ -502,14 +502,14 @@ dependencies = [ ] [[package]] -name = "icu_timezone" +name = "icu_time" version = "2.0.0-beta1" dependencies = [ "calendrical_calculations", "displaydoc", "icu_calendar", "icu_provider", - "icu_timezone_data", + "icu_time_data", "ixdtf", "tinystr", "writeable", @@ -518,7 +518,7 @@ dependencies = [ ] [[package]] -name = "icu_timezone_data" +name = "icu_time_data" version = "2.0.0-beta1" dependencies = [ "icu_provider_baked", diff --git a/tutorials/cpp/Cargo.lock b/tutorials/cpp/Cargo.lock index 1162ea4b167..a9c28dfdd85 100644 --- a/tutorials/cpp/Cargo.lock +++ b/tutorials/cpp/Cargo.lock @@ -170,7 +170,7 @@ dependencies = [ "icu_provider_blob", "icu_provider_fs", "icu_segmenter", - "icu_timezone", + "icu_time", "log", "potential_utf", "serde", @@ -256,7 +256,7 @@ dependencies = [ "icu_pattern", "icu_plurals", "icu_provider", - "icu_timezone", + "icu_time", "litemap", "potential_utf", "serde", @@ -569,14 +569,14 @@ dependencies = [ ] [[package]] -name = "icu_timezone" +name = "icu_time" version = "2.0.0-beta1" dependencies = [ "calendrical_calculations", "displaydoc", "icu_calendar", "icu_provider", - "icu_timezone_data", + "icu_time_data", "ixdtf", "serde", "tinystr", @@ -586,7 +586,7 @@ dependencies = [ ] [[package]] -name = "icu_timezone_data" +name = "icu_time_data" version = "2.0.0-beta1" dependencies = [ "icu_provider_baked", diff --git a/tutorials/cpp/datetime.cpp b/tutorials/cpp/datetime.cpp index 21d58c784bd..e21b080972f 100644 --- a/tutorials/cpp/datetime.cpp +++ b/tutorials/cpp/datetime.cpp @@ -8,8 +8,8 @@ #include #include #include -#include -#include +#include +#include #include #include @@ -126,7 +126,7 @@ int main() { std::unique_ptr any_date = Date::from_iso_in_calendar(2020, 10, 5, *cal.get()).ok().value(); std::unique_ptr