Plaster
New
List
Login
rustsrc
default
isoraqathedh
2022.08.17 06:19:26
trait LaTeXable { fn to_latex(self, lexicon : Lexicon) -> String; } struct Lexicon { catmins: Vec<Catmin>, maincats: Vec<Catsmaj>, catstars: Vec<Catstar>, // main_lexicon: Vec<dyn Root>, } impl Lexicon { fn from_hocon() -> Lexicon { Lexicon::new() } } impl LaTeXable for Lexicon { fn to_latex(self: Lexicon) -> String { "".to_string() } } struct Catmin { } struct Catsmaj { } struct Catmaj { } struct Catstar { } trait Root { fn sort_key(self) -> Vec<u16>; fn search_key(self) -> String; fn root(self) -> String; } struct Verb { root: String, sort_key: Vec<u16>, search_key: String, } impl Root for Verb { fn sort_key(self: Verb) -> Vec<u16> {self.sort_key} fn search_key(self: Verb) -> String {self.search_key} fn root(self: Verb) -> String {self.root} } impl LaTeXable for Verb { fn to_latex(self: Verb, _lexicon: Lexicon) -> String { "".to_string() } } fn main() -> anyhow::Result<()> { Ok(()) }
Raw
Annotate
Repaste