Skip to content

Commit

Permalink
Checkpoint: one model for dynamic datetime skeletons
Browse files Browse the repository at this point in the history
  • Loading branch information
sffc committed Nov 1, 2024
1 parent fb9f30a commit 7e05025
Show file tree
Hide file tree
Showing 8 changed files with 755 additions and 106 deletions.
39 changes: 38 additions & 1 deletion components/datetime/src/combo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use core::marker::PhantomData;

use crate::{format::neo::*, neo_skeleton::*, provider::neo::*, scaffold::*};
use crate::{dynamic::*, format::neo::*, neo_skeleton::*, provider::neo::*, scaffold::*};
use icu_provider::marker::NeverMarker;

/// Struct for combining date, time, and zone fields.
Expand Down Expand Up @@ -140,6 +140,15 @@ where
const COMPONENTS: NeoComponents = NeoComponents::Date(D::COMPONENTS);
}

impl<D> GetField<CompositeFieldSet> for Combo<D, NeoNeverMarker, NeoNeverMarker>
where
D: HasConstDateComponents,
{
fn get_field(&self) -> CompositeFieldSet {
todo!()
}
}

impl<D> DateTimeMarkers for Combo<D, NeoNeverMarker, NeoNeverMarker>
where
D: DateTimeMarkers,
Expand Down Expand Up @@ -178,6 +187,15 @@ where
const COMPONENTS: NeoComponents = NeoComponents::Time(T::COMPONENTS);
}

impl<T> GetField<CompositeFieldSet> for Combo<NeoNeverMarker, T, NeoNeverMarker>
where
T: HasConstTimeComponents,
{
fn get_field(&self) -> CompositeFieldSet {
todo!()
}
}

impl<T> DateTimeMarkers for Combo<NeoNeverMarker, T, NeoNeverMarker>
where
T: DateTimeMarkers,
Expand Down Expand Up @@ -216,6 +234,15 @@ where
const COMPONENTS: NeoComponents = NeoComponents::Zone(Z::COMPONENT);
}

impl<Z> GetField<CompositeFieldSet> for Combo<NeoNeverMarker, NeoNeverMarker, Z>
where
Z: HasConstZoneComponent,
{
fn get_field(&self) -> CompositeFieldSet {
todo!()
}
}

impl<Z> DateTimeMarkers for Combo<NeoNeverMarker, NeoNeverMarker, Z>
where
Z: DateTimeMarkers,
Expand Down Expand Up @@ -256,6 +283,16 @@ where
const COMPONENTS: NeoComponents = NeoComponents::DateTime(D::COMPONENTS, T::COMPONENTS);
}

impl<D, T> GetField<CompositeFieldSet> for Combo<D, T, NeoNeverMarker>
where
D: HasConstDateComponents,
T: HasConstTimeComponents,
{
fn get_field(&self) -> CompositeFieldSet {
todo!()
}
}

impl<D, T> DateTimeMarkers for Combo<D, T, NeoNeverMarker>
where
D: DateTimeMarkers,
Expand Down
Loading

0 comments on commit 7e05025

Please sign in to comment.