pub struct BuildDiagnostics {
pub all_loaded_files: Vec<PathBuf>,
/* private fields */
}
Fields§
§all_loaded_files: Vec<PathBuf>
This is the list of all loaded files (with or without diagnostic) does not include the main file. FIXME: this doesn’t really belong in the diagnostics, it should be somehow returned in another way (maybe in a compilation state that include the diagnostics?)
Implementations§
Source§impl BuildDiagnostics
impl BuildDiagnostics
pub fn push_diagnostic_with_span( &mut self, message: String, span: SourceLocation, level: DiagnosticLevel, )
pub fn push_error_with_span(&mut self, message: String, span: SourceLocation)
pub fn push_error(&mut self, message: String, source: &dyn Spanned)
pub fn push_warning_with_span(&mut self, message: String, span: SourceLocation)
pub fn push_warning(&mut self, message: String, source: &dyn Spanned)
pub fn push_compiler_error(&mut self, error: Diagnostic)
pub fn push_property_deprecation_warning( &mut self, old_property: &str, new_property: &str, source: &dyn Spanned, )
Sourcepub fn has_error(&self) -> bool
pub fn has_error(&self) -> bool
Return true if there is at least one compilation error for this file
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Return true if there are no diagnostics (warnings or errors); false otherwise.
pub fn to_string_vec(&self) -> Vec<String>
pub fn push_diagnostic( &mut self, message: String, source: &dyn Spanned, level: DiagnosticLevel, )
pub fn push_internal_error(&mut self, err: Diagnostic)
pub fn iter(&self) -> impl Iterator<Item = &Diagnostic>
Trait Implementations§
Source§impl Default for BuildDiagnostics
impl Default for BuildDiagnostics
Source§fn default() -> BuildDiagnostics
fn default() -> BuildDiagnostics
Returns the “default value” for a type. Read more
Source§impl IntoIterator for BuildDiagnostics
impl IntoIterator for BuildDiagnostics
Auto Trait Implementations§
impl Freeze for BuildDiagnostics
impl RefUnwindSafe for BuildDiagnostics
impl !Send for BuildDiagnostics
impl !Sync for BuildDiagnostics
impl Unpin for BuildDiagnostics
impl UnwindSafe for BuildDiagnostics
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> 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