pub enum FlattenError {
Formatted(Formatted),
Backtraced(Backtraced),
}
Expand description
CliError enum that represents all the errors for the leo-lang
crate.
Variants§
Formatted(Formatted)
Backtraced(Backtraced)
Implementations§
Source§impl FlattenError
impl FlattenError
Sourcepub fn binary_overflow(
left: impl Display,
op: impl Display,
right: impl Display,
right_type: impl Display,
span: Span,
) -> Self
pub fn binary_overflow( left: impl Display, op: impl Display, right: impl Display, right_type: impl Display, span: Span, ) -> Self
For when a constant operation would cause an overflow.
Sourcepub fn unary_overflow(left: impl Display, op: impl Display, span: Span) -> Self
pub fn unary_overflow(left: impl Display, op: impl Display, span: Span) -> Self
For when a constant operation would cause an overflow.
Sourcepub fn loop_has_neg_value(value: impl Display, span: Span) -> Self
pub fn loop_has_neg_value(value: impl Display, span: Span) -> Self
For when a loop uses a negative value.
Sourcepub fn u128_to_i128(value: impl Display, span: Span) -> Self
pub fn u128_to_i128(value: impl Display, span: Span) -> Self
For when a u128 value cannot be converted into an i128.
pub fn num_exit_codes() -> i32
Trait Implementations§
Source§impl Clone for FlattenError
impl Clone for FlattenError
Source§fn clone(&self) -> FlattenError
fn clone(&self) -> FlattenError
Returns a copy 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 FlattenError
impl Debug for FlattenError
Source§impl Display for FlattenError
impl Display for FlattenError
Source§impl Error for FlattenError
impl Error for FlattenError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Backtraced> for FlattenError
impl From<Backtraced> for FlattenError
Source§fn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
Source§impl From<FlattenError> for LeoError
impl From<FlattenError> for LeoError
Source§fn from(source: FlattenError) -> Self
fn from(source: FlattenError) -> Self
Converts to this type from the input type.
Source§impl From<Formatted> for FlattenError
impl From<Formatted> for FlattenError
Source§impl LeoMessageCode for FlattenError
impl LeoMessageCode for FlattenError
Implements the trait for LeoError Codes.
Source§fn error_code(&self) -> String
fn error_code(&self) -> String
Returns the prefixed error identifier.
Source§fn warning_code(&self) -> String
fn warning_code(&self) -> String
Returns the prefixed warning identifier.
Source§fn message_type() -> String
fn message_type() -> String
Returns the message’s code type for the program.
Source§fn 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.
Auto Trait Implementations§
impl Freeze for FlattenError
impl RefUnwindSafe for FlattenError
impl Send for FlattenError
impl Sync for FlattenError
impl Unpin for FlattenError
impl UnwindSafe for FlattenError
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