Trait VectorEngine

Source
pub trait VectorEngine<T>
where T: Serialize + for<'de> Deserialize<'de> + 'static + Debug + Clone + Send + Sync,
{ // Required methods fn new( structural_repository: String, dynamic_repository: String, initial_file_size: u64, ) -> Self; fn push(&self, obj: T); fn pushx(&self, objs: Vec<T>); fn pull(&self, index: u64) -> T; fn pullx(&self, index: u64, count: u64) -> Vec<T>; fn len(&self) -> usize; // Provided methods fn is_empty(&self) -> bool { ... } fn get(&self, index: u64) -> Option<T> { ... } fn getx(&self, index: u64, count: u64) -> Option<Vec<T>> { ... } fn getall(&self) -> Option<Vec<T>> { ... } }

Required Methods§

Source

fn new( structural_repository: String, dynamic_repository: String, initial_file_size: u64, ) -> Self

Source

fn push(&self, obj: T)

Source

fn pushx(&self, objs: Vec<T>)

Source

fn pull(&self, index: u64) -> T

Source

fn pullx(&self, index: u64, count: u64) -> Vec<T>

Source

fn len(&self) -> usize

Provided Methods§

Source

fn is_empty(&self) -> bool

Source

fn get(&self, index: u64) -> Option<T>

Source

fn getx(&self, index: u64, count: u64) -> Option<Vec<T>>

Source

fn getall(&self) -> Option<Vec<T>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<D, T> VectorEngine<T> for ReadableCache<D, T>
where D: VectorEngine<T> + 'static + Send + Sync, T: Serialize + for<'de> Deserialize<'de> + 'static + Debug + Clone + Send + Sync,

Source§

impl<D, T> VectorEngine<T> for WritableCache<D, T>
where D: VectorEngine<T> + 'static + Send + Sync, T: Serialize + for<'de> Deserialize<'de> + 'static + Debug + Clone + Send + Sync,

Source§

impl<T> VectorEngine<T> for DynamicVectorManageService<T>
where T: Serialize + for<'de> Deserialize<'de> + 'static + Debug + Clone + Send + Sync,

Source§

impl<T> VectorEngine<T> for StaticVectorManageService<T>
where T: Serialize + for<'de> Deserialize<'de> + 'static + Debug + Clone + Send + Sync,