Enum leo_errors::errors::compiler::compiler_errors::CompilerError
source · pub enum CompilerError {
Formatted(Formatted),
Backtraced(Backtraced),
}Expand description
CompilerError enum that represents all the errors for the leo-compiler crate.
Variants
Formatted(Formatted)
Backtraced(Backtraced)
Implementations
sourceimpl CompilerError
impl CompilerError
sourcepub fn file_read_error(path: impl Debug, error: impl ErrorArg) -> Self
pub fn file_read_error(path: impl Debug, error: impl ErrorArg) -> Self
For when the compiler can’t read a file from the provided path.
sourcepub fn illegal_static_member_assignment(member: impl Display, span: Span) -> Self
pub fn illegal_static_member_assignment(member: impl Display, span: Span) -> Self
For when a user tries to assign to a struct static member.
pub fn import_not_found(file_path: impl Display, span: Span) -> Self
pub fn cannot_open_cwd(err: impl ErrorArg, span: Span) -> Self
pub fn program_name_should_match_file_name(
program_name: impl Display,
file_name: impl Display,
span: Span
) -> Self
pub fn program_scope_name_does_not_match(
program_scope_name: impl Display,
file_name: impl Display,
span: Span
) -> Self
pub fn num_exit_codes() -> i32
Trait Implementations
sourceimpl Clone for CompilerError
impl Clone for CompilerError
sourcefn clone(&self) -> CompilerError
fn clone(&self) -> CompilerError
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 CompilerError
impl Debug for CompilerError
sourceimpl Display for CompilerError
impl Display for CompilerError
sourceimpl Error for CompilerError
impl Error for CompilerError
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 CompilerError
impl From<Backtraced> for CompilerError
sourcefn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
sourceimpl From<CompilerError> for LeoError
impl From<CompilerError> for LeoError
sourcefn from(source: CompilerError) -> Self
fn from(source: CompilerError) -> Self
Converts to this type from the input type.
sourceimpl From<Formatted> for CompilerError
impl From<Formatted> for CompilerError
sourceimpl LeoMessageCode for CompilerError
impl LeoMessageCode for CompilerError
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 CompilerError
impl Send for CompilerError
impl Sync for CompilerError
impl Unpin for CompilerError
impl UnwindSafe for CompilerError
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