pub struct SourceDiagnostic {
pub range: SourceRange,
pub error: DiagnosticCode,
}Fields§
§range: SourceRange§error: DiagnosticCodeImplementations§
Source§impl SourceDiagnostic
impl SourceDiagnostic
pub fn new(range: SourceRange, error: DiagnosticCode) -> Self
Methods from Deref<Target = DiagnosticCode>§
pub fn code(&self) -> u16
pub fn message(&self) -> &'static str
pub fn level_str(&self) -> &'static str
pub fn is_error(&self) -> bool
pub fn is_warning(&self) -> bool
pub fn is_info(&self) -> bool
pub fn is_hint(&self) -> bool
pub fn is_reference(&self) -> bool
pub fn is_tag(&self) -> bool
pub fn is_sourcemap(&self) -> bool
Trait Implementations§
Source§impl Clone for SourceDiagnostic
impl Clone for SourceDiagnostic
Source§impl Debug for SourceDiagnostic
impl Debug for SourceDiagnostic
Source§impl Deref for SourceDiagnostic
impl Deref for SourceDiagnostic
Source§type Target = DiagnosticCode
type Target = DiagnosticCode
The resulting type after dereferencing.
Source§fn deref(&self) -> &DiagnosticCode
fn deref(&self) -> &DiagnosticCode
Dereferences the value.
Source§impl Display for SourceDiagnostic
impl Display for SourceDiagnostic
Source§impl Error for SourceDiagnostic
impl Error for SourceDiagnostic
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for SourceDiagnostic
impl PartialEq for SourceDiagnostic
impl StructuralPartialEq for SourceDiagnostic
Auto Trait Implementations§
impl Freeze for SourceDiagnostic
impl RefUnwindSafe for SourceDiagnostic
impl Send for SourceDiagnostic
impl Sync for SourceDiagnostic
impl Unpin for SourceDiagnostic
impl UnsafeUnpin for SourceDiagnostic
impl UnwindSafe for SourceDiagnostic
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