2018-05-05 16:59:03 +08:00
|
|
|
#[macro_use] extern crate serde_derive;
|
2018-04-22 23:34:41 +08:00
|
|
|
extern crate bincode;
|
2018-04-22 21:54:34 +08:00
|
|
|
extern crate fst;
|
2018-05-13 18:38:24 +08:00
|
|
|
extern crate levenshtein_automata;
|
2018-05-05 16:59:03 +08:00
|
|
|
extern crate serde;
|
2018-04-22 21:54:34 +08:00
|
|
|
|
2018-05-12 19:28:43 +08:00
|
|
|
pub mod map;
|
2018-05-13 18:38:24 +08:00
|
|
|
mod levenshtein;
|
2018-04-22 21:54:34 +08:00
|
|
|
|
2018-05-12 19:22:07 +08:00
|
|
|
pub use self::map::{Map, MapBuilder, Values};
|
|
|
|
pub use self::map::{
|
2018-05-06 18:23:42 +08:00
|
|
|
OpBuilder, IndexedValues,
|
|
|
|
OpWithStateBuilder, IndexedValuesWithState,
|
|
|
|
};
|
2018-05-13 18:38:24 +08:00
|
|
|
|
|
|
|
pub use self::levenshtein::LevBuilder;
|
2018-05-13 21:12:15 +08:00
|
|
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize)]
|
|
|
|
pub struct Value {
|
|
|
|
pub id: u64,
|
|
|
|
pub attr_index: AttrIndex,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize)]
|
|
|
|
pub struct AttrIndex {
|
|
|
|
pub attribute: u8,
|
|
|
|
pub index: u64,
|
|
|
|
}
|