pub struct ErrorDefinition {
pub loc: Loc,
pub keyword: Expression,
pub name: Option<Identifier>,
pub fields: Vec<ErrorParameter>,
}Expand description
An error definition.
error <name> (<fields>,*);
Fields§
§loc: LocThe code location.
keyword: ExpressionThe error keyword.
name: Option<Identifier>The identifier.
This field is None only if an error occurred during parsing.
fields: Vec<ErrorParameter>The list of error parameters.
Trait Implementations§
Source§impl Clone for ErrorDefinition
impl Clone for ErrorDefinition
Source§fn clone(&self) -> ErrorDefinition
fn clone(&self) -> ErrorDefinition
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 CodeLocation for ErrorDefinition
impl CodeLocation for ErrorDefinition
Source§impl Debug for ErrorDefinition
impl Debug for ErrorDefinition
Source§impl Display for ErrorDefinition
impl Display for ErrorDefinition
Source§impl PartialEq for ErrorDefinition
impl PartialEq for ErrorDefinition
impl Eq for ErrorDefinition
impl StructuralPartialEq for ErrorDefinition
Auto Trait Implementations§
impl Freeze for ErrorDefinition
impl RefUnwindSafe for ErrorDefinition
impl Send for ErrorDefinition
impl Sync for ErrorDefinition
impl Unpin for ErrorDefinition
impl UnwindSafe for ErrorDefinition
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