Trait rustpython_vm::types::AsNumber
source · 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§
const __OWN_METHOD_DEFS: &'static [PyMethodDef] = _
Required Methods§
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)
Object Safety§
This trait is not object safe.