pub struct ModuleMetadata { /* private fields */ }Expand description
Module-level metadata collected without parsing or executing a module.
Implementations§
Source§impl ModuleMetadata
impl ModuleMetadata
Sourcepub const fn new(kind: ModuleKind) -> Self
pub const fn new(kind: ModuleKind) -> Self
Creates empty module metadata for a kind.
Sourcepub fn with_name(self, name: ModuleName) -> Self
pub fn with_name(self, name: ModuleName) -> Self
Sets the module name.
Sourcepub fn with_import(self, import: ModuleImport) -> Self
pub fn with_import(self, import: ModuleImport) -> Self
Adds an import.
Sourcepub fn with_export(self, export: ModuleExport) -> Self
pub fn with_export(self, export: ModuleExport) -> Self
Adds an export.
Sourcepub const fn with_validation_status(self, status: ValidationStatus) -> Self
pub const fn with_validation_status(self, status: ValidationStatus) -> Self
Sets the validation status.
Sourcepub const fn kind(&self) -> ModuleKind
pub const fn kind(&self) -> ModuleKind
Returns the module kind.
Sourcepub fn imports(&self) -> &[ModuleImport]
pub fn imports(&self) -> &[ModuleImport]
Returns module imports.
Sourcepub fn exports(&self) -> &[ModuleExport]
pub fn exports(&self) -> &[ModuleExport]
Returns module exports.
Sourcepub const fn validation_status(&self) -> ValidationStatus
pub const fn validation_status(&self) -> ValidationStatus
Returns validation status metadata.
Trait Implementations§
Source§impl Clone for ModuleMetadata
impl Clone for ModuleMetadata
Source§fn clone(&self) -> ModuleMetadata
fn clone(&self) -> ModuleMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModuleMetadata
impl Debug for ModuleMetadata
Source§impl Default for ModuleMetadata
impl Default for ModuleMetadata
Source§fn default() -> ModuleMetadata
fn default() -> ModuleMetadata
Returns the “default value” for a type. Read more
Source§impl PartialEq for ModuleMetadata
impl PartialEq for ModuleMetadata
Source§fn eq(&self, other: &ModuleMetadata) -> bool
fn eq(&self, other: &ModuleMetadata) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ModuleMetadata
impl StructuralPartialEq for ModuleMetadata
Auto Trait Implementations§
impl Freeze for ModuleMetadata
impl RefUnwindSafe for ModuleMetadata
impl Send for ModuleMetadata
impl Sync for ModuleMetadata
impl Unpin for ModuleMetadata
impl UnsafeUnpin for ModuleMetadata
impl UnwindSafe for ModuleMetadata
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