pub trait Representable: PyPayload {
const __OWN_METHOD_DEFS: &'static [PyMethodDef] = _;
// Required method
fn repr_str(zelf: &Py<Self>, vm: &VirtualMachine) -> PyResult<String>;
// Provided methods
fn slot_repr(zelf: &PyObject, vm: &VirtualMachine) -> PyResult<PyStrRef> { ... }
fn __repr__(zelf: PyObjectRef, vm: &VirtualMachine) -> PyResult<PyStrRef> { ... }
fn repr(zelf: &Py<Self>, vm: &VirtualMachine) -> PyResult<PyStrRef> { ... }
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_repr(zelf: &PyObject, vm: &VirtualMachine) -> PyResult<PyStrRef>
fn __repr__(zelf: PyObjectRef, vm: &VirtualMachine) -> PyResult<PyStrRef>
fn repr(zelf: &Py<Self>, vm: &VirtualMachine) -> PyResult<PyStrRef>
fn __extend_py_class(ctx: &Context, class: &'static Py<PyType>)
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.