[][src]Struct sixtyfps_compilerlib::diagnostics::FileDiagnostics

pub struct FileDiagnostics {
    pub inner: Vec<Diagnostic>,
    pub current_path: SourceFile,
    pub source: Option<String>,
    pub line_offsets: OnceCell<Vec<usize>>,
}

This structure holds all the diagnostics for a given files

Fields

inner: Vec<Diagnostic>

List of diagnostics related to this file

current_path: SourceFile

file path

source: Option<String>

Complete source code of the path, used to map from offset to line number

line_offsets: OnceCell<Vec<usize>>

The offset of each linebreak

Implementations

impl FileDiagnostics[src]

pub fn push_diagnostic_with_span(
    &mut self,
    message: String,
    span: Span,
    level: Level
)
[src]

pub fn push_error_with_span(&mut self, message: String, span: Span)[src]

pub fn push_error(&mut self, message: String, source: &dyn Spanned)[src]

pub fn push_compiler_error(&mut self, error: CompilerDiagnostic)[src]

pub fn has_error(&self) -> bool[src]

Return true if there is at least one compilation error for this file

pub fn to_string_vec(&self) -> Vec<String>[src]

pub fn new_from_error(path: PathBuf, err: Error) -> Self[src]

Trait Implementations

impl Debug for FileDiagnostics[src]

impl Default for FileDiagnostics[src]

impl Extend<FileDiagnostics> for BuildDiagnostics[src]

impl IntoIterator for FileDiagnostics[src]

type Item = Diagnostic

The type of the elements being iterated over.

type IntoIter = <Vec<Diagnostic> as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.