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 redefining_external_struct(struct_: impl Display, span: Span) -> Self
pub fn function_not_found(func: impl Display) -> Self
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.
source§fn error_code(&self) -> String
fn error_code(&self) -> String
source§fn warning_code(&self) -> String
fn warning_code(&self) -> String
source§fn message_type() -> String
fn message_type() -> String
source§fn code_identifier() -> i8
fn code_identifier() -> i8
Auto Trait Implementations§
impl Freeze for AstError
impl RefUnwindSafe for AstError
impl Send for AstError
impl Sync for AstError
impl Unpin for AstError
impl UnwindSafe for AstError
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)