pub trait CurveIterator: Debug {
type CurveKind: CurveType;
// Required method
fn next_window(
&mut self,
) -> Option<Window<<Self::CurveKind as CurveType>::WindowKind>>;
// Provided methods
fn collect_curve<R: FromCurveIterator<Self::CurveKind>>(self) -> R
where Self: Sized { ... }
fn reclassify<O>(self) -> ReclassifyIterator<Self, O>
where Self: Sized { ... }
fn normalize(
self,
) -> JoinAdjacentIterator<CurveIteratorIterator<Self>, <Self::CurveKind as CurveType>::WindowKind, Self::CurveKind>
where Self: Sized { ... }
fn take_while_curve<F>(
self,
fun: F,
) -> TakeWhile<CurveIteratorIterator<Self>, F>
where Self: Sized,
F: for<'a> FnMut(&'a Window<<Self::CurveKind as CurveType>::WindowKind>) -> bool { ... }
fn fuse_curve(self) -> Fuse<CurveIteratorIterator<Self>>
where Self: Sized { ... }
fn into_iterator(self) -> CurveIteratorIterator<Self> ⓘ
where Self: Sized { ... }
}
Expand description
Trait representing an Iterator that has almost the guarantees of a curve:
- Windows ordered by start
- Windows non-overlapping or adjacent (this differs from Curves as it allows adjacent windows)
- Windows non-empty
Or in other words all finite prefixes of the Iterator are a valid Curves
Required Associated Types§
Required Methods§
Sourcefn next_window(
&mut self,
) -> Option<Window<<Self::CurveKind as CurveType>::WindowKind>>
fn next_window( &mut self, ) -> Option<Window<<Self::CurveKind as CurveType>::WindowKind>>
calculate and returns the next window of the curve iterator advancing the iterator in the process
Provided Methods§
Sourcefn collect_curve<R: FromCurveIterator<Self::CurveKind>>(self) -> Rwhere
Self: Sized,
fn collect_curve<R: FromCurveIterator<Self::CurveKind>>(self) -> Rwhere
Self: Sized,
collect the iterator mirroring core::iter::Iterator::collect
Sourcefn reclassify<O>(self) -> ReclassifyIterator<Self, O>where
Self: Sized,
fn reclassify<O>(self) -> ReclassifyIterator<Self, O>where
Self: Sized,
reclassify a CurveIterator
Sourcefn normalize(
self,
) -> JoinAdjacentIterator<CurveIteratorIterator<Self>, <Self::CurveKind as CurveType>::WindowKind, Self::CurveKind>where
Self: Sized,
fn normalize(
self,
) -> JoinAdjacentIterator<CurveIteratorIterator<Self>, <Self::CurveKind as CurveType>::WindowKind, Self::CurveKind>where
Self: Sized,
normalize the CurveIterator
by combining adjacent windows
Sourcefn take_while_curve<F>(
self,
fun: F,
) -> TakeWhile<CurveIteratorIterator<Self>, F>
fn take_while_curve<F>( self, fun: F, ) -> TakeWhile<CurveIteratorIterator<Self>, F>
Basically core::iter::Iterator::take_while
but for CurveIterator
Sourcefn fuse_curve(self) -> Fuse<CurveIteratorIterator<Self>>where
Self: Sized,
fn fuse_curve(self) -> Fuse<CurveIteratorIterator<Self>>where
Self: Sized,
Basically core::iter::Iterator::fuse
but for CurveIterator
Sourcefn into_iterator(self) -> CurveIteratorIterator<Self> ⓘwhere
Self: Sized,
fn into_iterator(self) -> CurveIteratorIterator<Self> ⓘwhere
Self: Sized,
Wrap the CurveIterator
to allow usage of standart Iterator adapters