Struct slint_interpreter::Diagnostic
pub struct Diagnostic { /* private fields */ }
Expand description
This structure represent a diagnostic emitted while compiling .slint code.
It is basically a message, a level (warning or error), attached to a position in the code
Implementationsยง
ยงimpl Diagnostic
impl Diagnostic
pub fn level(&self) -> DiagnosticLevel
pub fn level(&self) -> DiagnosticLevel
Return the level for this diagnostic
pub fn line_column(&self) -> (usize, usize)
pub fn line_column(&self) -> (usize, usize)
Returns a tuple with the line (starting at 1) and column number (starting at 1)
Can also return (0, 0) if the span is invalid
pub fn source_file(&self) -> Option<&Path>
pub fn source_file(&self) -> Option<&Path>
return the path of the source file where this error is attached
Trait Implementationsยง
ยงimpl Clone for Diagnostic
impl Clone for Diagnostic
ยงfn clone(&self) -> Diagnostic
fn clone(&self) -> Diagnostic
Returns a copy of the value. Read more
1.0.0 ยท sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreยงimpl Debug for Diagnostic
impl Debug for Diagnostic
Auto Trait Implementationsยง
impl RefUnwindSafe for Diagnostic
impl !Send for Diagnostic
impl !Sync for Diagnostic
impl Unpin for Diagnostic
impl UnwindSafe for Diagnostic
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
ยงimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
ยงfn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.ยงfn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.ยงfn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
โs vtable from &Trait
โs.ยงfn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
โs vtable from &mut Trait
โs.