[][src]Trait rusty_grammar::WordBank

pub trait WordBank {
    fn lookup(&self, word: &str) -> &str;
}

The trait for a wordbank. For a struct to be a wordbank it must implment these methods.

Required methods

fn lookup(&self, word: &str) -> &str

The lookup function takes whatever struct you have given a word and looks up the type of word it is. i.e. noun.

Loading content...

Implementors

Loading content...