pub struct WritableCache<D, T>where
D: VectorEngine<T> + Sync + Send + 'static,
T: Serialize + for<'de> Deserialize<'de> + 'static + Debug + Clone + Send + Sync,{ /* private fields */ }
Implementations§
Source§impl<D, T> WritableCache<D, T>where
D: VectorEngine<T> + Sync + Send + 'static,
T: Serialize + for<'de> Deserialize<'de> + 'static + Debug + Clone + Send + Sync,
impl<D, T> WritableCache<D, T>where
D: VectorEngine<T> + Sync + Send + 'static,
T: Serialize + for<'de> Deserialize<'de> + 'static + Debug + Clone + Send + Sync,
pub fn new( static_repository: String, dynamic_repository: String, initial_size_if_not_exists: u64, ) -> Self
pub fn push(&self, obj: T)
pub fn pushx(&self, objs: Vec<T>)
pub fn get_base_len(&self) -> usize
pub fn get_cache_len(&self) -> usize
pub fn getting_obj_from_cache(&self, index: u64) -> T
pub fn getting_objs_from_cache(&self, index: u64, count: u64) -> Vec<T>
pub fn get_each_len(&self) -> (u64, u64, u64)
pub fn get_obj_from_cache(&self, index: u64) -> Option<T>
pub fn get_objs_from_cache(&self, index: u64, count: u64) -> Option<Vec<T>>
Trait Implementations§
Source§impl<D, T> Drop for WritableCache<D, T>where
D: VectorEngine<T> + Sync + Send + 'static,
T: Serialize + for<'de> Deserialize<'de> + 'static + Debug + Clone + Send + Sync,
impl<D, T> Drop for WritableCache<D, T>where
D: VectorEngine<T> + Sync + Send + 'static,
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,
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,
fn new( static_repository: String, dynamic_repository: String, initial_size_if_not_exists: u64, ) -> Self
fn len(&self) -> usize
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 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>>
Auto Trait Implementations§
impl<D, T> Freeze for WritableCache<D, T>
impl<D, T> RefUnwindSafe for WritableCache<D, T>
impl<D, T> Send for WritableCache<D, T>
impl<D, T> Sync for WritableCache<D, T>
impl<D, T> Unpin for WritableCache<D, T>
impl<D, T> UnwindSafe for WritableCache<D, T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more