Skip to main content

Format

Trait Format 

Source
pub trait Format {
    // Required methods
    fn nonterminal_delimiter() -> Option<(char, char)>;
    fn production_separator() -> &'static str;
    fn alternative_separator() -> char;

    // Provided method
    fn production_start_char() -> Option<char> { ... }
}

Required Methods§

Provided Methods§

Source

fn production_start_char() -> Option<char>

If Some(c), production boundaries can be detected by this character after whitespace (e.g. BNF uses '<'), avoiding a full prod_lhs parse as lookahead.

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§