pub struct Module {
pub name: String,
pub language: Language,
pub imports: Vec<Import>,
pub definitions: Vec<Definition>,
pub span: Span,
pub diagnostics: Vec<Diagnostic>,
pub source_path: String,
pub line_table: Vec<usize>,
}Expand description
A normalized, language-independent MIB module.
Lowering transforms AST structures into this simplified representation independent of whether the source was SMIv1 or SMIv2.
Fields§
§name: StringCanonical module name (e.g. "IF-MIB").
language: LanguageDetected SMI language version.
imports: Vec<Import>Flattened imports: one Import per imported symbol.
definitions: Vec<Definition>All definitions in source order.
span: SpanSpan covering the entire module.
diagnostics: Vec<Diagnostic>Diagnostics collected during lowering.
source_path: StringFile path this module was loaded from. Empty for synthetic base modules.
line_table: Vec<usize>Maps line numbers to byte offsets of line starts. Entry i holds the byte offset where line i+1 begins (0-indexed).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Module
impl RefUnwindSafe for Module
impl Send for Module
impl Sync for Module
impl Unpin for Module
impl UnsafeUnpin for Module
impl UnwindSafe for Module
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more