use jiff::tz::TimeZone;
use crate::intervals::absolute::{
AbsBoundPair,
AbsFiniteBoundPos,
AbsStartBound,
BoundedAbsInterval,
HalfBoundedAbsInterval,
HasAbsBoundPair,
};
use crate::intervals::meta::BoundInclusivity;
use crate::intervals::ops::cut::{CutResult, CutType, Cuttable};
use crate::intervals::relative::BoundedRelInterval;
use crate::time::CalendarAnchorOffset;
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct NaiveDurationSplit {
remaining_interval: AbsBoundPair,
calendar_anchor_offset: CalendarAnchorOffset,
tz: TimeZone,
exhausted: bool,
}
impl NaiveDurationSplit {
#[must_use]
pub fn new<I>(interval: &I, calendar_anchor_offset: CalendarAnchorOffset, tz: TimeZone) -> Self
where
I: HasAbsBoundPair,
{
NaiveDurationSplit {
remaining_interval: interval.abs_bound_pair(),
calendar_anchor_offset,
tz,
exhausted: false,
}
}
}
impl Iterator for NaiveDurationSplit {
type Item = AbsBoundPair;
fn next(&mut self) -> Option<Self::Item> {
if self.exhausted {
return None;
}
todo!()
}
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct IntervalSplit<I> {
remaining_interval: I,
splitter: BoundedRelInterval,
}
impl<I> IntervalSplit<I>
where
I: HasAbsBoundPair,
{
#[must_use]
pub fn new(interval: I, splitter: BoundedRelInterval) -> Self {
IntervalSplit {
remaining_interval: interval,
splitter,
}
}
}