Convert a Data struct into a PyStructSequence instance.
(data: Self::Data, vm: &VirtualMachine)
| 194 | |
| 195 | /// Convert a Data struct into a PyStructSequence instance. |
| 196 | fn from_data(data: Self::Data, vm: &VirtualMachine) -> PyTupleRef { |
| 197 | let tuple = |
| 198 | <Self::Data as ::rustpython_vm::types::PyStructSequenceData>::into_tuple(data, vm); |
| 199 | let typ = Self::static_type(); |
| 200 | tuple |
| 201 | .into_ref_with_type(vm, typ.to_owned()) |
| 202 | .expect("Every PyStructSequence must be a valid tuple. This is a RustPython bug.") |
| 203 | } |
| 204 | |
| 205 | #[pyslot] |
| 206 | fn slot_repr(zelf: &PyObject, vm: &VirtualMachine) -> PyResult<PyStrRef> { |
nothing calls this directly
no test coverage detected