pub struct Periodic<Q, const PUSH_FIRST: bool> { /* private fields */ }
Expand description
Periodic Operator Builder.
Implementations§
source§impl<Q> Periodic<Q, true>where
Q: Queue,
Q::Item: Clone,
impl<Q> Periodic<Q, true>where Q: Queue, Q::Item: Clone,
sourcepub fn build<I, P>(self, op: P) -> TumblingOperator<Q, Op<P, true>>where
I: Tickable,
P: PeriodicOp<I, Q::Item>,
pub fn build<I, P>(self, op: P) -> TumblingOperator<Q, Op<P, true>>where I: Tickable, P: PeriodicOp<I, Q::Item>,
Build the periodic operator.
source§impl<Q> Periodic<Q, false>where
Q: Queue,
impl<Q> Periodic<Q, false>where Q: Queue,
sourcepub fn build<I, P>(self, op: P) -> TumblingOperator<Q, Op<P, false>>where
I: Tickable,
P: PeriodicOp<I, Q::Item>,
pub fn build<I, P>(self, op: P) -> TumblingOperator<Q, Op<P, false>>where I: Tickable, P: PeriodicOp<I, Q::Item>,
Build periodic operator.
sourcepub fn build_cache(
self
) -> impl for<'out> GatOperator<Q::Item, Output<'out> = TickQueueRef<'out, Q::Item>>where
Q: Queue + 'static,
Q::Item: Tickable + 'static,
pub fn build_cache( self ) -> impl for<'out> GatOperator<Q::Item, Output<'out> = TickQueueRef<'out, Q::Item>>where Q: Queue + 'static, Q::Item: Tickable + 'static,
Build a cache operator.
sourcepub fn build_fn<I, F>(
self,
f: F
) -> TumblingOperator<Q, Op<PeroidicFn<F>, false>>where
I: Tickable,
F: for<'a> FnMut(QueueRef<'a, Q::Item>, bool, I) -> Q::Item,
pub fn build_fn<I, F>( self, f: F ) -> TumblingOperator<Q, Op<PeroidicFn<F>, false>>where I: Tickable, F: for<'a> FnMut(QueueRef<'a, Q::Item>, bool, I) -> Q::Item,
Build the periodic operator using the given closure.
sourcepub fn push_first(self) -> Periodic<Q, true>where
Q::Item: Clone,
pub fn push_first(self) -> Periodic<Q, true>where Q::Item: Clone,
Push before calculation.
source§impl Periodic<(), false>
impl Periodic<(), false>
sourcepub fn with_circular<T>(
length: NonZeroUsize,
period: Period
) -> Periodic<Circular<0, T>, false>
pub fn with_circular<T>( length: NonZeroUsize, period: Period ) -> Periodic<Circular<0, T>, false>
Create a new periodic operator builder using circular queue.
Trait Implementations§
impl<Q: Copy, const PUSH_FIRST: bool> Copy for Periodic<Q, PUSH_FIRST>
Auto Trait Implementations§
impl<Q, const PUSH_FIRST: bool> RefUnwindSafe for Periodic<Q, PUSH_FIRST>where Q: RefUnwindSafe,
impl<Q, const PUSH_FIRST: bool> Send for Periodic<Q, PUSH_FIRST>where Q: Send,
impl<Q, const PUSH_FIRST: bool> Sync for Periodic<Q, PUSH_FIRST>where Q: Sync,
impl<Q, const PUSH_FIRST: bool> Unpin for Periodic<Q, PUSH_FIRST>where Q: Unpin,
impl<Q, const PUSH_FIRST: bool> UnwindSafe for Periodic<Q, PUSH_FIRST>where Q: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more