pub struct FrontendOutput { /* private fields */ }Expand description
The immutable product of a full frontend compilation.
The recovered SourceFile and SemanticModel are always present, the
EmitOutput is present exactly when the request asked for one, and
FrontendOutput::diagnostics is the single canonically ordered union of
every stage’s diagnostics.
Implementations§
Source§impl FrontendOutput
impl FrontendOutput
Sourcepub const fn mode(&self) -> FrontendMode
pub const fn mode(&self) -> FrontendMode
Returns the mode this output was produced for.
Sourcepub const fn source_file(&self) -> &SourceFile
pub const fn source_file(&self) -> &SourceFile
Returns the recovered parser product, always present even on syntax errors.
Sourcepub const fn semantic_model(&self) -> &SemanticModel
pub const fn semantic_model(&self) -> &SemanticModel
Returns the recovered semantic model, always present even on type errors.
Sourcepub const fn emit(&self) -> Option<&EmitOutput>
pub const fn emit(&self) -> Option<&EmitOutput>
Returns the emit product, present exactly when the request asked to emit.
Sourcepub fn diagnostics(&self) -> &[Diagnostic]
pub fn diagnostics(&self) -> &[Diagnostic]
Returns every stage’s diagnostics in canonical order with no duplicates.
Sourcepub fn has_errors(&self) -> bool
pub fn has_errors(&self) -> bool
Returns whether any diagnostic is an error.
Sourcepub fn into_parts(
self,
) -> (SourceFile, SemanticModel, Option<EmitOutput>, Vec<Diagnostic>)
pub fn into_parts( self, ) -> (SourceFile, SemanticModel, Option<EmitOutput>, Vec<Diagnostic>)
Consumes the output into its parts.
Auto Trait Implementations§
impl Freeze for FrontendOutput
impl RefUnwindSafe for FrontendOutput
impl Send for FrontendOutput
impl Sync for FrontendOutput
impl Unpin for FrontendOutput
impl UnsafeUnpin for FrontendOutput
impl UnwindSafe for FrontendOutput
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