Enum mcaptcha::data::SystemGroup
source · 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 !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