(
fmt: IntoStructFormatBytes,
args: UpdateFromArgs,
vm: &VirtualMachine,
)
| 139 | |
| 140 | #[pyfunction] |
| 141 | fn unpack_from( |
| 142 | fmt: IntoStructFormatBytes, |
| 143 | args: UpdateFromArgs, |
| 144 | vm: &VirtualMachine, |
| 145 | ) -> PyResult<PyTupleRef> { |
| 146 | let format_spec = fmt.format_spec(vm)?; |
| 147 | let offset = |
| 148 | get_buffer_offset(args.buffer.len(), args.offset, format_spec.size, false, vm)?; |
| 149 | args.buffer |
| 150 | .with_ref(|buf| format_spec.unpack(&buf[offset..][..format_spec.size], vm)) |
| 151 | } |
| 152 | |
| 153 | #[pyattr] |
| 154 | #[pyclass(name = "unpack_iterator", traverse)] |
nothing calls this directly
no test coverage detected