pub struct DiagnosticRef<'a> { /* private fields */ }Expand description
Lightweight reference-style view over a single diagnostic record.
Implementations§
Source§impl DiagnosticRef<'_>
impl DiagnosticRef<'_>
pub fn code(&self) -> DiagnosticCode
pub fn severity(&self) -> DiagnosticSeverity
pub fn span(&self) -> Span
pub fn source(&self) -> SourceId
pub fn message(&self) -> &'static str
pub fn location(&self) -> SourceLocation
pub fn to_owned_diagnostic(&self) -> Diagnostic
Trait Implementations§
Source§impl<'a> Clone for DiagnosticRef<'a>
impl<'a> Clone for DiagnosticRef<'a>
Source§fn clone(&self) -> DiagnosticRef<'a>
fn clone(&self) -> DiagnosticRef<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for DiagnosticRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for DiagnosticRef<'a>
impl<'a> RefUnwindSafe for DiagnosticRef<'a>
impl<'a> Send for DiagnosticRef<'a>
impl<'a> Sync for DiagnosticRef<'a>
impl<'a> Unpin for DiagnosticRef<'a>
impl<'a> UnsafeUnpin for DiagnosticRef<'a>
impl<'a> UnwindSafe for DiagnosticRef<'a>
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