combine::error

Enum StringStreamError

Source
pub enum StringStreamError {
    UnexpectedParse,
    Eoi,
    CharacterBoundary,
}

Variants§

§

UnexpectedParse

§

Eoi

§

CharacterBoundary

Trait Implementations§

Source§

impl Clone for StringStreamError

Source§

fn clone(&self) -> StringStreamError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StringStreamError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for StringStreamError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Item, Range, Position> ParseError<Item, Range, Position> for StringStreamError
where Position: Default,

Source§

type StreamError = StringStreamError

Source§

fn empty(_position: Position) -> Self

Constructs an empty error. Read more
Source§

fn from_error(_: Position, err: Self::StreamError) -> Self

Creates a ParseError from a single Self::StreamError
Source§

fn set_position(&mut self, _position: Position)

Sets the position of this ParseError
Source§

fn add(&mut self, err: Self::StreamError)

Adds a StreamError to self. Read more
Source§

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
Source§

fn is_unexpected_end_of_input(&self) -> bool

Source§

fn into_other<T>(self) -> T
where T: ParseError<Item, Range, Position>,

Does a best-effort conversion of self into another ParseError
Source§

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.
Source§

fn add_expected(&mut self, info: Info<Item, Range>)

Source§

fn add_unexpected(&mut self, info: Info<Item, Range>)

Source§

fn add_message(&mut self, info: Info<Item, Range>)

Source§

fn clear_expected(&mut self)

Removes any expected errors currently in self
Source§

impl PartialEq for StringStreamError

Source§

fn eq(&self, other: &StringStreamError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<Item, Range> StreamError<Item, Range> for StringStreamError

Source§

fn unexpected_token(_: Item) -> Self

Source§

fn unexpected_range(_: Range) -> Self

Source§

fn unexpected_message<T>(_msg: T) -> Self
where T: Display,

Source§

fn expected_token(_: Item) -> Self

Source§

fn expected_range(_: Range) -> Self

Source§

fn expected_message<T>(_: T) -> Self
where T: Display,

Source§

fn message_message<T>(_: T) -> Self
where T: Display,

Source§

fn message_token(_: Item) -> Self

Source§

fn message_range(_: Range) -> Self

Source§

fn message_static_message(msg: &'static str) -> Self

Source§

fn end_of_input() -> Self

Source§

fn into_other<T>(self) -> T
where T: StreamError<Item, Range>,

Converts self into a different StreamError type. Read more
Source§

fn unexpected(info: Info<Item, Range>) -> Self

Source§

fn unexpected_static_message(msg: &'static str) -> Self

Source§

fn expected(info: Info<Item, Range>) -> Self

Source§

fn expected_static_message(msg: &'static str) -> Self

Source§

fn message(info: Info<Item, Range>) -> Self

Source§

fn other<E>(err: E) -> Self
where E: StdError + Send + Sync + 'static,

Source§

impl Copy for StringStreamError

Source§

impl StructuralPartialEq for StringStreamError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.