pub struct ParsePatternError {
pub token_index: usize,
pub kind: ParseErrorKind,
}Expand description
Error returned by crate::Pattern::from_ida when the input string
contains an invalid token.
The error captures both the offending token’s index and a categorised
reason (ParseErrorKind) so callers can produce a precise diagnostic
without re-parsing the input themselves.
Fields§
§token_index: usizeZero-based index of the offending whitespace-separated token.
kind: ParseErrorKindWhat was wrong with the token.
Trait Implementations§
Source§impl Clone for ParsePatternError
impl Clone for ParsePatternError
Source§fn clone(&self) -> ParsePatternError
fn clone(&self) -> ParsePatternError
Returns a duplicate 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 ParsePatternError
impl Debug for ParsePatternError
Source§impl Display for ParsePatternError
impl Display for ParsePatternError
Source§impl Error for ParsePatternError
Available on crate feature std only.
impl Error for ParsePatternError
Available on crate feature
std only.1.30.0 · 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 PartialEq for ParsePatternError
impl PartialEq for ParsePatternError
impl Copy for ParsePatternError
impl Eq for ParsePatternError
impl StructuralPartialEq for ParsePatternError
Auto Trait Implementations§
impl Freeze for ParsePatternError
impl RefUnwindSafe for ParsePatternError
impl Send for ParsePatternError
impl Sync for ParsePatternError
impl Unpin for ParsePatternError
impl UnsafeUnpin for ParsePatternError
impl UnwindSafe for ParsePatternError
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