rowan_nom

Trait RowanNomError

Source
pub trait RowanNomError<Lang: Language> {
    // Required methods
    fn from_message(message: &str) -> Self;
    fn from_expected(position: usize, message: &str) -> Self;
    fn from_expected_eof(range: Range<usize>) -> Self;
    fn from_unexpected_eof(position: usize) -> Self;
    fn from_unexpected_token(
        span: Range<usize>,
        expected: Lang::Kind,
        found: Lang::Kind,
    ) -> Self;
    fn with_context(self, ctx: &'static str) -> Self;
}

Required Methods§

Source

fn from_message(message: &str) -> Self

Generic error, should probably be ultimately removed

Source

fn from_expected(position: usize, message: &str) -> Self

Source

fn from_expected_eof(range: Range<usize>) -> Self

Source

fn from_unexpected_eof(position: usize) -> Self

Creates error: Attempted to read a token when there are none remaining

Source

fn from_unexpected_token( span: Range<usize>, expected: Lang::Kind, found: Lang::Kind, ) -> Self

Source

fn with_context(self, ctx: &'static str) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§