File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,6 +46,10 @@ unsafe impl Send for LightUserData {}
4646#[ cfg( feature = "send" ) ]
4747unsafe impl Sync for LightUserData { }
4848
49+ #[ cfg( feature = "send" ) ]
50+ pub ( crate ) type Callback = Box < dyn Fn ( & RawLua , c_int ) -> Result < c_int > + Send + ' static > ;
51+
52+ #[ cfg( not( feature = "send" ) ) ]
4953pub ( crate ) type Callback = Box < dyn Fn ( & RawLua , c_int ) -> Result < c_int > + ' static > ;
5054
5155pub ( crate ) struct Upvalue < T > {
@@ -55,7 +59,11 @@ pub(crate) struct Upvalue<T> {
5559
5660pub ( crate ) type CallbackUpvalue = Upvalue < Callback > ;
5761
58- #[ cfg( feature = "async" ) ]
62+ #[ cfg( all( feature = "async" , feature = "send" ) ) ]
63+ pub ( crate ) type AsyncCallback =
64+ Box < dyn for < ' a > Fn ( & ' a RawLua , c_int ) -> BoxFuture < ' a , Result < c_int > > + Send + ' static > ;
65+
66+ #[ cfg( all( feature = "async" , not( feature = "send" ) ) ) ]
5967pub ( crate ) type AsyncCallback =
6068 Box < dyn for < ' a > Fn ( & ' a RawLua , c_int ) -> BoxFuture < ' a , Result < c_int > > + ' static > ;
6169
You can’t perform that action at this time.
0 commit comments