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§
Sourcefn from_message(message: &str) -> Self
fn from_message(message: &str) -> Self
Generic error, should probably be ultimately removed
fn from_expected(position: usize, message: &str) -> Self
fn from_expected_eof(range: Range<usize>) -> Self
Sourcefn from_unexpected_eof(position: usize) -> Self
fn from_unexpected_eof(position: usize) -> Self
Creates error: Attempted to read a token when there are none remaining
fn from_unexpected_token( span: Range<usize>, expected: Lang::Kind, found: Lang::Kind, ) -> Self
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.