Crates.io | inverted-index-util |
lib.rs | inverted-index-util |
version | 0.0.5 |
source | src |
created_at | 2020-03-13 01:47:14.40744 |
updated_at | 2020-03-16 22:56:54.562598 |
description | Utilities for implementing an inverted index |
homepage | |
repository | https://github.com/mindbeam/inverted-index-util |
max_upload_size | |
id | 217997 |
size | 22,938 |
This crate provides utilities for implementing inverted indexes
use inverted_index_util::entity_list::insert_entity_mut;
use typenum::consts::U16;
let mut entity_list: Vec<u8> = Vec::new();
insert_entity_mut::<U16>(&mut entity_list, b"aaaaaaaaaaaaaaaa");
insert_entity_mut::<U16>(&mut entity_list, b"cccccccccccccccc");
insert_entity_mut::<U16>(&mut entity_list, b"aaaaaaaaaaaaaaaa");
insert_entity_mut::<U16>(&mut entity_list, b"bbbbbbbbbbbbbbbb");
assert_eq!(
&entity_list[..],
&b"aaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbcccccccccccccccc"[..]
);