use std::marker::PhantomData;
use crate::blobstore::Blob;
use crate::common::universal_io::UniversalRead;
use super::Encodable;
use super::storage::read_only::ReadOnlyNumericIndexInner;
use crate::segment::index::field_index::numeric_point::Numericable;
use crate::segment::index::field_index::on_disk_point_to_values::StoredValue;
mod lifecycle;
mod live_reload;
mod read_ops;
mod value_retriever;
pub use value_retriever::NumericValueToJson;
pub struct ReadOnlyNumericIndex<
T: Encodable + Numericable + StoredValue + Send + Sync + Default,
P,
S: UniversalRead,
> where
Vec<T>: Blob,
{
pub(super) inner: ReadOnlyNumericIndexInner<T, S>,
pub(super) _phantom: PhantomData<P>,
}
impl<T: Encodable + Numericable + StoredValue + Send + Sync + Default, P, S: UniversalRead>
ReadOnlyNumericIndex<T, P, S>
where
Vec<T>: Blob,
{
pub fn inner(&self) -> &ReadOnlyNumericIndexInner<T, S> {
&self.inner
}
}