pub struct ParseError {
pub position: usize,
pub expected: Vec<Expected>,
pub context: Vec<&'static str>,
}Expand description
構造化パースエラー。位置・期待トークン・コンテキストを保持する。
Fields§
§position: usize失敗した byte offset
expected: Vec<Expected>期待していたトークンの集合
context: Vec<&'static str>コンテキストスタック(外側から内側の順)
Trait Implementations§
Source§impl Clone for ParseError
impl Clone for ParseError
Source§fn clone(&self) -> ParseError
fn clone(&self) -> ParseError
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 ContextError for ParseError
Available on crate feature alloc only.
impl ContextError for ParseError
Available on crate feature
alloc only.fn add_context(self, context: &'static str) -> Self
Source§impl Debug for ParseError
impl Debug for ParseError
Source§impl Display for ParseError
Available on crate feature alloc only.
impl Display for ParseError
Available on crate feature
alloc only.Source§impl ExpectError for ParseError
Available on crate feature alloc only.
impl ExpectError for ParseError
Available on crate feature
alloc only.fn from_expected(position: usize, expected: Expected) -> Self
Source§impl MergeError for ParseError
Available on crate feature alloc only.
impl MergeError for ParseError
Available on crate feature
alloc only.Source§impl PartialEq for ParseError
impl PartialEq for ParseError
impl Eq for ParseError
impl StructuralPartialEq for ParseError
Auto Trait Implementations§
impl Freeze for ParseError
impl RefUnwindSafe for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl UnsafeUnpin for ParseError
impl UnwindSafe for ParseError
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