Closed DaanA32 closed 2 years ago
Hi, thanks for the PR! I don't think i understand what new functionality this is trying to add. Are you trying to get owned DateTime<Tz>
instances from the iterator? If so, why not use schedule.upcoming().cloned()
?
Hi zslaton, The ScheduleIterator is currently not exposed as a public struct, so it is not possible to use it in a struct. This would allow having an owned iterator instead of having be dependant on the lifetime of the schedule.
It allows for the following in dependant projects:
struct Example<Z> {
iterator: Box<dyn Iterator<Item = DateTime<Z>>
}
As the following is not possible
struct Example<Z> {
iterator: ScheduleIterator<Z>
}
Hi @DaanA32, sincere apologies for dropping the ball on this. I think it's been addressed by #104, so I'm going to close this out.
Hi all,
I needed the following which was not possible:
I've made minimal changes to ScheduleIterator and Schedule so that it does compile.