#[non_exhaustive]pub(crate) struct ParseError {
context: Option<Span>,
description: Cow<'static, str>,
expected: Option<&'static [Expected]>,
unexpected: Option<Span>,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.context: Option<Span>§description: Cow<'static, str>§expected: Option<&'static [Expected]>§unexpected: Option<Span>Implementations§
Source§impl ParseError
impl ParseError
pub fn new(description: impl Into<Cow<'static, str>>) -> ParseError
pub fn with_context(self, context: Span) -> ParseError
pub fn with_expected(self, expected: &'static [Expected]) -> ParseError
pub fn with_unexpected(self, unexpected: Span) -> ParseError
pub fn context(&self) -> Option<Span>
pub fn description(&self) -> &str
pub fn expected(&self) -> Option<&'static [Expected]>
pub fn unexpected(&self) -> Option<Span>
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 Debug for ParseError
impl Debug for ParseError
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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.