#[non_exhaustive]pub struct SyntaxError {
pub range: LocationRange,
pub kind: SyntaxErrorKind,
}Expand description
Represents a syntax error in the MinTyML source.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.range: LocationRangeThe LocationRange encapsulating the syntax error.
kind: SyntaxErrorKindImplementations§
Source§impl SyntaxError
impl SyntaxError
pub fn display_with_src<'data>( &'data self, src: &'data str, options: &DisplayWithSrcOptions, ) -> impl Display + 'data
Trait Implementations§
Source§impl Clone for SyntaxError
impl Clone for SyntaxError
Source§fn clone(&self) -> SyntaxError
fn clone(&self) -> SyntaxError
Returns a duplicate 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 moreSource§impl Debug for SyntaxError
impl Debug for SyntaxError
Source§impl Default for SyntaxError
impl Default for SyntaxError
Source§fn default() -> SyntaxError
fn default() -> SyntaxError
Returns the “default value” for a type. Read more
Source§impl Display for SyntaxError
impl Display for SyntaxError
Source§impl From<ParseError<'_>> for SyntaxError
impl From<ParseError<'_>> for SyntaxError
Source§fn from(value: ParseError<'_>) -> Self
fn from(value: ParseError<'_>) -> Self
Converts to this type from the input type.
Source§impl Hash for SyntaxError
impl Hash for SyntaxError
Source§impl Ord for SyntaxError
impl Ord for SyntaxError
Source§fn cmp(&self, other: &SyntaxError) -> Ordering
fn cmp(&self, other: &SyntaxError) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SyntaxError
impl PartialEq for SyntaxError
Source§impl PartialOrd for SyntaxError
impl PartialOrd for SyntaxError
impl Eq for SyntaxError
impl StructuralPartialEq for SyntaxError
Auto Trait Implementations§
impl Freeze for SyntaxError
impl RefUnwindSafe for SyntaxError
impl Send for SyntaxError
impl Sync for SyntaxError
impl Unpin for SyntaxError
impl UnwindSafe for SyntaxError
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<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