pub trait GetDescriptor: PyPayload {
const __OWN_METHOD_DEFS: &'static [PyMethodDef] = _;
// Required method
fn descr_get(
zelf: &PyObject,
obj: Option<&PyObject>,
cls: Option<&PyObject>,
vm: &VirtualMachine,
) -> PyResult;
// Provided methods
fn _as_pyref<'a>(
zelf: &'a PyObject,
vm: &VirtualMachine,
) -> PyResult<&'a Py<Self>> { ... }
fn _unwrap<'a, 'b>(
zelf: &'a PyObject,
obj: Option<&'b PyObject>,
vm: &'b VirtualMachine,
) -> PyResult<(&'a Py<Self>, &'b PyObject)> { ... }
fn _check<'a, 'b>(
zelf: &'a PyObject,
obj: Option<&'b PyObject>,
vm: &VirtualMachine,
) -> Option<(&'a Py<Self>, &'b PyObject)> { ... }
fn _cls_is(cls: &Option<&PyObject>, other: &impl Borrow<PyObject>) -> bool { ... }
fn __extend_py_class(ctx: &'static Context, class: &'static Py<PyType>) { ... }
fn __extend_slots(slots: &mut PyTypeSlots) { ... }
}Provided Associated Constants§
const __OWN_METHOD_DEFS: &'static [PyMethodDef] = _
Required Methods§
fn descr_get( zelf: &PyObject, obj: Option<&PyObject>, cls: Option<&PyObject>, vm: &VirtualMachine, ) -> PyResult
Provided Methods§
fn _as_pyref<'a>( zelf: &'a PyObject, vm: &VirtualMachine, ) -> PyResult<&'a Py<Self>>
fn _unwrap<'a, 'b>( zelf: &'a PyObject, obj: Option<&'b PyObject>, vm: &'b VirtualMachine, ) -> PyResult<(&'a Py<Self>, &'b PyObject)>
fn _check<'a, 'b>( zelf: &'a PyObject, obj: Option<&'b PyObject>, vm: &VirtualMachine, ) -> Option<(&'a Py<Self>, &'b PyObject)>
fn _cls_is(cls: &Option<&PyObject>, other: &impl Borrow<PyObject>) -> bool
fn __extend_py_class(ctx: &'static Context, class: &'static Py<PyType>)
fn __extend_slots(slots: &mut PyTypeSlots)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".