@@ -10,7 +10,7 @@ use crate::progress::frontier::Antichain;
1010use crate :: progress:: { Timestamp , PathSummary } ;
1111
1212/// Creates a `Stream` and a `Handle` to later bind the source of that `Stream`.
13- pub trait Feedback < T : Timestamp > {
13+ pub trait Feedback < ' scope , T : Timestamp > {
1414
1515 /// Creates a [Stream] and a [Handle] to later bind the source of that `Stream`.
1616 ///
@@ -35,11 +35,11 @@ pub trait Feedback<T: Timestamp> {
3535 /// .connect_loop(handle);
3636 /// });
3737 /// ```
38- fn feedback < C : Container > ( & mut self , summary : <T as Timestamp >:: Summary ) -> ( Handle < T , C > , Stream < T , C > ) ;
38+ fn feedback < C : Container > ( & mut self , summary : <T as Timestamp >:: Summary ) -> ( Handle < ' scope , T , C > , Stream < ' scope , T , C > ) ;
3939}
4040
4141/// Creates a `Stream` and a `Handle` to later bind the source of that `Stream`.
42- pub trait LoopVariable < TOuter : Timestamp , TInner : Timestamp > {
42+ pub trait LoopVariable < ' scope , TOuter : Timestamp , TInner : Timestamp > {
4343 /// Creates a `Stream` and a `Handle` to later bind the source of that `Stream`.
4444 ///
4545 /// The resulting `Stream` will have its data defined by a future call to `connect_loop` with
@@ -65,12 +65,12 @@ pub trait LoopVariable<TOuter: Timestamp, TInner: Timestamp> {
6565 /// });
6666 /// });
6767 /// ```
68- fn loop_variable < C : Container > ( & mut self , summary : TInner :: Summary ) -> ( Handle < Product < TOuter , TInner > , C > , Stream < Product < TOuter , TInner > , C > ) ;
68+ fn loop_variable < C : Container > ( & mut self , summary : TInner :: Summary ) -> ( Handle < ' scope , Product < TOuter , TInner > , C > , Stream < ' scope , Product < TOuter , TInner > , C > ) ;
6969}
7070
71- impl < T : Timestamp > Feedback < T > for Scope < T > {
71+ impl < ' scope , T : Timestamp > Feedback < ' scope , T > for Scope < ' scope , T > {
7272
73- fn feedback < C : Container > ( & mut self , summary : <T as Timestamp >:: Summary ) -> ( Handle < T , C > , Stream < T , C > ) {
73+ fn feedback < C : Container > ( & mut self , summary : <T as Timestamp >:: Summary ) -> ( Handle < ' scope , T , C > , Stream < ' scope , T , C > ) {
7474
7575 let mut builder = OperatorBuilder :: new ( "Feedback" . to_owned ( ) , self . clone ( ) ) ;
7676 let ( output, stream) = builder. new_output ( ) ;
@@ -79,14 +79,14 @@ impl<T: Timestamp> Feedback<T> for Scope<T> {
7979 }
8080}
8181
82- impl < TOuter : Timestamp , TInner : Timestamp > LoopVariable < TOuter , TInner > for Iterative < TOuter , TInner > {
83- fn loop_variable < C : Container > ( & mut self , summary : TInner :: Summary ) -> ( Handle < Product < TOuter , TInner > , C > , Stream < Product < TOuter , TInner > , C > ) {
82+ impl < ' scope , TOuter : Timestamp , TInner : Timestamp > LoopVariable < ' scope , TOuter , TInner > for Iterative < ' scope , TOuter , TInner > {
83+ fn loop_variable < C : Container > ( & mut self , summary : TInner :: Summary ) -> ( Handle < ' scope , Product < TOuter , TInner > , C > , Stream < ' scope , Product < TOuter , TInner > , C > ) {
8484 self . feedback ( Product :: new ( Default :: default ( ) , summary) )
8585 }
8686}
8787
8888/// Connect a `Stream` to the input of a loop variable.
89- pub trait ConnectLoop < T : Timestamp , C : Container > {
89+ pub trait ConnectLoop < ' scope , T : Timestamp , C : Container > {
9090 /// Connect a `Stream` to be the input of a loop variable.
9191 ///
9292 /// # Examples
@@ -106,11 +106,11 @@ pub trait ConnectLoop<T: Timestamp, C: Container> {
106106 /// .connect_loop(handle);
107107 /// });
108108 /// ```
109- fn connect_loop ( self , handle : Handle < T , C > ) ;
109+ fn connect_loop ( self , handle : Handle < ' scope , T , C > ) ;
110110}
111111
112- impl < T : Timestamp , C : Container > ConnectLoop < T , C > for Stream < T , C > {
113- fn connect_loop ( self , handle : Handle < T , C > ) {
112+ impl < ' scope , T : Timestamp , C : Container > ConnectLoop < ' scope , T , C > for Stream < ' scope , T , C > {
113+ fn connect_loop ( self , handle : Handle < ' scope , T , C > ) {
114114
115115 let mut builder = handle. builder ;
116116 let summary = handle. summary ;
@@ -133,8 +133,8 @@ impl<T: Timestamp, C: Container> ConnectLoop<T, C> for Stream<T, C> {
133133
134134/// A handle used to bind the source of a loop variable.
135135#[ derive( Debug ) ]
136- pub struct Handle < T : Timestamp , C : Container > {
137- builder : OperatorBuilder < T > ,
136+ pub struct Handle < ' scope , T : Timestamp , C : Container > {
137+ builder : OperatorBuilder < ' scope , T > ,
138138 summary : <T as Timestamp >:: Summary ,
139139 output : crate :: dataflow:: channels:: pushers:: Output < T , C > ,
140140}
0 commit comments