Trait python_packaging::bytecode::PythonBytecodeCompiler[][src]

pub trait PythonBytecodeCompiler {
    fn get_magic_number(&self) -> u32;
fn compile(
        &mut self,
        source: &[u8],
        filename: &str,
        optimize: BytecodeOptimizationLevel,
        output_mode: CompileMode
    ) -> Result<Vec<u8>>; }
Expand description

An entity that can compile Python bytecode.

Required methods

Obtain the magic number to use in the bytecode header.

Compile Python source into bytecode with an optimization level.

Implementors