pub trait PyStructSequence: StaticType + PyClassImpl + Sized + 'static {
    const FIELD_NAMES: &'static [&'static str];

    // Required method
    fn into_tuple(self, vm: &VirtualMachine) -> PyTuple;

    // Provided methods
    fn into_struct_sequence(self, vm: &VirtualMachine) -> PyTupleRef { ... }
    fn try_elements_from<const FIELD_LEN: usize>(
        obj: PyObjectRef,
        vm: &VirtualMachine
    ) -> PyResult<[PyObjectRef; FIELD_LEN]> { ... }
    fn repr(zelf: PyRef<PyTuple>, vm: &VirtualMachine) -> PyResult<String> { ... }
    fn reduce(zelf: PyRef<PyTuple>, vm: &VirtualMachine) -> PyTupleRef { ... }
    fn extend_pyclass(ctx: &Context, class: &'static Py<PyType>) { ... }
    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 Associated Constants§

source

const FIELD_NAMES: &'static [&'static str]

Required Methods§

Provided Methods§

Implementors§