pub enum SystemGroup {
Embedded(System<HashCache, Master>),
Redis(System<RedisCache, Master>),
}Expand description
Represents mCaptcha cache and master system. When Redis is configured, SystemGroup::Redis is used and in its absence, SystemGroup::Embedded is used
Variants§
Implementations§
Source§impl SystemGroup
impl SystemGroup
pub async fn get_pow(&self, msg: String) -> CaptchaResult<Option<PoWConfig>>
pub async fn verify_pow( &self, msg: Work, ip: String, ) -> CaptchaResult<(String, u32)>
pub async fn validate_verification_tokens( &self, msg: VerifyCaptchaResult, ) -> CaptchaResult<bool>
pub async fn add_site(&self, msg: AddSite) -> Result<(), ServiceError>
pub async fn rename(&self, msg: Rename) -> Result<(), ServiceError>
pub async fn remove(&self, msg: RemoveCaptcha) -> Result<(), ServiceError>
fn new_system<A: Save, B: MasterTrait>( s: &Settings, m: Addr<B>, c: Addr<A>, ) -> System<A, B>
async fn new(s: &Settings) -> Self
Auto Trait Implementations§
impl Freeze for SystemGroup
impl !RefUnwindSafe for SystemGroup
impl Send for SystemGroup
impl Sync for SystemGroup
impl Unpin for SystemGroup
impl !UnwindSafe for SystemGroup
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
§impl<T> Chain<T> for T
impl<T> Chain<T> for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more