Struct cache::mcaptcha::MCaptcha[][src]

pub struct MCaptcha {
    m: MCaptcha,
}

Fields

m: MCaptcha

Implementations

impl MCaptcha[src]

pub fn get_add_visitor_result(&self) -> AddVisitorResult[src]

fn new(m: CreateMCaptcha) -> Result<Self, CacheError>[src]

pub fn add_visitor(&mut self)[src]

increments the visitor count by one

pub fn decrement_visitor(&mut self)[src]

decrements the visitor count by one

pub fn get_difficulty(&self) -> u32[src]

get current difficulty factor

pub fn get_duration(&self) -> u64[src]

get MCaptcha’s lifetime

pub fn get_visitors(&self) -> u32[src]

get MCaptcha’s current visitor_threshold

pub fn decrement_visitor_by(&mut self, count: u32)[src]

decrement MCaptcha’s current visitor_threshold by specified count

pub fn get_mut_mcaptcha(
    key: &RedisKeyWritable
) -> Result<Option<&mut Self>, CacheError>
[src]

get mcaptcha from redis key writable

pub fn get_mcaptcha(key: &RedisKey) -> Result<Option<&Self>, CacheError>[src]

get mcaptcha from redis key

pub fn get_count(ctx: &Context, args: Vec<String>) -> RedisResult[src]

Get counter value

pub fn add_captcha(ctx: &Context, args: Vec<String>) -> RedisResult[src]

Add captcha to redis

pub fn captcha_exists(ctx: &Context, args: Vec<String>) -> RedisResult[src]

check if captcha exists

pub fn delete_captcha(ctx: &Context, args: Vec<String>) -> RedisResult[src]

Add captcha to redis

Trait Implementations

impl<'de> Deserialize<'de> for MCaptcha[src]

impl Serialize for MCaptcha[src]

Auto Trait Implementations

impl RefUnwindSafe for MCaptcha

impl Send for MCaptcha

impl Sync for MCaptcha

impl Unpin for MCaptcha

impl UnwindSafe for MCaptcha

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,