Struct libmcaptcha::redis::mcaptcha_redis::MCaptchaRedisConnection
source · pub struct MCaptchaRedisConnection(_);
Expand description
Connection to Redis instance with mCaptcha Redis module loaded
Implementations§
source§impl MCaptchaRedisConnection
impl MCaptchaRedisConnection
sourcepub async fn add_visitor(
&self,
msg: AddVisitor
) -> CaptchaResult<Option<AddVisitorResult>>
pub async fn add_visitor( &self, msg: AddVisitor ) -> CaptchaResult<Option<AddVisitorResult>>
Add visitor
sourcepub async fn add_mcaptcha(&self, msg: AddSite) -> CaptchaResult<()>
pub async fn add_mcaptcha(&self, msg: AddSite) -> CaptchaResult<()>
Register new mCaptcha with Redis
sourcepub async fn check_captcha_exists(&self, captcha: &str) -> CaptchaResult<bool>
pub async fn check_captcha_exists(&self, captcha: &str) -> CaptchaResult<bool>
Check if an mCaptcha object is available in Redis
sourcepub async fn delete_captcha(&self, captcha: &str) -> CaptchaResult<()>
pub async fn delete_captcha(&self, captcha: &str) -> CaptchaResult<()>
Delete an mCaptcha object from Redis
sourcepub async fn rename_captcha(
&self,
name: &str,
rename_to: &str
) -> CaptchaResult<()>
pub async fn rename_captcha( &self, name: &str, rename_to: &str ) -> CaptchaResult<()>
Rename mCaptcha object in Redis
sourcepub async fn add_challenge(
&self,
captcha: &str,
challlenge: &AddChallenge
) -> CaptchaResult<()>
pub async fn add_challenge( &self, captcha: &str, challlenge: &AddChallenge ) -> CaptchaResult<()>
Add PoW Challenge object to Redis
sourcepub async fn get_challenge(
&self,
msg: &VerifyCaptchaResult
) -> CaptchaResult<AddVisitorResult>
pub async fn get_challenge( &self, msg: &VerifyCaptchaResult ) -> CaptchaResult<AddVisitorResult>
Get PoW Challenge object from Redis
sourcepub async fn delete_challenge(
&self,
msg: &VerifyCaptchaResult
) -> CaptchaResult<()>
pub async fn delete_challenge( &self, msg: &VerifyCaptchaResult ) -> CaptchaResult<()>
Delete PoW Challenge object from Redis
sourcepub async fn get_visitors(&self, captcha: &str) -> CaptchaResult<usize>
pub async fn get_visitors(&self, captcha: &str) -> CaptchaResult<usize>
Get number of visitors of an mCaptcha object from Redis
sourcepub async fn add_token(&self, msg: &CacheResult) -> CaptchaResult<()>
pub async fn add_token(&self, msg: &CacheResult) -> CaptchaResult<()>
Add PoW Token object to Redis
sourcepub async fn get_token(&self, msg: &VerifyCaptchaResult) -> CaptchaResult<bool>
pub async fn get_token(&self, msg: &VerifyCaptchaResult) -> CaptchaResult<bool>
Get PoW Token object to Redis
sourcepub async fn delete_token(&self, msg: &VerifyCaptchaResult) -> CaptchaResult<()>
pub async fn delete_token(&self, msg: &VerifyCaptchaResult) -> CaptchaResult<()>
Delete PoW Token object from Redis
Auto Trait Implementations§
impl !RefUnwindSafe for MCaptchaRedisConnection
impl !Send for MCaptchaRedisConnection
impl !Sync for MCaptchaRedisConnection
impl Unpin for MCaptchaRedisConnection
impl !UnwindSafe for MCaptchaRedisConnection
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