pub struct ModuleEntry {
pub id: ModuleId,
pub version: String,
pub exports: Vec<ModuleExport>,
pub dependencies: Vec<ModuleId>,
pub description: String,
pub is_builtin: bool,
}Expand description
A module entry — metadata for a module in the catalog (T63).
Fields§
§id: ModuleIdThe module’s IRI — its unique identifier.
version: StringThe module’s version (semver-ish, e.g. “0.1.0”).
exports: Vec<ModuleExport>What the module exports.
dependencies: Vec<ModuleId>What the module depends on (other module IRIs).
description: StringOptional description.
is_builtin: boolWhether this is a built-in module (shipped with the host).
Implementations§
Source§impl ModuleEntry
impl ModuleEntry
Sourcepub fn with_export(self, export: ModuleExport) -> Self
pub fn with_export(self, export: ModuleExport) -> Self
Add an export.
Sourcepub fn with_dependency(self, dep: &str) -> Self
pub fn with_dependency(self, dep: &str) -> Self
Add a dependency.
Sourcepub fn with_description(self, desc: &str) -> Self
pub fn with_description(self, desc: &str) -> Self
Add a description.
Sourcepub fn exports_name(&self, name: &str) -> bool
pub fn exports_name(&self, name: &str) -> bool
Check if this module exports a given name.
Sourcepub fn functions(&self) -> Vec<&ModuleExport>
pub fn functions(&self) -> Vec<&ModuleExport>
Get all function exports.
Sourcepub fn capabilities(&self) -> Vec<&ModuleExport>
pub fn capabilities(&self) -> Vec<&ModuleExport>
Get all capability exports.
Trait Implementations§
Source§impl Clone for ModuleEntry
impl Clone for ModuleEntry
Source§impl Debug for ModuleEntry
impl Debug for ModuleEntry
Source§impl PartialEq for ModuleEntry
impl PartialEq for ModuleEntry
impl StructuralPartialEq for ModuleEntry
Auto Trait Implementations§
impl Freeze for ModuleEntry
impl RefUnwindSafe for ModuleEntry
impl Send for ModuleEntry
impl Sync for ModuleEntry
impl Unpin for ModuleEntry
impl UnsafeUnpin for ModuleEntry
impl UnwindSafe for ModuleEntry
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