Enum macros_core::MacrosError
source · pub enum MacrosError {
Parse(ParseError),
User(Box<dyn Error + Sync + Send + 'static, Global>),
}
Expand description
The error type for this crate. Can be either a Parse(ParseError)
from this crate or a User(Box<dyn Error + Send + Sync>)
user error.
Variants§
Implementations§
source§impl MacrosError
impl MacrosError
sourcepub fn into_diagnostic(self) -> Diagnostic
pub fn into_diagnostic(self) -> Diagnostic
Convert the error into a proc_macro_error::Diagnostic
.
sourcepub fn unexpected_end_of_input(self, msg: &str) -> MacrosError
pub fn unexpected_end_of_input(self, msg: &str) -> MacrosError
Add a message to the error if it is a Self::Parse
and the error is an UnexpectedEndOfInput
.
Trait Implementations§
source§impl Debug for MacrosError
impl Debug for MacrosError
source§impl Display for MacrosError
impl Display for MacrosError
source§impl Error for MacrosError
impl Error for MacrosError
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<ParseError> for MacrosError
impl From<ParseError> for MacrosError
source§fn from(error: ParseError) -> MacrosError
fn from(error: ParseError) -> MacrosError
Converts to this type from the input type.