Automatic instructions

This commit is contained in:
elvis
2025-07-12 02:42:28 +02:00
parent eeb4743e57
commit dcb1e63c35
6 changed files with 361 additions and 222 deletions

View File

@ -45,6 +45,10 @@ impl Translator {
id
}
pub fn encode_not_mut(&self, s: impl Into<String>) -> Option<IdType> {
self.strings.get(&s.into()).copied()
}
/// converts an id into the corresponding string
pub fn decode(&self, el: IdType) -> Option<String> {
self.reverse