Enum leo_errors::warnings::parser::parser_warning::ParserWarning    
source · pub enum ParserWarning {
    Formatted(Formatted),
    Backtraced(Backtraced),
}Expand description
ParserWarning enum that represents all the warnings for the leo-parser crate.
Variants§
Formatted(Formatted)
Backtraced(Backtraced)
Implementations§
source§impl ParserWarning
 
impl ParserWarning
sourcepub fn const_parameter_or_input(span: Span) -> Self
 
pub fn const_parameter_or_input(span: Span) -> Self
For when a user used const on a parameter or input instead of constant.
pub fn num_exit_codes() -> i32
Trait Implementations§
source§impl Clone for ParserWarning
 
impl Clone for ParserWarning
source§fn clone(&self) -> ParserWarning
 
fn clone(&self) -> ParserWarning
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 ParserWarning
 
impl Debug for ParserWarning
source§impl Display for ParserWarning
 
impl Display for ParserWarning
source§impl Error for ParserWarning
 
impl Error for ParserWarning
source§fn 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 · 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 ParserWarning
 
impl From<Backtraced> for ParserWarning
source§fn from(source: Backtraced) -> Self
 
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
source§impl From<Formatted> for ParserWarning
 
impl From<Formatted> for ParserWarning
source§impl From<ParserWarning> for LeoWarning
 
impl From<ParserWarning> for LeoWarning
source§fn from(source: ParserWarning) -> Self
 
fn from(source: ParserWarning) -> Self
Converts to this type from the input type.
source§impl LeoMessageCode for ParserWarning
 
impl LeoMessageCode for ParserWarning
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. Read more