pub struct Import<L: SourceLanguage> {
pub admission: ModelAdmission,
pub errors: Vec<SourceError<L>>,
pub warnings: Vec<L::Warning>,
}Expand description
Collect the import of a source file: the model’s admission, every error and every warning of the language.
Fields§
§admission: ModelAdmission§errors: Vec<SourceError<L>>§warnings: Vec<L::Warning>Implementations§
Source§impl<L: SourceLanguage> Import<L>
impl<L: SourceLanguage> Import<L>
Sourcepub fn diagnostics(&self) -> Vec<&dyn Diagnostic>
pub fn diagnostics(&self) -> Vec<&dyn Diagnostic>
List every diagnostic in source order: errors, warnings and model problems alike, unlabelled ones last.
Sourcepub fn admitted_model(&self) -> Option<&Model>
pub fn admitted_model(&self) -> Option<&Model>
Return the admitted model only when no diagnostic is an error, so a diagram the author has yet to fix is never drawn.
Sourcepub fn into_admitted_parts(self) -> ImportParts<L>
pub fn into_admitted_parts(self) -> ImportParts<L>
Split the import into its parts, its model withheld as admitted_model withholds it.
Trait Implementations§
Auto Trait Implementations§
impl<L> Forget for Import<L>
impl<L> Freeze for Import<L>
impl<L> Move for Import<L>
impl<L> RefUnwindSafe for Import<L>
impl<L> Send for Import<L>
impl<L> Sync for Import<L>
impl<L> Unpin for Import<L>
impl<L> UnsafeUnpin for Import<L>
impl<L> UnwindSafe for Import<L>
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, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
Source§fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
Invokes
WrappingSpan::make_wrapped to wrap an AST node in a span.