Struct cache::mcaptcha::MCaptcha [−][src]
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]
key: &RedisKeyWritable
) -> Result<Option<&mut Self>, CacheError>
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]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,