pub enum DiagnosticError {
Internal,
NotAnElephantFile,
Syntax,
DuplicateDefinition,
MissingWhenClause,
MissingThenClause,
AtMostOneRequiring,
AtMostOneRelating,
AtMostOneReturning,
AtMostOneUnbounded,
}
Expand description
Reportable error diagnostics.
Variants§
Internal
An internal error occurred.
NotAnElephantFile
Not an Elephant Specification Language file.
Syntax
Syntax error. Please check this line, the section, or the continued (…) lines!
DuplicateDefinition
Duplicate definition. Name already in use.
MissingWhenClause
Missing when clause in a behavior requirement.
MissingThenClause
Missing then clause in a behavior requirement.
AtMostOneRequiring
At most one requiring section in a relation definition or instantiation.
AtMostOneRelating
At most one relating section in a relation definition or instantiation.
AtMostOneReturning
At most one returning section in a relation definition or instantiation.
AtMostOneUnbounded
At most one unbounded (“one or more”) parameter per parameter section is allowed.
Implementations§
Source§impl DiagnosticError
impl DiagnosticError
Sourcepub fn diagnostic(
&self,
range: Range,
related_information: Option<Vec<DiagnosticRelatedInformation>>,
) -> Diagnostic
pub fn diagnostic( &self, range: Range, related_information: Option<Vec<DiagnosticRelatedInformation>>, ) -> Diagnostic
Create default diagnostic. Location at the start of the input.
Trait Implementations§
Source§impl Clone for DiagnosticError
impl Clone for DiagnosticError
Source§fn clone(&self) -> DiagnosticError
fn clone(&self) -> DiagnosticError
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 DiagnosticError
impl Debug for DiagnosticError
Source§impl Default for DiagnosticError
impl Default for DiagnosticError
Source§fn default() -> DiagnosticError
fn default() -> DiagnosticError
Returns the “default value” for a type. Read more
Source§impl Display for DiagnosticError
impl Display for DiagnosticError
Source§impl EnumMessage for DiagnosticError
impl EnumMessage for DiagnosticError
fn get_message(&self) -> Option<&'static str>
fn get_detailed_message(&self) -> Option<&'static str>
Source§fn get_documentation(&self) -> Option<&'static str>
fn get_documentation(&self) -> Option<&'static str>
Get the doc comment associated with a variant if it exists.
fn get_serializations(&self) -> &'static [&'static str]
Source§impl PartialEq for DiagnosticError
impl PartialEq for DiagnosticError
impl StructuralPartialEq for DiagnosticError
Auto Trait Implementations§
impl Freeze for DiagnosticError
impl RefUnwindSafe for DiagnosticError
impl Send for DiagnosticError
impl Sync for DiagnosticError
impl Unpin for DiagnosticError
impl UnwindSafe for DiagnosticError
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