(
&self,
name: impl Into<String>,
class: &'static Py<PyType>,
g: G,
s: S,
)
| 705 | } |
| 706 | |
| 707 | pub fn new_static_getset<G, S, T, U>( |
| 708 | &self, |
| 709 | name: impl Into<String>, |
| 710 | class: &'static Py<PyType>, |
| 711 | g: G, |
| 712 | s: S, |
| 713 | ) -> PyRef<PyGetSet> |
| 714 | where |
| 715 | G: IntoPyGetterFunc<T>, |
| 716 | S: IntoPySetterFunc<U>, |
| 717 | { |
| 718 | let name = name.into(); |
| 719 | let getset = PyGetSet::new(name, class).with_get(g).with_set(s); |
| 720 | PyRef::new_ref(getset, self.types.getset_type.to_owned(), None) |
| 721 | } |
| 722 | |
| 723 | /// Creates a new `PyGetSet` with a heap type. |
| 724 | /// |
no test coverage detected