pub struct Storage { /* private fields */ }
Implementations§
Source§impl Storage
impl Storage
pub fn extract(arg: Option<Value>) -> Result<Value, String>
pub fn extract_buffer(arg: Option<Value>) -> Result<Vec<u8>, String>
pub fn extract_string(arg: Option<Value>) -> Result<String, String>
pub fn extract_key(arg: Option<Value>) -> Result<Key, String>
pub fn extract_integer(arg: Option<Value>) -> Result<i64, String>
pub fn extract_unsigned_integer(arg: Option<Value>) -> Result<u64, String>
pub fn extract_float(arg: Option<Value>) -> Result<f64, String>
pub fn extract_index(arg: Option<Value>) -> Result<usize, String>
pub fn extract_bit(arg: Option<Value>) -> Result<bool, String>
Source§impl Storage
impl Storage
pub async fn strings_append(&self, args: Arguments) -> ExecResult
pub async fn strings_get(&self, args: Arguments) -> ExecResult
pub async fn strings_set(&mut self, args: Arguments) -> ExecResult
pub async fn strings_setex_impl( &mut self, key: Key, timepoint: SystemTime, value: Vec<u8>, ) -> ExecResult
pub async fn strings_setex(&mut self, args: Arguments) -> ExecResult
pub async fn strings_psetex(&mut self, args: Arguments) -> ExecResult
pub async fn strings_setnx(&mut self, args: Arguments) -> ExecResult
pub async fn strings_getset(&self, args: Arguments) -> ExecResult
pub async fn strings_len(&self, args: Arguments) -> ExecResult
pub async fn strings_incrby(&self, args: Arguments) -> ExecResult
pub async fn strings_decrby(&self, args: Arguments) -> ExecResult
pub async fn strings_incrby_float(&self, args: Arguments) -> ExecResult
pub async fn strings_bitcount(&self, args: Arguments) -> ExecResult
pub async fn strings_mget(&self, args: Arguments) -> ExecResult
pub async fn strings_mset(&self, args: Arguments) -> ExecResult
pub async fn strings_bitop(&self, args: Arguments) -> ExecResult
pub async fn strings_setbit(&self, args: Arguments) -> ExecResult
pub async fn strings_getbit(&self, args: Arguments) -> ExecResult
pub async fn strings_get_range(&self, args: Arguments) -> ExecResult
pub async fn strings_set_range(&self, args: Arguments) -> ExecResult
Source§impl Storage
impl Storage
pub async fn expire_key_at(&mut self, key: &Key, timepoint: SystemTime)
Source§impl Storage
impl Storage
pub async fn list_len(&self, args: Arguments) -> ExecResult
pub async fn list_lpush(&self, args: Arguments) -> ExecResult
pub async fn list_rpush(&self, args: Arguments) -> ExecResult
pub async fn list_lpushx(&self, args: Arguments) -> ExecResult
pub async fn list_rpushx(&self, args: Arguments) -> ExecResult
pub async fn list_lpop(&self, args: Arguments) -> ExecResult
pub async fn list_rpop(&self, args: Arguments) -> ExecResult
pub async fn list_rem(&self, args: Arguments) -> ExecResult
pub async fn list_set(&self, args: Arguments) -> ExecResult
pub async fn list_index(&self, args: Arguments) -> ExecResult
pub async fn list_range(&self, args: Arguments) -> ExecResult
pub async fn list_insert(&self, args: Arguments) -> ExecResult
pub async fn list_trim(&self, args: Arguments) -> ExecResult
pub async fn _list_rpop_lpush(&self, args: Arguments) -> ExecResult
Source§impl Storage
impl Storage
pub fn make_container(cnt: Container) -> Arc<Mutex<Container>>
pub fn make_container_with<F: FnMut() -> Container>( factory: F, ) -> Arc<Mutex<Container>>
pub async fn try_get_container( &self, key: &Key, ) -> Option<Arc<Mutex<Container>>>
pub async fn get_container<F: FnMut() -> Container>( &self, key: Key, factory: F, ) -> Arc<Mutex<Container>>
pub async fn try_get_containers( &self, keys: &Vec<Key>, ) -> Vec<Option<Arc<Mutex<Container>>>>
pub async fn get_containers<F: FnMut() -> Container>( &self, keys: Vec<Key>, factory: F, ) -> Vec<Arc<Mutex<Container>>>
pub async fn lock_all<'a, T: 'a>( writes: impl Iterator<Item = &'a Mutex<T>>, reads: impl Iterator<Item = Option<&'a Mutex<T>>>, ) -> (Vec<MutexGuard<'a, T>>, Vec<Option<MutexGuard<'a, T>>>)
pub async fn keys_keys(&self, args: Arguments) -> ExecResult
pub async fn keys_exists(&self, args: Arguments) -> ExecResult
pub async fn keys_now(&self, _args: Arguments) -> ExecResult
pub async fn keys_pnow(&self, _args: Arguments) -> ExecResult
pub async fn keys_del(&self, args: Arguments) -> ExecResult
pub async fn keys_rename(&mut self, args: Arguments) -> ExecResult
pub async fn keys_type(&self, args: Arguments) -> ExecResult
pub async fn keys_pttl(&mut self, args: Arguments) -> ExecResult
pub async fn keys_ttl(&mut self, args: Arguments) -> ExecResult
pub async fn keys_expire(&mut self, args: Arguments) -> ExecResult
pub async fn keys_expire_at(&mut self, args: Arguments) -> ExecResult
pub async fn keys_pexpire(&mut self, args: Arguments) -> ExecResult
pub async fn keys_pexpire_at(&mut self, args: Arguments) -> ExecResult
pub async fn keys_check_expirations(&self)
pub async fn keys_scan(&self, args: Arguments) -> ExecResult
Source§impl Storage
impl Storage
pub async fn hash_set(&self, args: Arguments) -> ExecResult
pub async fn hash_set_nx(&self, args: Arguments) -> ExecResult
pub async fn hash_del(&self, args: Arguments) -> ExecResult
pub async fn hash_get(&self, args: Arguments) -> ExecResult
pub async fn hash_mget(&self, args: Arguments) -> ExecResult
pub async fn hash_get_all(&self, args: Arguments) -> ExecResult
pub async fn hash_exists(&self, args: Arguments) -> ExecResult
pub async fn hash_keys(&self, args: Arguments) -> ExecResult
pub async fn hash_values(&self, args: Arguments) -> ExecResult
pub async fn hash_len(&self, args: Arguments) -> ExecResult
pub async fn hash_strlen(&self, args: Arguments) -> ExecResult
pub async fn hash_incrby(&self, args: Arguments) -> ExecResult
pub async fn hash_incrbyfloat(&self, args: Arguments) -> ExecResult
pub async fn hash_scan(&self, args: Arguments) -> ExecResult
Source§impl Storage
impl Storage
pub async fn set_card(&self, args: Arguments) -> ExecResult
pub async fn set_members(&self, args: Arguments) -> ExecResult
pub async fn set_is_member(&self, args: Arguments) -> ExecResult
pub async fn set_add(&self, args: Arguments) -> ExecResult
pub async fn set_rem(&self, args: Arguments) -> ExecResult
pub async fn set_pop(&self, args: Arguments) -> ExecResult
pub async fn set_move(&self, args: Arguments) -> ExecResult
pub async fn set_diff(&self, args: Arguments) -> ExecResult
pub async fn set_diff_store(&self, args: Arguments) -> ExecResult
pub async fn set_inter(&self, args: Arguments) -> ExecResult
pub async fn set_inter_store(&self, args: Arguments) -> ExecResult
pub async fn set_union(&self, args: Arguments) -> ExecResult
pub async fn set_union_store(&self, args: Arguments) -> ExecResult
pub async fn _set_rand_member(&self, args: Arguments) -> ExecResult
pub async fn set_scan(&self, args: Arguments) -> ExecResult
Source§impl Storage
impl Storage
pub fn new() -> Self
pub fn set_expire_awaker<A>(&mut self, a: A)
pub async fn unimplemented(&self) -> ExecResult
pub async fn execute(&mut self, command: Command) -> Value
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Storage
impl !RefUnwindSafe for Storage
impl Send for Storage
impl Sync for Storage
impl Unpin for Storage
impl !UnwindSafe for Storage
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