[][src]Trait rustpython_vm::slots::SlotDescriptor

pub trait SlotDescriptor: PyValue {
    fn descr_get(
        vm: &VirtualMachine,
        zelf: PyObjectRef,
        obj: Option<PyObjectRef>,
        cls: OptionalArg<PyObjectRef>
    ) -> PyResult; fn get(
        zelf: PyObjectRef,
        obj: PyObjectRef,
        cls: OptionalArg<PyObjectRef>,
        vm: &VirtualMachine
    ) -> PyResult { ... }
fn _zelf(zelf: PyObjectRef, vm: &VirtualMachine) -> PyResult<PyRef<Self>> { ... }
fn _unwrap(
        zelf: PyObjectRef,
        obj: Option<PyObjectRef>,
        vm: &VirtualMachine
    ) -> PyResult<(PyRef<Self>, PyObjectRef)> { ... }
fn _check(
        zelf: PyObjectRef,
        obj: Option<PyObjectRef>,
        vm: &VirtualMachine
    ) -> Result<(PyRef<Self>, PyObjectRef), PyResult> { ... }
fn _cls_is<T>(cls: &OptionalArg<PyObjectRef>, other: &T) -> bool
    where
        T: IdProtocol
, { ... }
fn __extend_py_class(ctx: &PyContext, class: &PyClassRef) { ... } }

Required methods

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

Loading content...

Provided methods

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

fn _zelf(zelf: PyObjectRef, vm: &VirtualMachine) -> PyResult<PyRef<Self>>

fn _unwrap(
    zelf: PyObjectRef,
    obj: Option<PyObjectRef>,
    vm: &VirtualMachine
) -> PyResult<(PyRef<Self>, PyObjectRef)>

fn _check(
    zelf: PyObjectRef,
    obj: Option<PyObjectRef>,
    vm: &VirtualMachine
) -> Result<(PyRef<Self>, PyObjectRef), PyResult>

fn _cls_is<T>(cls: &OptionalArg<PyObjectRef>, other: &T) -> bool where
    T: IdProtocol

fn __extend_py_class(ctx: &PyContext, class: &PyClassRef)

Loading content...

Implementors

impl SlotDescriptor for PyBuiltinMethod[src]

impl SlotDescriptor for PyClassMethod[src]

impl SlotDescriptor for PyFunction[src]

impl SlotDescriptor for PyGetSet[src]

impl SlotDescriptor for PyProperty[src]

impl SlotDescriptor for PyStaticMethod[src]

Loading content...