pub struct ReadableCache<D, T>where
D: VectorEngine<T> + 'static + Send,
T: Serialize + for<'de> Deserialize<'de> + 'static + Debug + Clone + Send + Sync,{ /* private fields */ }
Implementations§
Source§impl<D, T> ReadableCache<D, T>where
D: VectorEngine<T> + 'static + Send,
T: Serialize + for<'de> Deserialize<'de> + 'static + Debug + Clone + Send + Sync,
impl<D, T> ReadableCache<D, T>where
D: VectorEngine<T> + 'static + Send,
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 getting(&self, index: u64) -> T
pub fn getting_lot(&self, index: u64, count: u64) -> Vec<T>
pub fn add_to_cache(&self, index: u64, data: T)
pub fn add_bulk_to_cache(&self, index: u64, objs: Vec<T>)
pub fn get_length(&self) -> usize
pub fn add(&self, obj: T)
pub fn add_bulk(&self, objs: Vec<T>)
Trait Implementations§
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,
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,
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 ReadableCache<D, T>where
D: Freeze,
impl<D, T> RefUnwindSafe for ReadableCache<D, T>where
D: RefUnwindSafe,
impl<D, T> Send for ReadableCache<D, T>
impl<D, T> Sync for ReadableCache<D, T>where
D: Sync,
impl<D, T> Unpin for ReadableCache<D, T>where
D: Unpin,
impl<D, T> UnwindSafe for ReadableCache<D, T>where
D: UnwindSafe,
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