pub trait KeyList {
// Required methods
fn list_get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = TribResult<List>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_append<'life0, 'life1, 'async_trait>(
&'life0 self,
kv: &'life1 KeyValue,
) -> Pin<Box<dyn Future<Output = TribResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_remove<'life0, 'life1, 'async_trait>(
&'life0 self,
kv: &'life1 KeyValue,
) -> Pin<Box<dyn Future<Output = TribResult<u32>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_keys<'life0, 'life1, 'async_trait>(
&'life0 self,
p: &'life1 Pattern,
) -> Pin<Box<dyn Future<Output = TribResult<List>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Key-list interfaces
Required Methods§
Sourcefn list_get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = TribResult<List>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = TribResult<List>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get the list. Empty if not set.
Sourcefn list_append<'life0, 'life1, 'async_trait>(
&'life0 self,
kv: &'life1 KeyValue,
) -> Pin<Box<dyn Future<Output = TribResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_append<'life0, 'life1, 'async_trait>(
&'life0 self,
kv: &'life1 KeyValue,
) -> Pin<Box<dyn Future<Output = TribResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Append a string to the list. return true when no error.
Sourcefn list_remove<'life0, 'life1, 'async_trait>(
&'life0 self,
kv: &'life1 KeyValue,
) -> Pin<Box<dyn Future<Output = TribResult<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_remove<'life0, 'life1, 'async_trait>(
&'life0 self,
kv: &'life1 KeyValue,
) -> Pin<Box<dyn Future<Output = TribResult<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Removes all elements that are equal to kv.value in list kv.key
returns the number of elements removed.
Sourcefn list_keys<'life0, 'life1, 'async_trait>(
&'life0 self,
p: &'life1 Pattern,
) -> Pin<Box<dyn Future<Output = TribResult<List>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_keys<'life0, 'life1, 'async_trait>(
&'life0 self,
p: &'life1 Pattern,
) -> Pin<Box<dyn Future<Output = TribResult<List>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List all the keys of non-empty lists, where the key matches the given pattern.