Method
to_bound_method
(
&'static self,
obj: PyObjectRef,
class: &'static Py<PyType>,
)
Source from the content-addressed store, hash-verified
| 136 | } |
| 137 | |
| 138 | pub const fn to_bound_method( |
| 139 | &'static self, |
| 140 | obj: PyObjectRef, |
| 141 | class: &'static Py<PyType>, |
| 142 | ) -> PyNativeMethod { |
| 143 | PyNativeMethod { |
| 144 | func: PyNativeFunction { |
| 145 | zelf: Some(obj), |
| 146 | value: self, |
| 147 | module: None, |
| 148 | _method_def_owner: None, |
| 149 | }, |
| 150 | class, |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | pub fn build_function(&'static self, ctx: &Context) -> PyRef<PyNativeFunction> { |
| 155 | self.to_function().into_ref(ctx) |
Tested by
no test coverage detected