Struct m_captcha::mcaptcha::MCaptcha[][src]

pub struct MCaptcha { /* fields omitted */ }

This struct represents the mCaptcha state and is used to configure leaky-bucket lifetime and manage defense

Implementations

impl MCaptcha[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

Trait Implementations

impl Actor for MCaptcha[src]

type Context = Context<Self>

Actor execution context type

impl Clone for MCaptcha[src]

impl Debug for MCaptcha[src]

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

impl Handler<AddVisitor> for MCaptcha[src]

type Result = MessageResult<AddVisitor>

The type of value that this handler will return. Read more

impl Handler<GetCurrentVisitorCount> for MCaptcha[src]

type Result = MessageResult<GetCurrentVisitorCount>

The type of value that this handler will return. Read more

impl Handler<Stop> for MCaptcha[src]

type Result = ()

The type of value that this handler will return. Read more

impl Serialize for MCaptcha[src]

Auto Trait Implementations

impl RefUnwindSafe for MCaptcha[src]

impl Send for MCaptcha[src]

impl Sync for MCaptcha[src]

impl Unpin for MCaptcha[src]

impl UnwindSafe for MCaptcha[src]

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> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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>,