@@ -17,6 +17,7 @@ pub(crate) struct ConstFnOnceClosure<CapturedData, Function> {
1717 data : CapturedData ,
1818 func : Function ,
1919}
20+
2021impl < CapturedData , Function > ConstFnOnceClosure < CapturedData , Function > {
2122 /// Function for creating a new closure.
2223 ///
@@ -36,6 +37,7 @@ impl<CapturedData, Function> ConstFnOnceClosure<CapturedData, Function> {
3637 Self { data, func }
3738 }
3839}
40+
3941impl < CapturedData , ClosureArguments , Function > const FnOnce < ClosureArguments >
4042 for ConstFnOnceClosure < CapturedData , Function >
4143where
4850 ( self . func ) ( self . data , args)
4951 }
5052}
53+
5154/// Struct representing a closure with mutably borrowed data.
5255///
5356/// Example:
@@ -68,6 +71,7 @@ pub(crate) struct ConstFnMutClosure<'a, CapturedData: ?Sized, Function> {
6871 data : & ' a mut CapturedData ,
6972 func : Function ,
7073}
74+
7175impl < ' a , CapturedData : ?Sized , Function > ConstFnMutClosure < ' a , CapturedData , Function > {
7276 /// Function for creating a new closure.
7377 ///
@@ -85,6 +89,7 @@ impl<'a, CapturedData: ?Sized, Function> ConstFnMutClosure<'a, CapturedData, Fun
8589 Self { data, func }
8690 }
8791}
92+
8893impl < ' a , CapturedData : ?Sized , ClosureArguments , Function , ClosureReturnValue > const
8994 FnOnce < ClosureArguments > for ConstFnMutClosure < ' a , CapturedData , Function >
9095where
97102 self . call_mut ( args)
98103 }
99104}
105+
100106impl < ' a , CapturedData : ?Sized , ClosureArguments , Function , ClosureReturnValue > const
101107 FnMut < ClosureArguments > for ConstFnMutClosure < ' a , CapturedData , Function >
102108where
@@ -126,6 +132,7 @@ pub(crate) struct ConstFnClosure<'a, CapturedData: ?Sized, Function> {
126132 data : & ' a CapturedData ,
127133 func : Function ,
128134}
135+
129136impl < ' a , CapturedData : ?Sized , Function > ConstFnClosure < ' a , CapturedData , Function > {
130137 /// Function for creating a new closure.
131138 ///
@@ -144,6 +151,7 @@ impl<'a, CapturedData: ?Sized, Function> ConstFnClosure<'a, CapturedData, Functi
144151 Self { data, func }
145152 }
146153}
154+
147155impl < ' a , CapturedData : ?Sized , Function , ClosureArguments , ClosureReturnValue > const
148156 FnOnce < ClosureArguments > for ConstFnClosure < ' a , CapturedData , Function >
149157where
@@ -155,6 +163,7 @@ where
155163 self . call_mut ( args)
156164 }
157165}
166+
158167impl < ' a , CapturedData : ?Sized , Function , ClosureArguments , ClosureReturnValue > const
159168 FnMut < ClosureArguments > for ConstFnClosure < ' a , CapturedData , Function >
160169where
@@ -164,6 +173,7 @@ where
164173 self . call ( args)
165174 }
166175}
176+
167177impl <
168178 ' a ,
169179 CapturedData : ?Sized ,
0 commit comments