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
sourceimpl 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
sourceimpl Clone for ParserWarning
impl Clone for ParserWarning
sourcefn clone(&self) -> ParserWarning
fn clone(&self) -> ParserWarning
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 ParserWarning
impl Debug for ParserWarning
sourceimpl Display for ParserWarning
impl Display for ParserWarning
sourceimpl Error for ParserWarning
impl Error for ParserWarning
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 ParserWarning
impl From<Backtraced> for ParserWarning
sourcefn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
sourceimpl From<Formatted> for ParserWarning
impl From<Formatted> for ParserWarning
sourceimpl From<ParserWarning> for LeoWarning
impl From<ParserWarning> for LeoWarning
sourcefn from(source: ParserWarning) -> Self
fn from(source: ParserWarning) -> Self
Converts to this type from the input type.
sourceimpl LeoMessageCode for ParserWarning
impl LeoMessageCode for ParserWarning
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 ParserWarning
impl Send for ParserWarning
impl Sync for ParserWarning
impl Unpin for ParserWarning
impl UnwindSafe for ParserWarning
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