1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
pub mod tumbling;
pub mod facet;
pub mod map;
#[cfg(feature = "array-vec")]
pub mod array;
pub mod tuple;
use crate::operator::then::Then;
use crate::{Operator, OperatorExt, Tickable};
#[cfg(feature = "array-vec")]
pub use array::{array_t, Array};
#[cfg(feature = "std")]
pub use facet::{facet_map_t, FacetMap};
pub use facet::{facet_t, Facet};
pub use map::{map_t, Map};
pub use tumbling::{
cached, queue::QueueCapAtLeast, Cached, CachedOperation, TumblingOperation, TumblingOperator,
TumblingQueue,
};
#[cfg(feature = "std")]
pub use tumbling::{shared, SharedMap};
pub use tuple::{tuple_t, Tuple};
pub trait TickedOperatorExt<I: Tickable>: Operator<I>
where
<Self as Operator<I>>::Output: Tickable,
{
fn facet_t<P2: Operator<I>>(self, other: P2) -> Facet<I, Self, P2>
where
Self: Sized,
<P2 as Operator<I>>::Output: Tickable,
{
facet_t(self, other)
}
fn map_t<O, F>(self, f: F) -> Then<I, Self, Map<F>>
where
Self: Sized,
F: FnMut(<Self::Output as Tickable>::Value) -> O,
{
self.then(map_t(f))
}
}
impl<P, I: Tickable> TickedOperatorExt<I> for P
where
P: Operator<I>,
<P as Operator<I>>::Output: Tickable,
{
}