Struct i_slint_compiler::diagnostics::BuildDiagnostics
source · 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
§type Item = Diagnostic
type Item = Diagnostic
The type of the elements being iterated over.
§type IntoIter = <Vec<Diagnostic, Global> as IntoIterator>::IntoIter
type IntoIter = <Vec<Diagnostic, Global> as IntoIterator>::IntoIter
Which kind of iterator are we turning this into?
Auto Trait Implementations§
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