3
3
4
4
use crate :: Container ;
5
5
use crate :: dataflow:: channels:: pact:: Pipeline ;
6
- use crate :: dataflow:: { OwnedStream , StreamLike , Scope } ;
6
+ use crate :: dataflow:: { StreamCore , Scope } ;
7
7
8
8
/// Merge the contents of two streams.
9
- pub trait Concat < G : Scope , C : Container , S : StreamLike < G , C > > {
9
+ pub trait Concat < G : Scope , C : Container > {
10
10
/// Merge the contents of two streams.
11
11
///
12
12
/// # Examples
@@ -16,21 +16,21 @@ pub trait Concat<G: Scope, C: Container, S: StreamLike<G, C>> {
16
16
/// timely::example(|scope| {
17
17
///
18
18
/// let stream = (0..10).to_stream(scope).tee();
19
- /// stream.concat(& stream)
19
+ /// stream.owned(). concat(stream.owned() )
20
20
/// .inspect(|x| println!("seen: {:?}", x));
21
21
/// });
22
22
/// ```
23
- fn concat ( self , other : S ) -> OwnedStream < G , C > ;
23
+ fn concat ( self , other : StreamCore < G , C > ) -> StreamCore < G , C > ;
24
24
}
25
25
26
- impl < G : Scope , C : Container + ' static , S : StreamLike < G , C > > Concat < G , C , S > for S {
27
- fn concat ( self , other : S ) -> OwnedStream < G , C > {
26
+ impl < G : Scope , C : Container + ' static > Concat < G , C > for StreamCore < G , C > {
27
+ fn concat ( self , other : StreamCore < G , C > ) -> StreamCore < G , C > {
28
28
self . scope ( ) . concatenate ( [ self , other] )
29
29
}
30
30
}
31
31
32
32
/// Merge the contents of multiple streams.
33
- pub trait Concatenate < G : Scope , C : Container , S : StreamLike < G , C > > {
33
+ pub trait Concatenate < G : Scope , C : Container > {
34
34
/// Merge the contents of multiple streams.
35
35
///
36
36
/// # Examples
@@ -43,28 +43,29 @@ pub trait Concatenate<G: Scope, C: Container, S: StreamLike<G, C>> {
43
43
/// (0..10).to_stream(scope),
44
44
/// (0..10).to_stream(scope)];
45
45
///
46
- /// scope.concatenate(streams)
46
+ /// scope.clone()
47
+ /// .concatenate(streams)
47
48
/// .inspect(|x| println!("seen: {:?}", x));
48
49
/// });
49
50
/// ```
50
- fn concatenate < I > ( self , sources : I ) -> OwnedStream < G , C >
51
+ fn concatenate < I > ( self , sources : I ) -> StreamCore < G , C >
51
52
where
52
- I : IntoIterator < Item =S > ;
53
+ I : IntoIterator < Item =StreamCore < G , C > > ;
53
54
}
54
55
55
- impl < G : Scope , C : Container + ' static > Concatenate < G , C , OwnedStream < G , C > > for OwnedStream < G , C > {
56
- fn concatenate < I > ( self , sources : I ) -> OwnedStream < G , C >
56
+ impl < G : Scope , C : Container + ' static > Concatenate < G , C > for StreamCore < G , C > {
57
+ fn concatenate < I > ( self , sources : I ) -> StreamCore < G , C >
57
58
where
58
- I : IntoIterator < Item =OwnedStream < G , C > >
59
+ I : IntoIterator < Item =StreamCore < G , C > >
59
60
{
60
61
self . scope ( ) . concatenate ( Some ( self ) . into_iter ( ) . chain ( sources) )
61
62
}
62
63
}
63
64
64
- impl < G : Scope , C : Container + ' static , S : StreamLike < G , C > > Concatenate < G , C , S > for & G {
65
- fn concatenate < I > ( self , sources : I ) -> OwnedStream < G , C >
65
+ impl < G : Scope , C : Container + ' static > Concatenate < G , C > for G {
66
+ fn concatenate < I > ( self , sources : I ) -> StreamCore < G , C >
66
67
where
67
- I : IntoIterator < Item =S >
68
+ I : IntoIterator < Item =StreamCore < G , C > >
68
69
{
69
70
70
71
// create an operator builder.
0 commit comments