lindenmayer_system/
lib.rs1pub mod parametric;
2
3use std::fmt::Debug;
4
5pub trait Alphabet: Debug + PartialEq + Eq + Clone {}
7
8impl Alphabet for &'static str {}
9impl Alphabet for char {}
10impl Alphabet for u8 {}
11impl Alphabet for u16 {}
12impl Alphabet for u32 {}
13impl Alphabet for u64 {}
14impl Alphabet for usize {}
15
16pub trait DualAlphabet: Alphabet {
19 type Terminal;
20 type NonTerminal: PartialOrd + Ord + Clone;
21
22 fn nonterminal(&self) -> Option<&Self::NonTerminal>;
24
25 fn terminal(&self) -> Option<&Self::Terminal>;
27}