File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -242,6 +242,48 @@ where
242242 }
243243}
244244
245+ #[ unstable( feature = "exclusive_wrapper" , issue = "98407" ) ]
246+ impl < F , Args > AsyncFnOnce < Args > for SyncView < F >
247+ where
248+ F : AsyncFnOnce < Args > ,
249+ Args : Tuple ,
250+ {
251+ type CallOnceFuture = F :: CallOnceFuture ;
252+
253+ type Output = F :: Output ;
254+
255+ extern "rust-call" fn async_call_once ( self , args : Args ) -> Self :: CallOnceFuture {
256+ self . into_inner ( ) . async_call_once ( args)
257+ }
258+ }
259+
260+ #[ unstable( feature = "exclusive_wrapper" , issue = "98407" ) ]
261+ impl < F , Args > AsyncFnMut < Args > for SyncView < F >
262+ where
263+ F : AsyncFnMut < Args > ,
264+ Args : Tuple ,
265+ {
266+ type CallRefFuture < ' a >
267+ = F :: CallRefFuture < ' a >
268+ where
269+ F : ' a ;
270+
271+ extern "rust-call" fn async_call_mut ( & mut self , args : Args ) -> Self :: CallRefFuture < ' _ > {
272+ self . as_mut ( ) . async_call_mut ( args)
273+ }
274+ }
275+
276+ #[ unstable( feature = "exclusive_wrapper" , issue = "98407" ) ]
277+ impl < F , Args > AsyncFn < Args > for SyncView < F >
278+ where
279+ F : Sync + AsyncFn < Args > ,
280+ Args : Tuple ,
281+ {
282+ extern "rust-call" fn async_call ( & self , args : Args ) -> Self :: CallRefFuture < ' _ > {
283+ self . as_ref ( ) . async_call ( args)
284+ }
285+ }
286+
245287#[ unstable( feature = "exclusive_wrapper" , issue = "98407" ) ]
246288impl < T > Future for SyncView < T >
247289where
You can’t perform that action at this time.
0 commit comments