Struct libmcaptcha::redis::Redis
source · pub struct Redis { /* private fields */ }
Expand description
A Redis Client Object that encapsulates RedisClient and RedisConnection. Use this when you need a Redis Client
Implementations§
source§impl Redis
impl Redis
sourcepub async fn new(redis: RedisConfig) -> CaptchaResult<Self>
pub async fn new(redis: RedisConfig) -> CaptchaResult<Self>
create new Redis. Will try to connect to Redis instance specified in RedisConfig
sourcepub fn get_client(&self) -> RedisConnection
pub fn get_client(&self) -> RedisConnection
Get client to do interact with Redis server.
Uses Interior mutability so look out for panics
Trait Implementations§
Auto Trait Implementations§
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