1use crate::error::ErrorField;
6use crate::pattern::{
7 DayPeriodNameLength, MonthNameLength, PatternLoadError, WeekdayNameLength, YearNameLength,
8};
9use crate::provider::names::*;
10use crate::provider::time_zones::tz;
11use core::fmt;
12use icu_provider::prelude::*;
13use yoke::Yokeable;
14
15use super::UnstableSealed;
16
17#[allow(missing_docs)]
28pub trait DateTimeNamesMarker: UnstableSealed {
29 type YearNames: NamesContainer<YearNamesV1, YearNameLength>;
30 type MonthNames: NamesContainer<MonthNamesV1, MonthNameLength>;
31 type WeekdayNames: NamesContainer<WeekdayNamesV1, WeekdayNameLength>;
32 type DayPeriodNames: NamesContainer<DayPeriodNamesV1, DayPeriodNameLength>;
33 type ZoneEssentials: NamesContainer<tz::EssentialsV1, ()>;
34 type ZoneLocations: NamesContainer<tz::LocationsOverrideV1, ()>;
35 type ZoneLocationsRoot: NamesContainer<tz::LocationsRootV1, ()>;
36 type ZoneExemplars: NamesContainer<tz::CitiesOverrideV1, ()>;
37 type ZoneExemplarsRoot: NamesContainer<tz::CitiesRootV1, ()>;
38 type ZoneGenericLong: NamesContainer<tz::MzGenericLongV1, ()>;
39 type ZoneGenericShort: NamesContainer<tz::MzGenericShortV1, ()>;
40 type ZoneStandardLong: NamesContainer<tz::MzStandardLongV1, ()>;
41 type ZoneSpecificLong: NamesContainer<tz::MzSpecificLongV1, ()>;
42 type ZoneSpecificShort: NamesContainer<tz::MzSpecificShortV1, ()>;
43 type MetazoneLookup: NamesContainer<tz::MzPeriodV1, ()>;
44}
45
46pub trait MaybeAsErrorField: UnstableSealed {
48 fn maybe_as_error_field(&self) -> Option<ErrorField>;
49}
50
51impl MaybeAsErrorField for () {
52 fn maybe_as_error_field(&self) -> Option<ErrorField> {
53 None
54 }
55}
56
57impl UnstableSealed for YearNameLength {}
58impl MaybeAsErrorField for YearNameLength {
59 fn maybe_as_error_field(&self) -> Option<ErrorField> {
60 Some(self.to_approximate_error_field())
61 }
62}
63
64impl UnstableSealed for MonthNameLength {}
65impl MaybeAsErrorField for MonthNameLength {
66 fn maybe_as_error_field(&self) -> Option<ErrorField> {
67 Some(self.to_approximate_error_field())
68 }
69}
70
71impl UnstableSealed for WeekdayNameLength {}
72impl MaybeAsErrorField for WeekdayNameLength {
73 fn maybe_as_error_field(&self) -> Option<ErrorField> {
74 Some(self.to_approximate_error_field())
75 }
76}
77
78impl UnstableSealed for DayPeriodNameLength {}
79impl MaybeAsErrorField for DayPeriodNameLength {
80 fn maybe_as_error_field(&self) -> Option<ErrorField> {
81 Some(self.to_approximate_error_field())
82 }
83}
84
85#[allow(missing_docs)]
92pub trait NamesContainer<M: DynamicDataMarker, Variables>: UnstableSealed
93where
94 Variables: PartialEq + Copy + fmt::Debug,
95{
96 type Container: MaybePayload<M, Variables> + fmt::Debug + Clone;
97}
98
99impl<M: DynamicDataMarker, Variables> NamesContainer<M, Variables> for ()
100where
101 Variables: PartialEq + Copy + fmt::Debug,
102{
103 type Container = ();
104}
105
106macro_rules! impl_holder_trait {
107 ($marker:path) => {
108 impl UnstableSealed for $marker {}
109 impl<Variables> NamesContainer<$marker, Variables> for $marker
110 where
111 Variables: PartialEq + Copy + MaybeAsErrorField + fmt::Debug,
112 {
113 type Container = DataPayloadWithVariables<$marker, Variables>;
114 }
115 };
116}
117
118impl_holder_trait!(YearNamesV1);
119impl_holder_trait!(MonthNamesV1);
120impl_holder_trait!(WeekdayNamesV1);
121impl_holder_trait!(DayPeriodNamesV1);
122impl_holder_trait!(tz::EssentialsV1);
123impl_holder_trait!(tz::LocationsOverrideV1);
124impl_holder_trait!(tz::LocationsRootV1);
125impl_holder_trait!(tz::CitiesOverrideV1);
126impl_holder_trait!(tz::CitiesRootV1);
127impl_holder_trait!(tz::MzGenericLongV1);
128impl_holder_trait!(tz::MzGenericShortV1);
129impl_holder_trait!(tz::MzStandardLongV1);
130impl_holder_trait!(tz::MzSpecificLongV1);
131impl_holder_trait!(tz::MzSpecificShortV1);
132impl_holder_trait!(tz::MzPeriodV1);
133
134#[allow(missing_docs)]
136#[derive(Debug, Copy, Clone, displaydoc::Display)]
137#[non_exhaustive]
138pub enum MaybePayloadError {
139 FormatterTooSpecific,
141 ConflictingField(ErrorField),
143}
144
145impl core::error::Error for MaybePayloadError {}
146
147impl MaybePayloadError {
148 pub(crate) fn into_load_error(self, error_field: ErrorField) -> PatternLoadError {
149 match self {
150 Self::FormatterTooSpecific => PatternLoadError::FormatterTooSpecific(error_field),
151 Self::ConflictingField(loaded_field) => PatternLoadError::ConflictingField {
152 field: error_field,
153 previous_field: loaded_field,
154 },
155 }
156 }
157}
158
159#[allow(missing_docs)]
169pub trait MaybePayload<M: DynamicDataMarker, Variables>: UnstableSealed {
170 fn new_empty() -> Self;
171 fn load_put<P>(
172 &mut self,
173 provider: &P,
174 req: DataRequest,
175 variables: Variables,
176 ) -> Result<Result<DataResponseMetadata, DataError>, MaybePayloadError>
177 where
178 P: BoundDataProvider<M> + ?Sized,
179 Self: Sized;
180 fn get(&self) -> DataPayloadWithVariablesBorrowed<'_, M, Variables>;
181}
182
183pub struct DataPayloadWithVariables<M: DynamicDataMarker, Variables> {
186 inner: OptionalNames<Variables, DataPayload<M>>,
187}
188
189impl<M: DynamicDataMarker, Variables> Clone for DataPayloadWithVariables<M, Variables>
190where
191 Variables: Clone,
192 DataPayload<M>: Clone,
193{
194 fn clone(&self) -> Self {
195 Self {
196 inner: self.inner.clone(),
197 }
198 }
199}
200
201impl<M: DynamicDataMarker, Variables> UnstableSealed for DataPayloadWithVariables<M, Variables> {}
202
203impl<M: DynamicDataMarker, Variables> fmt::Debug for DataPayloadWithVariables<M, Variables>
204where
205 Variables: fmt::Debug,
206 DataPayload<M>: fmt::Debug,
207{
208 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
209 self.inner.fmt(f)
210 }
211}
212
213impl<M: DynamicDataMarker, Variables> From<()> for DataPayloadWithVariables<M, Variables> {
215 #[inline]
216 fn from(_: ()) -> Self {
217 Self {
218 inner: OptionalNames::None,
219 }
220 }
221}
222
223#[allow(missing_docs)]
225pub struct DataPayloadWithVariablesBorrowed<'data, M: DynamicDataMarker, Variables> {
226 pub(crate) inner: OptionalNames<Variables, &'data <M::DataStruct as Yokeable<'data>>::Output>,
227}
228
229impl<'data, M: DynamicDataMarker, Variables> fmt::Debug
230 for DataPayloadWithVariablesBorrowed<'data, M, Variables>
231where
232 <M::DataStruct as Yokeable<'data>>::Output: fmt::Debug,
233 Variables: fmt::Debug,
234{
235 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
236 f.debug_struct(core::any::type_name::<Self>())
237 .field("inner", &self.inner)
238 .finish()
239 }
240}
241
242impl<M: DynamicDataMarker, Variables> MaybePayload<M, Variables>
243 for DataPayloadWithVariables<M, Variables>
244where
245 Variables: PartialEq + Copy + MaybeAsErrorField,
246{
247 #[inline]
248 fn new_empty() -> Self {
249 Self {
250 inner: OptionalNames::None,
251 }
252 }
253 fn load_put<P>(
254 &mut self,
255 provider: &P,
256 req: DataRequest,
257 variables: Variables,
258 ) -> Result<Result<DataResponseMetadata, DataError>, MaybePayloadError>
259 where
260 P: BoundDataProvider<M> + ?Sized,
261 Self: Sized,
262 {
263 let arg_variables = variables;
264 match &self.inner {
265 OptionalNames::SingleLength { variables, .. } if arg_variables == *variables => {
266 return Ok(Ok(Default::default()));
268 }
269 OptionalNames::SingleLength { variables, .. } => {
270 let loaded_field = match variables.maybe_as_error_field() {
271 Some(x) => x,
272 None => {
273 debug_assert!(false, "all non-unit variables implement this trait");
274 use crate::provider::fields::*;
275 ErrorField(Field {
276 symbol: FieldSymbol::Era,
277 length: FieldLength::Six,
278 })
279 }
280 };
281 return Err(MaybePayloadError::ConflictingField(loaded_field));
282 }
283 OptionalNames::None => (),
284 };
285 match provider.load_bound(req) {
286 Ok(response) => {
287 self.inner = OptionalNames::SingleLength {
288 payload: response.payload,
289 variables: arg_variables,
290 };
291 Ok(Ok(response.metadata))
292 }
293 Err(e) => Ok(Err(e)),
294 }
295 }
296 #[inline]
297 fn get(&self) -> DataPayloadWithVariablesBorrowed<'_, M, Variables> {
298 DataPayloadWithVariablesBorrowed {
299 inner: self.inner.as_borrowed(),
300 }
301 }
302}
303
304impl<M: DynamicDataMarker, Variables> MaybePayload<M, Variables> for () {
305 #[inline]
306 fn new_empty() -> Self {}
307 #[inline]
308 fn load_put<P>(
309 &mut self,
310 _: &P,
311 _: DataRequest,
312 _: Variables,
313 ) -> Result<Result<DataResponseMetadata, DataError>, MaybePayloadError>
314 where
315 P: BoundDataProvider<M> + ?Sized,
316 Self: Sized,
317 {
318 Err(MaybePayloadError::FormatterTooSpecific)
319 }
320 #[inline]
321 fn get(&self) -> DataPayloadWithVariablesBorrowed<'_, M, Variables> {
322 DataPayloadWithVariablesBorrowed {
323 inner: OptionalNames::None,
324 }
325 }
326}
327
328#[derive(Debug, Copy, Clone)]
331pub(crate) enum OptionalNames<Variables, Payload> {
332 None,
333 SingleLength {
334 variables: Variables,
335 payload: Payload,
336 },
337}
338
339impl<Variables, Payload> OptionalNames<Variables, Payload>
340where
341 Variables: Copy + PartialEq,
342 Payload: Copy,
343{
344 pub(crate) fn get_with_variables(&self, arg_variables: Variables) -> Option<Payload> {
345 match self {
346 Self::None => None,
347 Self::SingleLength { variables, payload } if arg_variables == *variables => {
348 Some(*payload)
349 }
350 _ => None,
351 }
352 }
353
354 #[allow(dead_code, reason = "https://github.com/unicode-org/icu4x/issues/5448")]
356 pub(crate) fn get_any(&self) -> Option<Payload> {
357 match self {
358 Self::None => None,
359 Self::SingleLength { payload, .. } => Some(*payload),
360 }
361 }
362}
363
364impl<Payload> OptionalNames<(), Payload>
365where
366 Payload: Copy,
367{
368 pub(crate) fn get_option(&self) -> Option<Payload> {
369 match self {
370 Self::SingleLength {
371 variables: (),
372 payload,
373 } => Some(*payload),
374 _ => None,
375 }
376 }
377}
378
379impl<M: DynamicDataMarker, Variables> OptionalNames<Variables, DataPayload<M>>
380where
381 Variables: Copy,
382{
383 #[inline]
384 pub(crate) fn as_borrowed<'a>(
385 &'a self,
386 ) -> OptionalNames<Variables, &'a <M::DataStruct as Yokeable<'a>>::Output> {
387 match self {
388 Self::None => OptionalNames::None,
389 Self::SingleLength { variables, payload } => OptionalNames::SingleLength {
390 variables: *variables,
391 payload: payload.get(),
392 },
393 }
394 }
395}
396
397#[allow(missing_docs)]
434pub trait DateTimeNamesFrom<M: DateTimeNamesMarker>: DateTimeNamesMarker {
436 fn map_year_names(
437 other: <M::YearNames as NamesContainer<YearNamesV1, YearNameLength>>::Container,
438 ) -> <Self::YearNames as NamesContainer<YearNamesV1, YearNameLength>>::Container;
439 fn map_month_names(
440 other: <M::MonthNames as NamesContainer<MonthNamesV1, MonthNameLength>>::Container,
441 ) -> <Self::MonthNames as NamesContainer<MonthNamesV1, MonthNameLength>>::Container;
442 fn map_weekday_names(
443 other: <M::WeekdayNames as NamesContainer<WeekdayNamesV1, WeekdayNameLength>>::Container,
444 ) -> <Self::WeekdayNames as NamesContainer<WeekdayNamesV1, WeekdayNameLength>>::Container;
445 fn map_day_period_names(
446 other: <M::DayPeriodNames as NamesContainer<DayPeriodNamesV1, DayPeriodNameLength>>::Container,
447 ) -> <Self::DayPeriodNames as NamesContainer<DayPeriodNamesV1, DayPeriodNameLength>>::Container;
448 fn map_zone_essentials(
449 other: <M::ZoneEssentials as NamesContainer<tz::EssentialsV1, ()>>::Container,
450 ) -> <Self::ZoneEssentials as NamesContainer<tz::EssentialsV1, ()>>::Container;
451 fn map_zone_locations(
452 other: <M::ZoneLocations as NamesContainer<tz::LocationsOverrideV1, ()>>::Container,
453 ) -> <Self::ZoneLocations as NamesContainer<tz::LocationsOverrideV1, ()>>::Container;
454 fn map_zone_locations_root(
455 other: <M::ZoneLocationsRoot as NamesContainer<tz::LocationsRootV1, ()>>::Container,
456 ) -> <Self::ZoneLocationsRoot as NamesContainer<tz::LocationsRootV1, ()>>::Container;
457 fn map_zone_exemplars(
458 other: <M::ZoneExemplars as NamesContainer<tz::CitiesOverrideV1, ()>>::Container,
459 ) -> <Self::ZoneExemplars as NamesContainer<tz::CitiesOverrideV1, ()>>::Container;
460 fn map_zone_exemplars_root(
461 other: <M::ZoneExemplarsRoot as NamesContainer<tz::CitiesRootV1, ()>>::Container,
462 ) -> <Self::ZoneExemplarsRoot as NamesContainer<tz::CitiesRootV1, ()>>::Container;
463 fn map_zone_generic_long(
464 other: <M::ZoneGenericLong as NamesContainer<tz::MzGenericLongV1, ()>>::Container,
465 ) -> <Self::ZoneGenericLong as NamesContainer<tz::MzGenericLongV1, ()>>::Container;
466 fn map_zone_generic_short(
467 other: <M::ZoneGenericShort as NamesContainer<tz::MzGenericShortV1, ()>>::Container,
468 ) -> <Self::ZoneGenericShort as NamesContainer<tz::MzGenericShortV1, ()>>::Container;
469 fn map_zone_standard_long(
470 other: <M::ZoneStandardLong as NamesContainer<tz::MzStandardLongV1, ()>>::Container,
471 ) -> <Self::ZoneStandardLong as NamesContainer<tz::MzStandardLongV1, ()>>::Container;
472 fn map_zone_specific_long(
473 other: <M::ZoneSpecificLong as NamesContainer<tz::MzSpecificLongV1, ()>>::Container,
474 ) -> <Self::ZoneSpecificLong as NamesContainer<tz::MzSpecificLongV1, ()>>::Container;
475 fn map_zone_specific_short(
476 other: <M::ZoneSpecificShort as NamesContainer<tz::MzSpecificShortV1, ()>>::Container,
477 ) -> <Self::ZoneSpecificShort as NamesContainer<tz::MzSpecificShortV1, ()>>::Container;
478 fn map_metazone_lookup(
479 other: <M::MetazoneLookup as NamesContainer<tz::MzPeriodV1, ()>>::Container,
480 ) -> <Self::MetazoneLookup as NamesContainer<tz::MzPeriodV1, ()>>::Container;
481}
482
483impl<M: DateTimeNamesMarker, T: DateTimeNamesMarker> DateTimeNamesFrom<M> for T
484where
485 <Self::YearNames as NamesContainer<YearNamesV1, YearNameLength>>::Container:
486 From<<M::YearNames as NamesContainer<YearNamesV1, YearNameLength>>::Container>,
487 <Self::MonthNames as NamesContainer<MonthNamesV1, MonthNameLength>>::Container:
488 From<<M::MonthNames as NamesContainer<MonthNamesV1, MonthNameLength>>::Container>,
489 <Self::WeekdayNames as NamesContainer<WeekdayNamesV1, WeekdayNameLength>>::Container:
490 From<<M::WeekdayNames as NamesContainer<WeekdayNamesV1, WeekdayNameLength>>::Container>,
491 <Self::DayPeriodNames as NamesContainer<DayPeriodNamesV1, DayPeriodNameLength>>::Container:
492 From<
493 <M::DayPeriodNames as NamesContainer<DayPeriodNamesV1, DayPeriodNameLength>>::Container,
494 >,
495 <Self::ZoneEssentials as NamesContainer<tz::EssentialsV1, ()>>::Container:
496 From<<M::ZoneEssentials as NamesContainer<tz::EssentialsV1, ()>>::Container>,
497 <Self::ZoneLocations as NamesContainer<tz::LocationsOverrideV1, ()>>::Container:
498 From<<M::ZoneLocations as NamesContainer<tz::LocationsOverrideV1, ()>>::Container>,
499 <Self::ZoneLocationsRoot as NamesContainer<tz::LocationsRootV1, ()>>::Container:
500 From<<M::ZoneLocationsRoot as NamesContainer<tz::LocationsRootV1, ()>>::Container>,
501 <Self::ZoneExemplars as NamesContainer<tz::CitiesOverrideV1, ()>>::Container:
502 From<<M::ZoneExemplars as NamesContainer<tz::CitiesOverrideV1, ()>>::Container>,
503 <Self::ZoneExemplarsRoot as NamesContainer<tz::CitiesRootV1, ()>>::Container:
504 From<<M::ZoneExemplarsRoot as NamesContainer<tz::CitiesRootV1, ()>>::Container>,
505 <Self::ZoneGenericLong as NamesContainer<tz::MzGenericLongV1, ()>>::Container:
506 From<<M::ZoneGenericLong as NamesContainer<tz::MzGenericLongV1, ()>>::Container>,
507 <Self::ZoneGenericShort as NamesContainer<tz::MzGenericShortV1, ()>>::Container:
508 From<<M::ZoneGenericShort as NamesContainer<tz::MzGenericShortV1, ()>>::Container>,
509 <Self::ZoneStandardLong as NamesContainer<tz::MzStandardLongV1, ()>>::Container:
510 From<<M::ZoneStandardLong as NamesContainer<tz::MzStandardLongV1, ()>>::Container>,
511 <Self::ZoneSpecificLong as NamesContainer<tz::MzSpecificLongV1, ()>>::Container:
512 From<<M::ZoneSpecificLong as NamesContainer<tz::MzSpecificLongV1, ()>>::Container>,
513 <Self::ZoneSpecificShort as NamesContainer<tz::MzSpecificShortV1, ()>>::Container:
514 From<<M::ZoneSpecificShort as NamesContainer<tz::MzSpecificShortV1, ()>>::Container>,
515 <Self::MetazoneLookup as NamesContainer<tz::MzPeriodV1, ()>>::Container:
516 From<<M::MetazoneLookup as NamesContainer<tz::MzPeriodV1, ()>>::Container>,
517{
518 #[inline]
519 fn map_year_names(
520 other: <M::YearNames as NamesContainer<YearNamesV1, YearNameLength>>::Container,
521 ) -> <Self::YearNames as NamesContainer<YearNamesV1, YearNameLength>>::Container {
522 other.into()
523 }
524 #[inline]
525 fn map_month_names(
526 other: <M::MonthNames as NamesContainer<MonthNamesV1, MonthNameLength>>::Container,
527 ) -> <Self::MonthNames as NamesContainer<MonthNamesV1, MonthNameLength>>::Container {
528 other.into()
529 }
530 #[inline]
531 fn map_weekday_names(
532 other: <M::WeekdayNames as NamesContainer<WeekdayNamesV1, WeekdayNameLength>>::Container,
533 ) -> <Self::WeekdayNames as NamesContainer<WeekdayNamesV1, WeekdayNameLength>>::Container {
534 other.into()
535 }
536 #[inline]
537 fn map_day_period_names(
538 other: <M::DayPeriodNames as NamesContainer<DayPeriodNamesV1, DayPeriodNameLength>>::Container,
539 ) -> <Self::DayPeriodNames as NamesContainer<DayPeriodNamesV1, DayPeriodNameLength>>::Container
540 {
541 other.into()
542 }
543 #[inline]
544 fn map_zone_essentials(
545 other: <M::ZoneEssentials as NamesContainer<tz::EssentialsV1, ()>>::Container,
546 ) -> <Self::ZoneEssentials as NamesContainer<tz::EssentialsV1, ()>>::Container {
547 other.into()
548 }
549 #[inline]
550 fn map_zone_locations(
551 other: <M::ZoneLocations as NamesContainer<tz::LocationsOverrideV1, ()>>::Container,
552 ) -> <Self::ZoneLocations as NamesContainer<tz::LocationsOverrideV1, ()>>::Container {
553 other.into()
554 }
555 #[inline]
556 fn map_zone_locations_root(
557 other: <M::ZoneLocationsRoot as NamesContainer<tz::LocationsRootV1, ()>>::Container,
558 ) -> <Self::ZoneLocationsRoot as NamesContainer<tz::LocationsRootV1, ()>>::Container {
559 other.into()
560 }
561 #[inline]
562 fn map_zone_exemplars(
563 other: <M::ZoneExemplars as NamesContainer<tz::CitiesOverrideV1, ()>>::Container,
564 ) -> <Self::ZoneExemplars as NamesContainer<tz::CitiesOverrideV1, ()>>::Container {
565 other.into()
566 }
567 #[inline]
568 fn map_zone_exemplars_root(
569 other: <M::ZoneExemplarsRoot as NamesContainer<tz::CitiesRootV1, ()>>::Container,
570 ) -> <Self::ZoneExemplarsRoot as NamesContainer<tz::CitiesRootV1, ()>>::Container {
571 other.into()
572 }
573 #[inline]
574 fn map_zone_generic_long(
575 other: <M::ZoneGenericLong as NamesContainer<tz::MzGenericLongV1, ()>>::Container,
576 ) -> <Self::ZoneGenericLong as NamesContainer<tz::MzGenericLongV1, ()>>::Container {
577 other.into()
578 }
579 #[inline]
580 fn map_zone_generic_short(
581 other: <M::ZoneGenericShort as NamesContainer<tz::MzGenericShortV1, ()>>::Container,
582 ) -> <Self::ZoneGenericShort as NamesContainer<tz::MzGenericShortV1, ()>>::Container {
583 other.into()
584 }
585 #[inline]
586 fn map_zone_standard_long(
587 other: <M::ZoneStandardLong as NamesContainer<tz::MzStandardLongV1, ()>>::Container,
588 ) -> <Self::ZoneStandardLong as NamesContainer<tz::MzStandardLongV1, ()>>::Container {
589 other.into()
590 }
591 #[inline]
592 fn map_zone_specific_long(
593 other: <M::ZoneSpecificLong as NamesContainer<tz::MzSpecificLongV1, ()>>::Container,
594 ) -> <Self::ZoneSpecificLong as NamesContainer<tz::MzSpecificLongV1, ()>>::Container {
595 other.into()
596 }
597 #[inline]
598 fn map_zone_specific_short(
599 other: <M::ZoneSpecificShort as NamesContainer<tz::MzSpecificShortV1, ()>>::Container,
600 ) -> <Self::ZoneSpecificShort as NamesContainer<tz::MzSpecificShortV1, ()>>::Container {
601 other.into()
602 }
603 #[inline]
604 fn map_metazone_lookup(
605 other: <M::MetazoneLookup as NamesContainer<tz::MzPeriodV1, ()>>::Container,
606 ) -> <Self::MetazoneLookup as NamesContainer<tz::MzPeriodV1, ()>>::Container {
607 other.into()
608 }
609}