sudachi::error

Enum SudachiNomError

source
pub enum SudachiNomError<I> {
    Utf16String,
    Nom(I, ErrorKind),
    OutOfBounds(String, usize, usize),
}
Expand description

Custum nom error

Variants§

§

Utf16String

Failed to parse utf16 string

§

Nom(I, ErrorKind)

§

OutOfBounds(String, usize, usize)

Trait Implementations§

source§

impl<I: Debug> Debug for SudachiNomError<I>

source§

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

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

impl<I> ParseError<I> for SudachiNomError<I>

source§

fn from_error_kind(input: I, kind: ErrorKind) -> Self

Creates an error from the input position and an [ErrorKind]
source§

fn append(_: I, _: ErrorKind, other: Self) -> Self

Combines an existing error with a new one created from the input position and an [ErrorKind]. This is useful when backtracking through a parse tree, accumulating error context on the way
§

fn from_char(input: I, _: char) -> Self

Creates an error from an input position and an expected character
§

fn or(self, other: Self) -> Self

Combines two existing errors. This function is used to compare errors generated in various branches of alt.
source§

impl<I: PartialEq> PartialEq for SudachiNomError<I>

source§

fn eq(&self, other: &SudachiNomError<I>) -> 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<I> StructuralPartialEq for SudachiNomError<I>

Auto Trait Implementations§

§

impl<I> Freeze for SudachiNomError<I>
where I: Freeze,

§

impl<I> RefUnwindSafe for SudachiNomError<I>
where I: RefUnwindSafe,

§

impl<I> Send for SudachiNomError<I>
where I: Send,

§

impl<I> Sync for SudachiNomError<I>
where I: Sync,

§

impl<I> Unpin for SudachiNomError<I>
where I: Unpin,

§

impl<I> UnwindSafe for SudachiNomError<I>
where I: UnwindSafe,

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> 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, 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.