pub enum StaticAnalyzerError {
Formatted(Formatted),
Backtraced(Backtraced),
}
Expand description
StaticAnalyzer enum that represents all the errors for static analysis.
Variants§
Formatted(Formatted)
Backtraced(Backtraced)
Implementations§
Source§impl StaticAnalyzerError
impl StaticAnalyzerError
pub fn no_path_awaits_all_futures_exactly_once( num_total_paths: impl Display, span: Span, ) -> Self
pub fn future_awaits_missing(unawaited: impl Display, span: Span) -> Self
pub fn invalid_await_call(span: Span) -> Self
pub fn expected_future(type_: impl Display, span: Span) -> Self
pub fn async_transition_call_with_future_argument( function_name: impl Display, span: Span, ) -> Self
pub fn misplaced_future(span: Span) -> Self
pub fn compile_time_unary_op( value: impl Display, op: impl Display, err: impl Display, span: Span, ) -> Self
pub fn compile_time_binary_op( value_lhs: impl Display, value_rhs: impl Display, op: impl Display, err: impl Display, span: Span, ) -> Self
pub fn compile_time_cast( value: impl Display, type_: impl Display, span: Span, ) -> Self
pub fn compile_core_function(err: impl Display, span: Span) -> Self
pub fn array_bounds(index: impl Display, len: impl Display, span: Span) -> Self
pub fn num_exit_codes() -> i32
Trait Implementations§
Source§impl Clone for StaticAnalyzerError
impl Clone for StaticAnalyzerError
Source§fn clone(&self) -> StaticAnalyzerError
fn clone(&self) -> StaticAnalyzerError
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 StaticAnalyzerError
impl Debug for StaticAnalyzerError
Source§impl Display for StaticAnalyzerError
impl Display for StaticAnalyzerError
Source§impl Error for StaticAnalyzerError
impl Error for StaticAnalyzerError
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 StaticAnalyzerError
impl From<Backtraced> for StaticAnalyzerError
Source§fn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
Source§impl From<Formatted> for StaticAnalyzerError
impl From<Formatted> for StaticAnalyzerError
Source§impl From<StaticAnalyzerError> for LeoError
impl From<StaticAnalyzerError> for LeoError
Source§fn from(source: StaticAnalyzerError) -> Self
fn from(source: StaticAnalyzerError) -> Self
Converts to this type from the input type.
Source§impl LeoMessageCode for StaticAnalyzerError
impl LeoMessageCode for StaticAnalyzerError
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 StaticAnalyzerError
impl RefUnwindSafe for StaticAnalyzerError
impl Send for StaticAnalyzerError
impl Sync for StaticAnalyzerError
impl Unpin for StaticAnalyzerError
impl UnwindSafe for StaticAnalyzerError
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