#[non_exhaustive]pub struct PkgContext {
pub name: String,
pub package_name: String,
pub bundle_name: String,
pub module_name: String,
pub version: String,
pub entry_path: String,
pub is_so: bool,
pub dependency_alias: String,
}Expand description
One package. Strings the file leaves empty stay empty here: the file
itself writes "" for “none”.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringThe key of the entry: the name code refers to the package by.
package_name: StringpackageName; equal to PkgContext::name in every file seen.
bundle_name: StringOwning bundle; empty for packages compiled into this module.
module_name: StringmoduleName: the module that owns the package.
version: StringEmpty for the module itself and for native libraries.
entry_path: StringThe package’s entry file relative to its root (Index.ets), or
for the module’s own package its source root (src/main/).
is_so: boolA native library (libfoo.so) rather than compiled code.
dependency_alias: StringdependencyAlias: the alias the package is declared under as a dependency; empty when none.
Implementations§
Source§impl PkgContext
impl PkgContext
Sourcepub fn entry_record_name(&self) -> Option<String>
pub fn entry_record_name(&self) -> Option<String>
The record a bare import of this package resolves to:
&<name>/<entryPath without extension>&<version>. None for
native libraries and packages without an entry file.
The record may be absent from the .abc when nothing imports the
package’s entry.