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.
Sourcepub fn deprecated(keyword: impl Display, help: impl Display, span: Span) -> Self
pub fn deprecated(keyword: impl Display, help: impl Display, span: Span) -> Self
For when a keyword is deprecated but could be used as a valid identifier.
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)>
Returns 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.
Auto Trait Implementations§
impl Freeze for ParserWarning
impl RefUnwindSafe for ParserWarning
impl Send for ParserWarning
impl Sync for ParserWarning
impl Unpin for ParserWarning
impl UnwindSafe for ParserWarning
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more