Trait rustpython_vm::types::GetAttr
source · pub trait GetAttr: PyPayload {
const __OWN_METHOD_DEFS: &'static [PyMethodDef] = _;
// Required method
fn getattro(
zelf: &Py<Self>,
name: &Py<PyStr>,
vm: &VirtualMachine
) -> PyResult;
// Provided methods
fn slot_getattro(
obj: &PyObject,
name: &Py<PyStr>,
vm: &VirtualMachine
) -> PyResult { ... }
fn getattribute(
zelf: PyRef<Self>,
name: PyStrRef,
vm: &VirtualMachine
) -> PyResult { ... }
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§
Provided Methods§
fn slot_getattro( obj: &PyObject, name: &Py<PyStr>, vm: &VirtualMachine ) -> PyResult
fn getattribute( zelf: PyRef<Self>, name: PyStrRef, vm: &VirtualMachine ) -> PyResult
fn __extend_py_class(ctx: &Context, class: &'static Py<PyType>)
fn __extend_slots(slots: &mut PyTypeSlots)
Object Safety§
This trait is not object safe.