pub trait Hashable: PyPayload {
    // Required method
    fn hash(zelf: &Py<Self>, vm: &VirtualMachine) -> PyResult<PyHash>;

    // Provided methods
    fn slot_hash(zelf: &PyObject, vm: &VirtualMachine) -> PyResult<PyHash> { ... }
    fn __hash__(zelf: PyObjectRef, vm: &VirtualMachine) -> PyResult<PyHash> { ... }
    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) { ... }
}

Required Methods§

source

fn hash(zelf: &Py<Self>, vm: &VirtualMachine) -> PyResult<PyHash>

Provided Methods§

Implementors§