Struct m_captcha::mcaptcha::MCaptcha [−][src]
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
pub fn started(&mut self, ctx: &mut Self::Context)
pub fn stopping(&mut self, ctx: &mut Self::Context) -> Running
pub fn stopped(&mut self, ctx: &mut Self::Context)
pub fn start(self) -> Addr<Self> where
Self: Actor<Context = Context<Self>>,
Self: Actor<Context = Context<Self>>,
pub fn start_default() -> Addr<Self> where
Self: Actor<Context = Context<Self>> + Default,
Self: Actor<Context = Context<Self>> + Default,
pub fn start_in_arbiter<F>(arb: &Arbiter, f: F) -> Addr<Self> where
Self: Actor<Context = Context<Self>>,
F: FnOnce(&mut Context<Self>) -> Self + Send + 'static,
Self: Actor<Context = Context<Self>>,
F: FnOnce(&mut Context<Self>) -> Self + Send + 'static,
pub fn create<F>(f: F) -> Addr<Self> where
Self: Actor<Context = Context<Self>>,
F: FnOnce(&mut Context<Self>) -> Self,
Self: Actor<Context = Context<Self>>,
F: FnOnce(&mut Context<Self>) -> Self,
impl Clone for MCaptcha
[src]
impl Debug for MCaptcha
[src]
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 Handler<AddVisitor> for MCaptcha
[src]
type Result = MessageResult<AddVisitor>
The type of value that this handler will return. Read more
fn handle(&mut self, _: AddVisitor, ctx: &mut Self::Context) -> Self::Result
[src]
impl Handler<GetCurrentVisitorCount> for MCaptcha
[src]
type Result = MessageResult<GetCurrentVisitorCount>
The type of value that this handler will return. Read more
fn handle(
&mut self,
_: GetCurrentVisitorCount,
_ctx: &mut Self::Context
) -> Self::Result
[src]
&mut self,
_: GetCurrentVisitorCount,
_ctx: &mut Self::Context
) -> Self::Result
impl Handler<Stop> for MCaptcha
[src]
type Result = ()
The type of value that this handler will return. Read more
fn handle(&mut self, _: Stop, ctx: &mut Self::Context) -> Self::Result
[src]
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]
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> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,