Struct apollo_parser::Error
source · pub struct Error { /* private fields */ }
Implementations§
source§impl Error
impl Error
sourcepub fn with_loc<S: Into<String>>(message: S, data: String, index: usize) -> Self
pub fn with_loc<S: Into<String>>(message: S, data: String, index: usize) -> Self
Create a new instance of Error
with a Location
.
pub fn limit<S: Into<String>>(message: S, index: usize) -> Self
pub fn eof<S: Into<String>>(message: S, index: usize) -> Self
sourcepub fn data(&self) -> &str
pub fn data(&self) -> &str
Get a reference to the error’s data. This is usually the token that
apollo-parser
has found to be lexically or syntactically incorrect.
pub fn is_limit(&self) -> bool
pub fn is_eof(&self) -> bool
Trait Implementations§
source§impl Error for Error
impl Error for Error
1.30.0 · 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()