pub trait AsNumber: PyPayload {
    const __OWN_METHOD_DEFS: &'static [PyMethodDef] = _;

    // Required method
    fn as_number() -> &'static PyNumberMethods;

    // Provided methods
    fn clone_exact(_zelf: &Py<Self>, _vm: &VirtualMachine) -> PyRef<Self> { ... }
    fn number_downcast(num: PyNumber<'_>) -> &Py<Self> { ... }
    fn number_downcast_exact(
        num: PyNumber<'_>,
        vm: &VirtualMachine
    ) -> PyRef<Self> { ... }
    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 clone_exact(_zelf: &Py<Self>, _vm: &VirtualMachine) -> PyRef<Self>

source

fn number_downcast(num: PyNumber<'_>) -> &Py<Self>

source

fn number_downcast_exact(num: PyNumber<'_>, vm: &VirtualMachine) -> PyRef<Self>

source

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

source

fn __extend_slots(slots: &mut PyTypeSlots)

Object Safety§

This trait is not object safe.

Implementors§