Skip to content

Commit d78aeee

Browse files
committed
pyembed: document PythonModuleLocation
1 parent 0faa95b commit d78aeee

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pyembed/src/python_resources.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,20 @@ use {
1818
/// Named resources in a single Python package.
1919
type PythonPackageResources = HashMap<&'static str, &'static [u8]>;
2020

21+
/// Defines the location of an importable Python module.
2122
#[derive(Debug)]
2223
pub(crate) enum PythonModuleLocation {
24+
/// A builtin extension module.
25+
///
26+
/// The module will need to be imported by `BuiltinImporter`.
2327
Builtin,
28+
29+
/// A frozen bytecode module.
30+
///
31+
/// The module will need to be imported by `FrozenImporter`.
2432
Frozen,
33+
34+
/// Module content provided by a memory address.
2535
InMemory {
2636
source: Option<&'static [u8]>,
2737
bytecode: Option<&'static [u8]>,

0 commit comments

Comments
 (0)