Struct libmcaptcha::redis::mcaptcha_redis::MCaptchaRedis
source · pub struct MCaptchaRedis(_);
Expand description
Redis instance with mCaptcha Redis module loaded
Implementations§
source§impl MCaptchaRedis
impl MCaptchaRedis
sourcepub async fn new(redis: RedisConfig) -> CaptchaResult<Self>
pub async fn new(redis: RedisConfig) -> CaptchaResult<Self>
Get new MCaptchaRedis. Use this when executing commands that are only supported by mCaptcha Redis module. Internally, when object is created, checks are performed to check if the module is loaded and if the required commands are available
sourcepub fn get_client(&self) -> MCaptchaRedisConnection
pub fn get_client(&self) -> MCaptchaRedisConnection
Get connection to a Redis instance with mCaptcha Redis module loaded
Uses interior mutability so look out for panics!
Trait Implementations§
source§impl Clone for MCaptchaRedis
impl Clone for MCaptchaRedis
source§fn clone(&self) -> MCaptchaRedis
fn clone(&self) -> MCaptchaRedis
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for MCaptchaRedis
impl !Send for MCaptchaRedis
impl !Sync for MCaptchaRedis
impl Unpin for MCaptchaRedis
impl !UnwindSafe for MCaptchaRedis
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