Struct python_packaging::resource::PythonModuleBytecode [−][src]
pub struct PythonModuleBytecode { pub name: String, pub optimize_level: BytecodeOptimizationLevel, pub is_package: bool, pub cache_tag: String, pub is_stdlib: bool, pub is_test: bool, // some fields omitted }
Expand description
Compiled Python module bytecode.
Fields
name: String
optimize_level: BytecodeOptimizationLevel
is_package: bool
cache_tag: String
Tag to apply to bytecode files.
e.g. cpython-39
.
is_stdlib: bool
Whether this module belongs to the Python standard library.
Modules with this set are distributed as part of Python itself.
is_test: bool
Whether this module is a test module.
Test modules are those defining test code and aren’t critical to run-time functionality of a package.
Implementations
pub fn new(
name: &str,
optimize_level: BytecodeOptimizationLevel,
is_package: bool,
cache_tag: &str,
data: &[u8]
) -> Self
pub fn from_path(
name: &str,
optimize_level: BytecodeOptimizationLevel,
cache_tag: &str,
path: &Path
) -> Self
Resolve the bytecode data for this module.
Sets the bytecode for this module.
Resolve filesystem path to this bytecode.
Trait Implementations
Performs the conversion.
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for PythonModuleBytecode
impl Send for PythonModuleBytecode
impl Sync for PythonModuleBytecode
impl Unpin for PythonModuleBytecode
impl UnwindSafe for PythonModuleBytecode
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self