(&self, text: String)
| 11 | impl Encoding { |
| 12 | #[napi] |
| 13 | pub fn encode(&self, text: String) -> Vec<u32> { |
| 14 | self.encoding |
| 15 | .encode_with_special_tokens(&text) |
| 16 | .iter() |
| 17 | .map(|x| *x as u32) |
| 18 | .collect() |
| 19 | } |
| 20 | |
| 21 | #[napi] |
| 22 | pub fn decode(&self, tokens: Vec<u32>) -> Result<String, Error> { |