pub enum StringStreamError {
UnexpectedParse,
Eoi,
CharacterBoundary,
}
Variants§
Trait Implementations§
Source§impl Clone for StringStreamError
impl Clone for StringStreamError
Source§fn clone(&self) -> StringStreamError
fn clone(&self) -> StringStreamError
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 StringStreamError
impl Debug for StringStreamError
Source§impl Display for StringStreamError
impl Display for StringStreamError
Source§impl<Item, Range, Position> ParseError<Item, Range, Position> for StringStreamErrorwhere
Position: Default,
impl<Item, Range, Position> ParseError<Item, Range, Position> for StringStreamErrorwhere
Position: Default,
type StreamError = StringStreamError
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
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(&mut self, info: Info<Item, Range>)
fn add_unexpected(&mut self, info: Info<Item, Range>)
fn add_message(&mut self, info: Info<Item, Range>)
Source§fn clear_expected(&mut self)
fn clear_expected(&mut self)
Removes any expected errors currently in
self
Source§impl PartialEq for StringStreamError
impl PartialEq for StringStreamError
Source§impl<Item, Range> StreamError<Item, Range> for StringStreamError
impl<Item, Range> StreamError<Item, Range> for StringStreamError
fn unexpected_token(_: Item) -> Self
fn unexpected_range(_: Range) -> Self
fn unexpected_message<T>(_msg: T) -> Selfwhere
T: Display,
fn expected_token(_: Item) -> Self
fn expected_range(_: Range) -> Self
fn expected_message<T>(_: T) -> Selfwhere
T: Display,
fn message_message<T>(_: T) -> Selfwhere
T: Display,
fn message_token(_: Item) -> Self
fn message_range(_: Range) -> Self
fn message_static_message(msg: &'static str) -> Self
fn end_of_input() -> Self
Source§fn into_other<T>(self) -> Twhere
T: StreamError<Item, Range>,
fn into_other<T>(self) -> Twhere
T: StreamError<Item, Range>,
fn unexpected(info: Info<Item, Range>) -> Self
fn unexpected_static_message(msg: &'static str) -> Self
fn expected(info: Info<Item, Range>) -> Self
fn expected_static_message(msg: &'static str) -> Self
fn message(info: Info<Item, Range>) -> Self
fn other<E>(err: E) -> Self
impl Copy for StringStreamError
impl StructuralPartialEq for StringStreamError
Auto Trait Implementations§
impl Freeze for StringStreamError
impl RefUnwindSafe for StringStreamError
impl Send for StringStreamError
impl Sync for StringStreamError
impl Unpin for StringStreamError
impl UnwindSafe for StringStreamError
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more