#[non_exhaustive]pub enum ConvertError<'src> {
Syntax {
syntax_errors: Vec<SyntaxError>,
src: Cow<'src, str>,
},
Semantic {
semantic_errors: Vec<SemanticError>,
src: Cow<'src, str>,
},
Unknown,
}Expand description
Represents an error that occurred while converting MinTyML.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Syntax
The conversion failed due to one or more syntax errors.
Semantic
The conversion failed due to one or more semantic errors.
Unknown
The conversion failed for some other reason.
Implementations§
Source§impl<'src> ConvertError<'src>
impl<'src> ConvertError<'src>
Sourcepub fn to_static(self) -> ConvertError<'static>
pub fn to_static(self) -> ConvertError<'static>
Copies all borrowed data so the error can outlive the source str.
Trait Implementations§
Source§impl<'src> Clone for ConvertError<'src>
impl<'src> Clone for ConvertError<'src>
Source§fn clone(&self) -> ConvertError<'src>
fn clone(&self) -> ConvertError<'src>
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<'src> Debug for ConvertError<'src>
impl<'src> Debug for ConvertError<'src>
Source§impl<'src> Display for ConvertError<'src>
impl<'src> Display for ConvertError<'src>
Source§impl<'src> Hash for ConvertError<'src>
impl<'src> Hash for ConvertError<'src>
Source§impl<'src> Ord for ConvertError<'src>
impl<'src> Ord for ConvertError<'src>
Source§fn cmp(&self, other: &ConvertError<'src>) -> Ordering
fn cmp(&self, other: &ConvertError<'src>) -> 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<'src> PartialEq for ConvertError<'src>
impl<'src> PartialEq for ConvertError<'src>
Source§impl<'src> PartialOrd for ConvertError<'src>
impl<'src> PartialOrd for ConvertError<'src>
impl<'src> Eq for ConvertError<'src>
impl<'src> StructuralPartialEq for ConvertError<'src>
Auto Trait Implementations§
impl<'src> Freeze for ConvertError<'src>
impl<'src> RefUnwindSafe for ConvertError<'src>
impl<'src> Send for ConvertError<'src>
impl<'src> Sync for ConvertError<'src>
impl<'src> Unpin for ConvertError<'src>
impl<'src> UnwindSafe for ConvertError<'src>
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