pub struct DiagnosticNote {
pub message: String,
pub location: Option<Location>,
}Expand description
Auxiliary note attached to a diagnostic — e.g. “borrow originates
here”, “binding declared here”. Mirrors the existing ErrorNote
structure used by ShapeError::SemanticError.location.notes.
Fields§
§message: StringNote message.
location: Option<Location>Location the note refers to; None for synthetic notes.
Implementations§
Trait Implementations§
Source§impl Clone for DiagnosticNote
impl Clone for DiagnosticNote
Source§fn clone(&self) -> DiagnosticNote
fn clone(&self) -> DiagnosticNote
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 moreSource§impl Debug for DiagnosticNote
impl Debug for DiagnosticNote
Source§impl<'de> Deserialize<'de> for DiagnosticNote
impl<'de> Deserialize<'de> for DiagnosticNote
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for DiagnosticNote
impl PartialEq for DiagnosticNote
Source§fn eq(&self, other: &DiagnosticNote) -> bool
fn eq(&self, other: &DiagnosticNote) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for DiagnosticNote
impl Serialize for DiagnosticNote
impl StructuralPartialEq for DiagnosticNote
Auto Trait Implementations§
impl Freeze for DiagnosticNote
impl RefUnwindSafe for DiagnosticNote
impl Send for DiagnosticNote
impl Sync for DiagnosticNote
impl Unpin for DiagnosticNote
impl UnsafeUnpin for DiagnosticNote
impl UnwindSafe for DiagnosticNote
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