MCPcopy Index your code
hub / github.com/RustPython/RustPython / unpack

Function unpack

crates/stdlib/src/pystruct.rs:124–131  ·  view source on GitHub ↗
(
        fmt: IntoStructFormatBytes,
        buffer: ArgBytesLike,
        vm: &VirtualMachine,
    )

Source from the content-addressed store, hash-verified

122
123 #[pyfunction]
124 fn unpack(
125 fmt: IntoStructFormatBytes,
126 buffer: ArgBytesLike,
127 vm: &VirtualMachine,
128 ) -> PyResult<PyTupleRef> {
129 let format_spec = fmt.format_spec(vm)?;
130 buffer.with_ref(|buf| format_spec.unpack(buf, vm))
131 }
132
133 #[derive(FromArgs)]
134 struct UpdateFromArgs {

Callers 15

_parseMethod · 0.90
load_frameMethod · 0.90
load_binintMethod · 0.90
load_binint2Method · 0.90
load_long4Method · 0.90
load_binfloatMethod · 0.90
load_binstringMethod · 0.90
load_binbytesMethod · 0.90
load_binunicodeMethod · 0.90
load_binunicode8Method · 0.90
load_binbytes8Method · 0.90
load_bytearray8Method · 0.90

Calls 3

with_refMethod · 0.80
format_specMethod · 0.45
unpackMethod · 0.45

Tested by 1

test_oneMethod · 0.68