Enum leo_errors::errors::input::input_errors::InputError
source · pub enum InputError {
Formatted(Formatted),
Backtraced(Backtraced),
}Expand description
InputError enum that represents all the errors for the inputs part of leo-ast crate.
Variants
Formatted(Formatted)
Backtraced(Backtraced)
Implementations
sourceimpl InputError
impl InputError
sourcepub fn unexpected_type(
expected: impl Display,
received: impl Display,
span: Span
) -> Self
pub fn unexpected_type(
expected: impl Display,
received: impl Display,
span: Span
) -> Self
For when declared variable type mismatches actual type.
sourcepub fn illegal_expression(expr: impl Display, span: Span) -> Self
pub fn illegal_expression(expr: impl Display, span: Span) -> Self
For when the expression is not allowed in an input file.
sourcepub fn unexpected_section(
expected: &[impl Display],
received: impl Display,
span: Span
) -> Self
pub fn unexpected_section(
expected: &[impl Display],
received: impl Display,
span: Span
) -> Self
For when section name is not an allowed one.
pub fn num_exit_codes() -> i32
Trait Implementations
sourceimpl Clone for InputError
impl Clone for InputError
sourcefn clone(&self) -> InputError
fn clone(&self) -> InputError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for InputError
impl Debug for InputError
sourceimpl Display for InputError
impl Display for InputError
sourceimpl Error for InputError
impl Error for InputError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
sourceimpl From<Backtraced> for InputError
impl From<Backtraced> for InputError
sourcefn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
sourceimpl From<Formatted> for InputError
impl From<Formatted> for InputError
sourceimpl From<InputError> for LeoError
impl From<InputError> for LeoError
sourcefn from(source: InputError) -> Self
fn from(source: InputError) -> Self
Converts to this type from the input type.
sourceimpl LeoMessageCode for InputError
impl LeoMessageCode for InputError
Implements the trait for LeoError Codes.
sourcefn error_code(&self) -> String
fn error_code(&self) -> String
Returns the prefixed error identifier.
sourcefn warning_code(&self) -> String
fn warning_code(&self) -> String
Returns the prefixed warning identifier.
sourcefn message_type() -> String
fn message_type() -> String
Returns the message’s code type for the program.
sourcefn code_identifier() -> i8
fn code_identifier() -> i8
The LeoErrorCode which has a default code identifier of 037
(Leo upsidedown and backwards). This is to make the exit codes
unique to Leo itself. Read more
Auto Trait Implementations
impl RefUnwindSafe for InputError
impl Send for InputError
impl Sync for InputError
impl Unpin for InputError
impl UnwindSafe for InputError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more