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§
§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: String§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: StringImplementations§
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.
Trait Implementations§
Source§impl Clone for PkgContext
impl Clone for PkgContext
Source§impl Debug for PkgContext
impl Debug for PkgContext
Source§impl Default for PkgContext
impl Default for PkgContext
impl Eq for PkgContext
Source§impl PartialEq for PkgContext
impl PartialEq for PkgContext
impl StructuralPartialEq for PkgContext
Auto Trait Implementations§
impl Forget for PkgContext
impl Freeze for PkgContext
impl Move for PkgContext
impl RefUnwindSafe for PkgContext
impl Send for PkgContext
impl Sync for PkgContext
impl Unpin for PkgContext
impl UnsafeUnpin for PkgContext
impl UnwindSafe for PkgContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more