mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-08-02 19:59:58 +00:00
chore: Move index related things to the meilidb-core workspace member
This commit is contained in:
16
meilidb-core/src/data/mod.rs
Normal file
16
meilidb-core/src/data/mod.rs
Normal file
@ -0,0 +1,16 @@
|
||||
mod doc_ids;
|
||||
mod doc_indexes;
|
||||
mod shared_data;
|
||||
|
||||
use std::slice::from_raw_parts;
|
||||
use std::mem::size_of;
|
||||
|
||||
pub use self::doc_ids::DocIds;
|
||||
pub use self::doc_indexes::{DocIndexes, DocIndexesBuilder};
|
||||
pub use self::shared_data::SharedData;
|
||||
|
||||
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)
|
||||
}
|
Reference in New Issue
Block a user