Trait rta_for_fps_lib::iterators::CurveIterator [−][src]
pub trait CurveIterator: Debug { type CurveKind: CurveType; fn next_window(
&mut self
) -> Option<Window<<Self::CurveKind as CurveType>::WindowKind>>; 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>ⓘNotable traits for CurveIteratorIterator<I>
impl<I> Iterator for CurveIteratorIterator<I> where
I: CurveIterator, type Item = Window<<I::CurveKind as CurveType>::WindowKind>;
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
Associated Types
Required methods
fn 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
fn collect_curve<R: FromCurveIterator<Self::CurveKind>>(self) -> R where
Self: Sized,
fn collect_curve<R: FromCurveIterator<Self::CurveKind>>(self) -> R where
Self: Sized,
collect the iterator mirroring core::iter::Iterator::collect
fn reclassify<O>(self) -> ReclassifyIterator<Self, O> where
Self: Sized,
fn reclassify<O>(self) -> ReclassifyIterator<Self, O> where
Self: Sized,
reclassify a CurveIterator
fn 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
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 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,
Basically core::iter::Iterator::take_while
but for CurveIterator
fn 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
fn into_iterator(self) -> CurveIteratorIterator<Self>ⓘNotable traits for CurveIteratorIterator<I>
impl<I> Iterator for CurveIteratorIterator<I> where
I: CurveIterator, type Item = Window<<I::CurveKind as CurveType>::WindowKind>;
where
Self: Sized,
fn into_iterator(self) -> CurveIteratorIterator<Self>ⓘNotable traits for CurveIteratorIterator<I>
impl<I> Iterator for CurveIteratorIterator<I> where
I: CurveIterator, type Item = Window<<I::CurveKind as CurveType>::WindowKind>;
where
Self: Sized,
Wrap the CurveIterator
to allow usage of standart Iterator adapters
Implementations on Foreign Types
impl<'b, C> CurveIterator for Box<dyn ClonableCurveIterator<'b, CurveKind = C>> where
C: CurveType,
impl<'b, C> CurveIterator for Box<dyn ClonableCurveIterator<'b, CurveKind = C>> where
C: CurveType,
type CurveKind = C
type CurveKind = UnspecifiedCurve<W>
impl<W: WindowType, CI> CurveIterator for Fuse<CI> where
CI: CurveIterator + Iterator<Item = Window<W>>,
CI::CurveKind: CurveType<WindowKind = W>,
impl<W: WindowType, CI> CurveIterator for Fuse<CI> where
CI: CurveIterator + Iterator<Item = Window<W>>,
CI::CurveKind: CurveType<WindowKind = W>,
impl<W, P, CI> CurveIterator for TakeWhile<CI, P> where
W: WindowType,
P: for<'r> FnMut(&'r Window<W>) -> bool,
CI: CurveIterator + Iterator<Item = Window<W>>,
CI::CurveKind: CurveType<WindowKind = W>,
impl<W, P, CI> CurveIterator for TakeWhile<CI, P> where
W: WindowType,
P: for<'r> FnMut(&'r Window<W>) -> bool,
CI: CurveIterator + Iterator<Item = Window<W>>,
CI::CurveKind: CurveType<WindowKind = W>,
Implementors
impl<AC, CDC> CurveIterator for ActualServerExecutionIterator<AC, CDC> where
AC: CurveIterator<CurveKind = UnconstrainedServerExecution>,
CDC: CurveIterator,
CDC::CurveKind: CurveType<WindowKind = Demand>,
impl<C, I> CurveIterator for IterCurveWrapper<I, C> where
Self: Debug,
C: CurveType,
I: Iterator<Item = Window<C::WindowKind>>,
impl<C, I> CurveIterator for JoinAdjacentIterator<I, C::WindowKind, C> where
Self: Debug,
C: CurveType,
I: Iterator<Item = Window<C::WindowKind>>,
impl<I> CurveIterator for ConstrainedServerDemandIterator<I> where
I: CurveIterator<CurveKind = AggregatedServerDemand>,
impl<I, W> CurveIterator for AggregationIterator<I, W> where
I: CurveIterator,
I::CurveKind: CurveType<WindowKind = W>,
W: Debug,
impl<W, I, C> CurveIterator for CapacityCheckIterator<W, I, C> where
I: CurveIterator<CurveKind = C>,
C: CurveType<WindowKind = W> + Debug,
W: WindowType,