pub enum UnexpectedParse {
Eoi,
Unexpected,
}
Variants§
Trait Implementations§
source§impl Clone for UnexpectedParse
impl Clone for UnexpectedParse
source§fn clone(&self) -> UnexpectedParse
fn clone(&self) -> UnexpectedParse
Returns a copy 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 UnexpectedParse
impl Debug for UnexpectedParse
source§impl Display for UnexpectedParse
impl Display for UnexpectedParse
source§impl Error for UnexpectedParse
impl Error for UnexpectedParse
source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
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
source§impl<Item, Range, Position> ParseError<Item, Range, Position> for UnexpectedParsewhere
Position: Default,
impl<Item, Range, Position> ParseError<Item, Range, Position> for UnexpectedParsewhere
Position: Default,
type StreamError = UnexpectedParse
source§fn from_error(_: Position, err: Self::StreamError) -> Self
fn from_error(_: Position, err: Self::StreamError) -> Self
Creates a
ParseError
from a single Self::StreamError
fn position(&self) -> Position
source§fn set_position(&mut self, _position: Position)
fn set_position(&mut self, _position: Position)
Sets the position of this
ParseError
source§fn add(&mut self, err: Self::StreamError)
fn add(&mut self, err: Self::StreamError)
source§fn set_expected<F>(self_: &mut Tracked<Self>, info: Self::StreamError, f: F)
fn set_expected<F>(self_: &mut Tracked<Self>, info: Self::StreamError, f: F)
Sets
info
as the only Expected
error of self
fn is_unexpected_end_of_input(&self) -> bool
source§fn into_other<T>(self) -> Twhere
T: ParseError<Item, Range, Position>,
fn into_other<T>(self) -> Twhere
T: ParseError<Item, Range, Position>,
Does a best-effort conversion of
self
into another ParseError
source§fn merge(self, other: Self) -> Self
fn merge(self, other: Self) -> Self
Merges two errors. If they exist at the same position the errors of
other
are
added to self
(using the semantics of add
). If they are not at the same
position the error furthest ahead are returned, ignoring the other ParseError
.fn add_expected<E>(&mut self, info: E)where
E: for<'s> ErrorInfo<'s, Item, Range>,
fn add_unexpected<E>(&mut self, info: E)where
E: for<'s> ErrorInfo<'s, Item, Range>,
fn add_message<E>(&mut self, info: E)where
E: for<'s> ErrorInfo<'s, Item, Range>,
source§fn clear_expected(&mut self)
fn clear_expected(&mut self)
Removes any expected errors currently in
self
source§impl<Item, Range, Position> ParseErrorInto<Item, Range, Position> for UnexpectedParsewhere
Position: Default,
impl<Item, Range, Position> ParseErrorInto<Item, Range, Position> for UnexpectedParsewhere
Position: Default,
fn into_other_error<T, Item2, Range2, Position2>(self) -> Twhere
T: ParseError<Item2, Range2, Position2>,
Item2: From<Item>,
Range2: From<Range>,
Position2: From<Position>,
source§impl PartialEq for UnexpectedParse
impl PartialEq for UnexpectedParse
source§impl<Item, Range> StreamError<Item, Range> for UnexpectedParse
impl<Item, Range> StreamError<Item, Range> for UnexpectedParse
fn unexpected_token(_: Item) -> Self
fn unexpected_range(_: Range) -> Self
fn unexpected_format<T>(_: T) -> Selfwhere
T: Display,
fn expected_token(_: Item) -> Self
fn expected_range(_: Range) -> Self
fn expected_format<T>(_: T) -> Selfwhere
T: Display,
fn message_format<T>(_: T) -> Selfwhere
T: Display,
fn message_token(_: Item) -> Self
fn message_range(_: Range) -> Self
fn end_of_input() -> Self
fn is_unexpected_end_of_input(&self) -> bool
source§fn into_other<T>(self) -> Twhere
T: StreamError<Item, Range>,
fn into_other<T>(self) -> Twhere
T: StreamError<Item, Range>,
fn unexpected<E>(info: E) -> Selfwhere
E: for<'s> ErrorInfo<'s, Item, Range>,
fn unexpected_static_message(msg: &'static str) -> Self
fn expected<E>(info: E) -> Selfwhere
E: for<'s> ErrorInfo<'s, Item, Range>,
fn expected_static_message(msg: &'static str) -> Self
fn message_static_message(msg: &'static str) -> Self
fn message<E>(info: E) -> Selfwhere
E: for<'s> ErrorInfo<'s, Item, Range>,
fn other<E>(err: E) -> Self
source§impl<Item, Range> StreamErrorInto<Item, Range> for UnexpectedParse
impl<Item, Range> StreamErrorInto<Item, Range> for UnexpectedParse
fn into_other_error<T, Item2, Range2>(self) -> T
impl Copy for UnexpectedParse
impl StructuralPartialEq for UnexpectedParse
Auto Trait Implementations§
impl Freeze for UnexpectedParse
impl RefUnwindSafe for UnexpectedParse
impl Send for UnexpectedParse
impl Sync for UnexpectedParse
impl Unpin for UnexpectedParse
impl UnwindSafe for UnexpectedParse
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)