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

Method encode

crates/compiler-core/src/frozen.rs:32–37  ·  view source on GitHub ↗
(code: &CodeObject<C>)

Source from the content-addressed store, hash-verified

30
31impl FrozenCodeObject<Vec<u8>> {
32 pub fn encode<C: Constant>(code: &CodeObject<C>) -> Self {
33 let mut data = Vec::new();
34 marshal::serialize_code(&mut data, code);
35 let bytes = lz4_flex::compress_prepend_size(&data);
36 Self { bytes }
37 }
38}
39
40#[repr(transparent)]

Callers

nothing calls this directly

Calls 4

newFunction · 0.85
serialize_codeFunction · 0.85
write_libFunction · 0.85
into_iterMethod · 0.45

Tested by

no test coverage detected