Trait GetDescriptor

Source
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§

Source

const __OWN_METHOD_DEFS: &'static [PyMethodDef] = _

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_py_class(ctx: &Context, class: &'static Py<PyType>)

Source

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.

Implementors§

Morty Proxy This is a proxified and sanitized view of the page, visit original site.