Skip to main content

TokenSet

Trait TokenSet 

Source
pub trait TokenSet: Send + Sync {
    // Required methods
    fn canonicalize(&self, token: &str) -> Option<&'static str>;
    fn is_trigraph(&self, token: &str) -> bool;
}
Expand description

Minimal interface the parser needs from the token set. Implemented by CapcoTokenSet; injected at engine init.

Required Methods§

Source

fn canonicalize(&self, token: &str) -> Option<&'static str>

Returns the canonical token string if token is a known CVE value.

Source

fn is_trigraph(&self, token: &str) -> bool

Returns true if token is a known country trigraph.

Implementors§