pub enum StorageList {
Sled(SledStorageList),
Redis(RedisStorageList),
RedisCluster(RedisStorageList),
}
Expand description
Unified list implementation enum
Variants§
Sled(SledStorageList)
Sled list implementation
Redis(RedisStorageList)
Redis list implementation
RedisCluster(RedisStorageList)
Redis Cluster list implementation
Trait Implementations§
Source§impl Clone for StorageList
impl Clone for StorageList
Source§fn clone(&self) -> StorageList
fn clone(&self) -> StorageList
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for StorageList
impl Debug for StorageList
Source§impl List for StorageList
impl List for StorageList
Source§fn push<'life0, 'life1, 'async_trait, V>(
&'life0 self,
val: &'life1 V,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
fn push<'life0, 'life1, 'async_trait, V>( &'life0 self, val: &'life1 V, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
Appends a value to the end of the list
Source§fn pushs<'life0, 'async_trait, V>(
&'life0 self,
vals: Vec<V>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
fn pushs<'life0, 'async_trait, V>( &'life0 self, vals: Vec<V>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
Appends multiple values to the list
Source§fn push_limit<'life0, 'life1, 'async_trait, V>(
&'life0 self,
val: &'life1 V,
limit: usize,
pop_front_if_limited: bool,
) -> Pin<Box<dyn Future<Output = Result<Option<V>>> + Send + 'async_trait>>where
V: Serialize + Sync + Send + DeserializeOwned + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn push_limit<'life0, 'life1, 'async_trait, V>(
&'life0 self,
val: &'life1 V,
limit: usize,
pop_front_if_limited: bool,
) -> Pin<Box<dyn Future<Output = Result<Option<V>>> + Send + 'async_trait>>where
V: Serialize + Sync + Send + DeserializeOwned + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Pushes with size limit and optional pop-front behavior
Source§fn pop<'life0, 'async_trait, V>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<V>>> + Send + 'async_trait>>
fn pop<'life0, 'async_trait, V>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<V>>> + Send + 'async_trait>>
Removes and returns the first value in the list
Source§fn all<'life0, 'async_trait, V>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<V>>> + Send + 'async_trait>>
fn all<'life0, 'async_trait, V>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<V>>> + Send + 'async_trait>>
Retrieves all values in the list
Source§fn get_index<'life0, 'async_trait, V>(
&'life0 self,
idx: usize,
) -> Pin<Box<dyn Future<Output = Result<Option<V>>> + Send + 'async_trait>>
fn get_index<'life0, 'async_trait, V>( &'life0 self, idx: usize, ) -> Pin<Box<dyn Future<Output = Result<Option<V>>> + Send + 'async_trait>>
Gets value by index
Source§fn len<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn len<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets number of items in the list
Source§fn is_empty<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn is_empty<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Checks if list is empty
Source§fn clear<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Clears all items from the list
Source§fn iter<'a, 'async_trait, V>(
&'a mut self,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsyncIterator<Item = Result<V>> + Send + 'a>>> + Send + 'async_trait>>where
V: DeserializeOwned + Sync + Send + 'a + 'static + 'async_trait,
Self: 'async_trait,
'a: 'async_trait,
fn iter<'a, 'async_trait, V>(
&'a mut self,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsyncIterator<Item = Result<V>> + Send + 'a>>> + Send + 'async_trait>>where
V: DeserializeOwned + Sync + Send + 'a + 'static + 'async_trait,
Self: 'async_trait,
'a: 'async_trait,
Iterates over all values
Source§fn expire_at<'life0, 'async_trait>(
&'life0 self,
at: i64,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn expire_at<'life0, 'async_trait>(
&'life0 self,
at: i64,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sets expiration timestamp for the entire list (requires “ttl” feature)
Auto Trait Implementations§
impl Freeze for StorageList
impl !RefUnwindSafe for StorageList
impl Send for StorageList
impl Sync for StorageList
impl Unpin for StorageList
impl !UnwindSafe for StorageList
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