pub struct Redis { /* private fields */ }
Implementations§
Source§impl Redis
impl Redis
pub fn new() -> Result<Self>
pub fn config(&self) -> &RedisConfig
pub fn client(&self) -> &Client
pub fn pool(&self) -> Arc<Pool>
pub async fn connect(&self) -> Result<Connection, PoolError>
pub async fn cleanup(&self) -> Result<()>
pub async fn lock( &self, key: &str, ttl: usize, retry_count: u32, retry_delay: u32, ) -> Result<Lock, Error>
pub async fn unlock(&self, key: &str, lock_id: &str) -> Result<i64, Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Redis
impl !RefUnwindSafe for Redis
impl Send for Redis
impl Sync for Redis
impl Unpin for Redis
impl !UnwindSafe for Redis
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