pub trait GetDescriptor: PyPayload {
    // 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_method_def(method_defs: &mut Vec<PyMethodDef>) { ... }
    fn __extend_py_class(ctx: &Context, class: &'static Py<PyType>) { ... }
    fn __extend_slots(slots: &mut PyTypeSlots) { ... }
}

Required Methods§

Provided Methods§

source

fn get( zelf: PyObjectRef, obj: PyObjectRef, cls: OptionalArg<PyObjectRef>, vm: &VirtualMachine ) -> PyResult

source

fn _as_pyref<'a>( zelf: &'a PyObject, vm: &VirtualMachine ) -> PyResult<&'a Py<Self>>

source

fn _unwrap<'a>( zelf: &'a PyObject, obj: Option<PyObjectRef>, vm: &VirtualMachine ) -> PyResult<(&'a Py<Self>, PyObjectRef)>

source

fn _check<'a>( zelf: &'a PyObject, obj: Option<PyObjectRef>, vm: &VirtualMachine ) -> Option<(&'a Py<Self>, PyObjectRef)>

source

fn _cls_is(cls: &Option<PyObjectRef>, other: &impl Borrow<PyObject>) -> bool

source

fn __extend_method_def(method_defs: &mut Vec<PyMethodDef>)

source

fn __extend_py_class(ctx: &Context, class: &'static Py<PyType>)

source

fn __extend_slots(slots: &mut PyTypeSlots)

Implementors§