Struct libmcaptcha::cache::redis::RedisCache
source · pub struct RedisCache(_);
Implementations§
source§impl RedisCache
impl RedisCache
pub async fn new(redis: RedisConfig) -> CaptchaResult<Self>
Trait Implementations§
source§impl Actor for RedisCache
impl Actor for RedisCache
§type Context = Context<RedisCache>
type Context = Context<RedisCache>
Actor execution context type
§fn stopping(&mut self, ctx: &mut Self::Context) -> Running
fn stopping(&mut self, ctx: &mut Self::Context) -> Running
Called after an actor is in
Actor::Stopping
state. Read more§fn start(self) -> Addr<Self>where
Self: Actor<Context = Context<Self>>,
fn start(self) -> Addr<Self>where Self: Actor<Context = Context<Self>>,
Start a new asynchronous actor, returning its address. Read more
§fn start_in_arbiter<F>(wrk: &ArbiterHandle, f: F) -> Addr<Self>where
Self: Actor<Context = Context<Self>>,
F: FnOnce(&mut Context<Self>) -> Self + Send + 'static,
fn start_in_arbiter<F>(wrk: &ArbiterHandle, f: F) -> Addr<Self>where Self: Actor<Context = Context<Self>>, F: FnOnce(&mut Context<Self>) -> Self + Send + 'static,
Start new actor in arbiter’s thread.
source§impl Handler<CachePoW> for RedisCache
impl Handler<CachePoW> for RedisCache
cache a PoWConfig
source§impl Handler<CacheResult> for RedisCache
impl Handler<CacheResult> for RedisCache
cache PoW result
§type Result = MessageResult<CacheResult>
type Result = MessageResult<CacheResult>
The type of value that this handler will return. Read more
source§fn handle(&mut self, msg: CacheResult, ctx: &mut Self::Context) -> Self::Result
fn handle(&mut self, msg: CacheResult, ctx: &mut Self::Context) -> Self::Result
This method is called for every message received by this actor.
source§impl Handler<DeleteCaptchaResult> for RedisCache
impl Handler<DeleteCaptchaResult> for RedisCache
Delte a PoWConfig
§type Result = MessageResult<DeleteCaptchaResult>
type Result = MessageResult<DeleteCaptchaResult>
The type of value that this handler will return. Read more
source§fn handle(
&mut self,
_msg: DeleteCaptchaResult,
_ctx: &mut Self::Context
) -> Self::Result
fn handle( &mut self, _msg: DeleteCaptchaResult, _ctx: &mut Self::Context ) -> Self::Result
This method is called for every message received by this actor.
source§impl Handler<DeletePoW> for RedisCache
impl Handler<DeletePoW> for RedisCache
Delte a PoWConfig
source§impl Handler<RetrivePoW> for RedisCache
impl Handler<RetrivePoW> for RedisCache
Retrive PoW difficulty_factor for a PoW string
§type Result = MessageResult<RetrivePoW>
type Result = MessageResult<RetrivePoW>
The type of value that this handler will return. Read more
source§fn handle(&mut self, msg: RetrivePoW, ctx: &mut Self::Context) -> Self::Result
fn handle(&mut self, msg: RetrivePoW, ctx: &mut Self::Context) -> Self::Result
This method is called for every message received by this actor.
source§impl Handler<VerifyCaptchaResult> for RedisCache
impl Handler<VerifyCaptchaResult> for RedisCache
Retrive PoW difficulty_factor for a PoW string
§type Result = MessageResult<VerifyCaptchaResult>
type Result = MessageResult<VerifyCaptchaResult>
The type of value that this handler will return. Read more
source§fn handle(
&mut self,
msg: VerifyCaptchaResult,
ctx: &mut Self::Context
) -> Self::Result
fn handle( &mut self, msg: VerifyCaptchaResult, ctx: &mut Self::Context ) -> Self::Result
This method is called for every message received by this actor.
impl Save for RedisCache
Auto Trait Implementations§
impl !RefUnwindSafe for RedisCache
impl !Send for RedisCache
impl !Sync for RedisCache
impl Unpin for RedisCache
impl !UnwindSafe for RedisCache
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