Struct python_packaging::resource::PythonExtensionModule[][src]

pub struct PythonExtensionModule {
    pub name: String,
    pub init_fn: Option<String>,
    pub extension_file_suffix: String,
    pub shared_library: Option<FileData>,
    pub object_file_data: Vec<FileData>,
    pub is_package: bool,
    pub link_libraries: Vec<LibraryDependency>,
    pub is_stdlib: bool,
    pub builtin_default: bool,
    pub required: bool,
    pub variant: Option<String>,
    pub license: Option<LicensedComponent>,
}
Expand description

Represents a Python extension module.

Fields

name: String

The module name this extension module is providing.

init_fn: Option<String>

Name of the C function initializing this extension module.

extension_file_suffix: String

Filename suffix to use when writing extension module data.

shared_library: Option<FileData>

File data for linked extension module.

object_file_data: Vec<FileData>

File data for object files linked together to produce this extension module.

is_package: bool

Whether this extension module is a package.

link_libraries: Vec<LibraryDependency>

Libraries that this extension depends on.

is_stdlib: bool

Whether this extension module is part of the Python standard library.

This is true if the extension is distributed with Python itself.

builtin_default: bool

Whether the extension module is built-in by default.

Some extension modules in Python distributions are always compiled into libpython. This field will be true for those extension modules.

required: bool

Whether the extension must be loaded to initialize Python.

variant: Option<String>

Name of the variant of this extension module.

This may be set if there are multiple versions of an extension module available to choose from.

license: Option<LicensedComponent>

Licenses that apply to this extension.

Implementations

The file name (without parent components) this extension module should be realized with.

Resolve the filesystem path for this extension module.

Returns the part strings constituting the package name.

Whether the extension module requires additional libraries.

Whether the extension module is minimally required for a Python interpreter.

This will be true only for extension modules in the standard library that are builtins part of libpython or are required as part of Python interpreter initialization.

Whether this extension module is already in libpython.

This is true if this is a stdlib extension module and is a core module or no shared library extension module is available.

Obtain the top-level package name this module belongs to.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Creates a value from an iterator. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.