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

Method pack

crates/vm/src/buffer.rs:421–428  ·  view source on GitHub ↗
(&self, args: Vec<PyObjectRef>, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

419 }
420
421 pub fn pack(&self, args: Vec<PyObjectRef>, vm: &VirtualMachine) -> PyResult<Vec<u8>> {
422 // Create data vector:
423 let mut data = vec![0; self.size];
424
425 self.pack_into(&mut data, args, vm)?;
426
427 Ok(data)
428 }
429
430 pub fn pack_into(
431 &self,

Callers 1

pack_singleMethod · 0.45

Calls 5

into_floatMethod · 0.80
into_boolMethod · 0.80
ErrClass · 0.50
pack_intoMethod · 0.45
is_infiniteMethod · 0.45

Tested by

no test coverage detected