pub trait GetDescriptor: PyPayload {
const __OWN_METHOD_DEFS: &'static [PyMethodDef] = _;
// Required method
fn descr_get(
zelf: PyObjectRef,
obj: Option<PyObjectRef>,
cls: Option<PyObjectRef>,
vm: &VirtualMachine,
) -> PyResult;
// Provided methods
fn get(
zelf: PyObjectRef,
obj: PyObjectRef,
cls: OptionalArg<PyObjectRef>,
vm: &VirtualMachine,
) -> PyResult { ... }
fn _as_pyref<'a>(
zelf: &'a PyObject,
vm: &VirtualMachine,
) -> PyResult<&'a Py<Self>> { ... }
fn _unwrap<'a>(
zelf: &'a PyObject,
obj: Option<PyObjectRef>,
vm: &VirtualMachine,
) -> PyResult<(&'a Py<Self>, PyObjectRef)> { ... }
fn _check<'a>(
zelf: &'a PyObject,
obj: Option<PyObjectRef>,
vm: &VirtualMachine,
) -> Option<(&'a Py<Self>, PyObjectRef)> { ... }
fn _cls_is(cls: &Option<PyObjectRef>, other: &impl Borrow<PyObject>) -> bool { ... }
fn __extend_py_class(ctx: &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: PyObjectRef, obj: Option<PyObjectRef>, cls: Option<PyObjectRef>, vm: &VirtualMachine, ) -> PyResult
Provided Methods§
fn get( zelf: PyObjectRef, obj: PyObjectRef, cls: OptionalArg<PyObjectRef>, vm: &VirtualMachine, ) -> PyResult
fn _as_pyref<'a>( zelf: &'a PyObject, vm: &VirtualMachine, ) -> PyResult<&'a Py<Self>>
fn _unwrap<'a>( zelf: &'a PyObject, obj: Option<PyObjectRef>, vm: &VirtualMachine, ) -> PyResult<(&'a Py<Self>, PyObjectRef)>
fn _check<'a>( zelf: &'a PyObject, obj: Option<PyObjectRef>, vm: &VirtualMachine, ) -> Option<(&'a Py<Self>, PyObjectRef)>
fn _cls_is(cls: &Option<PyObjectRef>, other: &impl Borrow<PyObject>) -> bool
fn __extend_py_class(ctx: &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", so this trait is not object safe.