Skip to main content

ParseLiteral

Trait ParseLiteral 

Source
pub trait ParseLiteral: Parse {
    // Required method
    fn parse_string_literal(&self, pos: usize, literal: &str) -> RuleResult<()>;
}
Expand description

A parser input type supporting the "literal" syntax.

Required Methods§

Source

fn parse_string_literal(&self, pos: usize, literal: &str) -> RuleResult<()>

Attempt to match the literal string at pos, returning whether it matched or failed.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ParseLiteral for [u8]

Source§

fn parse_string_literal(&self, pos: usize, literal: &str) -> RuleResult<()>

Source§

impl ParseLiteral for str

Source§

fn parse_string_literal(&self, pos: usize, literal: &str) -> RuleResult<()>

Implementors§