Enum leo_errors::errors::ast::ast_errors::AstError
source · pub enum AstError {
Formatted(Formatted),
Backtraced(Backtraced),
}
Expand description
AstError enum that represents all the errors for the leo-ast
crate.
Variants§
Formatted(Formatted)
Backtraced(Backtraced)
Implementations§
source§impl AstError
impl AstError
sourcepub fn failed_to_convert_ast_to_json_string(error: impl ErrorArg) -> Self
pub fn failed_to_convert_ast_to_json_string(error: impl ErrorArg) -> Self
For when the AST fails to be represented as a JSON string.
sourcepub fn failed_to_create_ast_json_file(
path: impl Debug,
error: impl ErrorArg
) -> Self
pub fn failed_to_create_ast_json_file( path: impl Debug, error: impl ErrorArg ) -> Self
For when the AST fails to create the AST JSON file.
sourcepub fn failed_to_write_ast_to_json_file(
path: impl Debug,
error: impl ErrorArg
) -> Self
pub fn failed_to_write_ast_to_json_file( path: impl Debug, error: impl ErrorArg ) -> Self
For when the AST fails to write the AST JSON file.
sourcepub fn failed_to_read_json_string_to_ast(error: impl ErrorArg) -> Self
pub fn failed_to_read_json_string_to_ast(error: impl ErrorArg) -> Self
For when the a JSON string fails to be represented as an AST.
sourcepub fn failed_to_read_json_file(path: impl Debug, error: impl ErrorArg) -> Self
pub fn failed_to_read_json_file(path: impl Debug, error: impl ErrorArg) -> Self
For when the a JSON files fails to be represented as an AST.
sourcepub fn failed_to_convert_ast_to_json_value(error: impl ErrorArg) -> Self
pub fn failed_to_convert_ast_to_json_value(error: impl ErrorArg) -> Self
For when the AST fails to be represented as a JSON value.
sourcepub fn shadowed_function(func: impl Display, span: Span) -> Self
pub fn shadowed_function(func: impl Display, span: Span) -> Self
For when a user shadows a function.
sourcepub fn shadowed_struct(struct_: impl Display, span: Span) -> Self
pub fn shadowed_struct(struct_: impl Display, span: Span) -> Self
For when a user shadows a struct.
sourcepub fn shadowed_record(record: impl Display, span: Span) -> Self
pub fn shadowed_record(record: impl Display, span: Span) -> Self
For when a user shadows a record.
sourcepub fn shadowed_variable(var: impl Display, span: Span) -> Self
pub fn shadowed_variable(var: impl Display, span: Span) -> Self
For when a user shadows a variable.
sourcepub fn failed_to_convert_symbol_table_to_json_string(
error: impl ErrorArg
) -> Self
pub fn failed_to_convert_symbol_table_to_json_string( error: impl ErrorArg ) -> Self
For when the symbol table fails to be represented as a JSON string.
sourcepub fn failed_to_create_symbol_table_json_file(
path: impl Debug,
error: impl ErrorArg
) -> Self
pub fn failed_to_create_symbol_table_json_file( path: impl Debug, error: impl ErrorArg ) -> Self
For when the symbol table fails to create the symbol table JSON file.
sourcepub fn failed_to_write_symbol_table_to_json_file(
path: impl Debug,
error: impl ErrorArg
) -> Self
pub fn failed_to_write_symbol_table_to_json_file( path: impl Debug, error: impl ErrorArg ) -> Self
For when the symbol table fails to write the symbol table JSON file.
sourcepub fn failed_to_read_json_string_to_symbol_table(error: impl ErrorArg) -> Self
pub fn failed_to_read_json_string_to_symbol_table(error: impl ErrorArg) -> Self
For when the a JSON string fails to be represented as an symbol table.
sourcepub fn failed_to_convert_symbol_table_to_json_value(
error: impl ErrorArg
) -> Self
pub fn failed_to_convert_symbol_table_to_json_value( error: impl ErrorArg ) -> Self
For when the symbol table fails to be represented as a JSON value.
pub fn num_exit_codes() -> i32
Trait Implementations§
source§impl Error for AstError
impl Error for AstError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl From<Backtraced> for AstError
impl From<Backtraced> for AstError
source§fn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
source§impl LeoMessageCode for AstError
impl LeoMessageCode for AstError
Implements the trait for LeoError Codes.