Trait exmex::MatchLiteral

source ·
pub trait MatchLiteral: Clone + Debug {
    // Required method
    fn is_literal(text: &str) -> Option<&str>;
}
Expand description

Implement this trait to create a matcher for custom literals of operands.

Required Methods§

source

fn is_literal(text: &str) -> Option<&str>

This method is expected to return Some(matching_str) in case of a match of a literal at the beginning of the input and None otherwise.

Object Safety§

This trait is not object safe.

Implementors§