pub trait Comparable: PyPayload {
// Required method
fn cmp(
zelf: &Py<Self>,
other: &PyObject,
op: PyComparisonOp,
vm: &VirtualMachine
) -> PyResult<PyComparisonValue>;
// Provided methods
fn slot_richcompare(
zelf: &PyObject,
other: &PyObject,
op: PyComparisonOp,
vm: &VirtualMachine
) -> PyResult<Either<PyObjectRef, PyComparisonValue>> { ... }
fn eq(
zelf: &Py<Self>,
other: PyObjectRef,
vm: &VirtualMachine
) -> PyResult<PyComparisonValue> { ... }
fn ne(
zelf: &Py<Self>,
other: PyObjectRef,
vm: &VirtualMachine
) -> PyResult<PyComparisonValue> { ... }
fn lt(
zelf: &Py<Self>,
other: PyObjectRef,
vm: &VirtualMachine
) -> PyResult<PyComparisonValue> { ... }
fn le(
zelf: &Py<Self>,
other: PyObjectRef,
vm: &VirtualMachine
) -> PyResult<PyComparisonValue> { ... }
fn ge(
zelf: &Py<Self>,
other: PyObjectRef,
vm: &VirtualMachine
) -> PyResult<PyComparisonValue> { ... }
fn gt(
zelf: &Py<Self>,
other: PyObjectRef,
vm: &VirtualMachine
) -> PyResult<PyComparisonValue> { ... }
fn __extend_method_def(method_defs: &mut Vec<PyMethodDef>) { ... }
fn __extend_py_class(ctx: &Context, class: &'static Py<PyType>) { ... }
fn __extend_slots(slots: &mut PyTypeSlots) { ... }
}