pub trait PyStructSequence:
StaticType
+ PyClassImpl
+ Sized
+ 'static {
const FIELD_NAMES: &'static [&'static str];
const __OWN_METHOD_DEFS: &'static [PyMethodDef] = _;
// 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_py_class(ctx: &Context, class: &'static Py<PyType>) { ... }
fn __extend_slots(slots: &mut PyTypeSlots) { ... }
}
Required Associated Constants§
const FIELD_NAMES: &'static [&'static str]
Provided Associated Constants§
const __OWN_METHOD_DEFS: &'static [PyMethodDef] = _
Required Methods§
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_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.