Skip to main content

opendict/
types.rs

1#[derive(Debug, Clone)]
2#[non_exhaustive]
3pub struct DictEntry {
4    pub type_id: char,
5    pub data: Vec<u8>,
6}
7
8impl DictEntry {
9    pub fn new(type_id: char, data: Vec<u8>) -> Self {
10        Self { type_id, data }
11    }
12}
13
14#[derive(Debug, Clone)]
15#[non_exhaustive]
16pub struct DictInfo {
17    pub name: String,
18    pub author: String,
19    pub description: String,
20    pub word_count: usize,
21}