Enum combine::error::StringStreamError
source · [−]pub enum StringStreamError {
UnexpectedParse,
Eoi,
CharacterBoundary,
}
Variants
UnexpectedParse
Eoi
CharacterBoundary
Trait Implementations
sourceimpl Clone for StringStreamError
impl Clone for StringStreamError
sourcefn clone(&self) -> StringStreamError
fn clone(&self) -> StringStreamError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for StringStreamError
impl Debug for StringStreamError
sourceimpl Display for StringStreamError
impl Display for StringStreamError
sourceimpl Error for StringStreamError
impl Error for StringStreamError
sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourceimpl<Item, Range, Position> ParseError<Item, Range, Position> for StringStreamError where
Position: Default,
impl<Item, Range, Position> ParseError<Item, Range, Position> for StringStreamError where
Position: Default,
type StreamError = Self
sourcefn 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
sourcefn set_position(&mut self, _position: Position)
fn set_position(&mut self, _position: Position)
Sets the position of this ParseError
sourcefn add(&mut self, err: Self::StreamError)
fn add(&mut self, err: Self::StreamError)
Adds a StreamError
to self
. Read more
sourcefn set_expected<F>(self_: &mut Tracked<Self>, info: Self::StreamError, f: F) where
F: FnOnce(&mut Tracked<Self>),
fn set_expected<F>(self_: &mut Tracked<Self>, info: Self::StreamError, f: F) where
F: FnOnce(&mut Tracked<Self>),
Sets info
as the only Expected
error of self
fn is_unexpected_end_of_input(&self) -> bool
sourcefn into_other<T>(self) -> T where
T: ParseError<Item, Range, Position>,
fn into_other<T>(self) -> T where
T: ParseError<Item, Range, Position>,
Does a best-effort conversion of self
into another ParseError
sourcefn 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
. Read more
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>,
sourcefn clear_expected(&mut self)
fn clear_expected(&mut self)
Removes any expected errors currently in self
sourceimpl<Item, Range, Position> ParseErrorInto<Item, Range, Position> for StringStreamError where
Position: Default,
impl<Item, Range, Position> ParseErrorInto<Item, Range, Position> for StringStreamError where
Position: Default,
fn into_other_error<T, Item2, Range2, Position2>(self) -> T where
T: ParseError<Item2, Range2, Position2>,
Item2: From<Item>,
Range2: From<Range>,
Position2: From<Position>,
sourceimpl<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_format<T>(_msg: T) -> Self where
T: Display,
fn expected_token(_: Item) -> Self
fn expected_range(_: Range) -> Self
fn expected_format<T>(_: T) -> Self where
T: Display,
fn message_format<T>(_: T) -> Self where
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
fn is_unexpected_end_of_input(&self) -> bool
sourcefn into_other<T>(self) -> T where
T: StreamError<Item, Range>,
fn into_other<T>(self) -> T where
T: StreamError<Item, Range>,
Converts self
into a different StreamError
type. Read more
fn unexpected<E>(info: E) -> Self where
E: for<'s> ErrorInfo<'s, Item, Range>,
fn unexpected_static_message(msg: &'static str) -> Self
fn expected<E>(info: E) -> Self where
E: for<'s> ErrorInfo<'s, Item, Range>,
fn expected_static_message(msg: &'static str) -> Self
fn message<E>(info: E) -> Self where
E: for<'s> ErrorInfo<'s, Item, Range>,
fn other<E>(err: E) -> Self where
E: StdError + Send + Sync + 'static,
sourceimpl<Item, Range> StreamErrorInto<Item, Range> for StringStreamError
impl<Item, Range> StreamErrorInto<Item, Range> for StringStreamError
fn into_other_error<T, Item2, Range2>(self) -> T where
T: StreamError<Item2, Range2>,
Item2: From<Item>,
Range2: From<Range>,
impl Copy for StringStreamError
impl StructuralPartialEq for StringStreamError
Auto Trait Implementations
impl RefUnwindSafe for StringStreamError
impl Send for StringStreamError
impl Sync for StringStreamError
impl Unpin for StringStreamError
impl UnwindSafe for StringStreamError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more