pub struct SyntaxDiagnostic {
pub is_error: bool,
pub span: DiagSpan,
pub message: EcoString,
pub hints: EcoVec<Spanned<EcoString, DiagSpan>>,
}Expand description
A syntactical error or warning. This is mainly used by converting it to a
SourceDiagnostic during evaluation.
Fields§
§is_error: booltrue if the diagnostic is an error, false if it’s a warning.
span: DiagSpanThe span targeted by the diagnostic.
message: EcoStringThe main diagnostic message.
hints: EcoVec<Spanned<EcoString, DiagSpan>>Additional hints to the user indicating how this issue could be avoided or worked around.
Trait Implementations§
Source§impl Clone for SyntaxDiagnostic
impl Clone for SyntaxDiagnostic
Source§fn clone(&self) -> SyntaxDiagnostic
fn clone(&self) -> SyntaxDiagnostic
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 SyntaxDiagnostic
impl Debug for SyntaxDiagnostic
impl Eq for SyntaxDiagnostic
Source§impl Hash for SyntaxDiagnostic
impl Hash for SyntaxDiagnostic
Source§impl PartialEq for SyntaxDiagnostic
impl PartialEq for SyntaxDiagnostic
Source§fn eq(&self, other: &SyntaxDiagnostic) -> bool
fn eq(&self, other: &SyntaxDiagnostic) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SyntaxDiagnostic
Auto Trait Implementations§
impl Freeze for SyntaxDiagnostic
impl RefUnwindSafe for SyntaxDiagnostic
impl Send for SyntaxDiagnostic
impl Sync for SyntaxDiagnostic
impl Unpin for SyntaxDiagnostic
impl UnsafeUnpin for SyntaxDiagnostic
impl UnwindSafe for SyntaxDiagnostic
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more