@@ -44,6 +44,22 @@ pub mod awaitable {
4444 _ => Ok ( py. None ( ) ) ,
4545 }
4646 }
47+
48+ fn send ( & mut self , value : Bound < ' _ , PyAny > ) -> PyResult < Py < PyAny > > {
49+ self . __next__ ( value. py ( ) )
50+ }
51+
52+ #[ pyo3( signature = ( value, _a = None , _b = None ) ) ]
53+ fn throw (
54+ & mut self ,
55+ value : Bound < ' _ , PyAny > ,
56+ _a : Option < Bound < ' _ , PyAny > > ,
57+ _b : Option < Bound < ' _ , PyAny > > ,
58+ ) -> PyResult < Py < PyAny > > {
59+ self . __next__ ( value. py ( ) )
60+ }
61+
62+ fn close ( & self ) { }
4763 }
4864
4965 #[ pyclass]
@@ -80,5 +96,24 @@ pub mod awaitable {
8096 _ => Ok ( pyself) ,
8197 }
8298 }
99+
100+ fn send < ' py > (
101+ pyself : PyRefMut < ' py , Self > ,
102+ _value : Bound < ' py , PyAny > ,
103+ ) -> PyResult < PyRefMut < ' py , Self > > {
104+ Self :: __next__ ( pyself)
105+ }
106+
107+ #[ pyo3( signature = ( _value, _a = None , _b = None ) ) ]
108+ fn throw < ' py > (
109+ pyself : PyRefMut < ' py , Self > ,
110+ _value : Bound < ' py , PyAny > ,
111+ _a : Option < Bound < ' py , PyAny > > ,
112+ _b : Option < Bound < ' py , PyAny > > ,
113+ ) -> PyResult < PyRefMut < ' py , Self > > {
114+ Self :: __next__ ( pyself)
115+ }
116+
117+ fn close ( & self ) { }
83118 }
84119}
0 commit comments