2018-11-08 19:05:59 +08:00
|
|
|
mod doc_ids;
|
|
|
|
mod doc_indexes;
|
2019-02-17 01:56:26 +08:00
|
|
|
mod shared_data;
|
2018-11-08 19:05:59 +08:00
|
|
|
|
2019-01-01 01:33:59 +08:00
|
|
|
use std::slice::from_raw_parts;
|
|
|
|
use std::mem::size_of;
|
2018-11-08 19:05:59 +08:00
|
|
|
|
2018-11-30 21:31:46 +08:00
|
|
|
pub use self::doc_ids::DocIds;
|
2018-12-01 18:35:16 +08:00
|
|
|
pub use self::doc_indexes::{DocIndexes, DocIndexesBuilder};
|
2019-02-17 01:56:26 +08:00
|
|
|
pub use self::shared_data::SharedData;
|
2019-01-01 01:33:59 +08:00
|
|
|
|
|
|
|
unsafe fn into_u8_slice<T: Sized>(slice: &[T]) -> &[u8] {
|
|
|
|
let ptr = slice.as_ptr() as *const u8;
|
|
|
|
let len = slice.len() * size_of::<T>();
|
|
|
|
from_raw_parts(ptr, len)
|
|
|
|
}
|