(
&'static self,
class: &'static Py<PyType>,
ctx: &Context,
)
| 103 | } |
| 104 | |
| 105 | pub fn to_proper_method( |
| 106 | &'static self, |
| 107 | class: &'static Py<PyType>, |
| 108 | ctx: &Context, |
| 109 | ) -> PyObjectRef { |
| 110 | if self.flags.contains(PyMethodFlags::METHOD) { |
| 111 | self.build_method(ctx, class).into() |
| 112 | } else if self.flags.contains(PyMethodFlags::CLASS) { |
| 113 | self.build_classmethod(ctx, class).into() |
| 114 | } else if self.flags.contains(PyMethodFlags::STATIC) { |
| 115 | self.build_staticmethod(ctx, class).into() |
| 116 | } else { |
| 117 | unreachable!() |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | pub const fn to_function(&'static self) -> PyNativeFunction { |
| 122 | PyNativeFunction { |
no test coverage detected