pub struct RedisExecutorSync(/* private fields */);
Expand description
Actor to give to Actix to do the background processing of Redis messages
Implementations§
Source§impl RedisExecutorSync
impl RedisExecutorSync
Sourcepub fn start<F>(threads: usize, client_factory: F) -> Addr<Self>
pub fn start<F>(threads: usize, client_factory: F) -> Addr<Self>
Starts the executor. Give it a number of threads and a factory Fn() -> redis::Client
that handles client creation and you’re good to go.
Sourcepub fn get_connection(&self) -> Result<Connection, ActixRedisClientError>
pub fn get_connection(&self) -> Result<Connection, ActixRedisClientError>
Accessor to retrieve current Redis connection
Sourcepub fn get_pubsub(&self) -> Result<PubSub, ActixRedisClientError>
pub fn get_pubsub(&self) -> Result<PubSub, ActixRedisClientError>
Accessor to retrieve current PubSub Redis connection
Trait Implementations§
Source§impl Actor for RedisExecutorSync
impl Actor for RedisExecutorSync
Source§type Context = SyncContext<RedisExecutorSync>
type Context = SyncContext<RedisExecutorSync>
Actor execution context type
Source§fn started(&mut self, ctx: &mut Self::Context)
fn started(&mut self, ctx: &mut Self::Context)
Method is called when actor get polled first time.
Source§fn stopping(&mut self, ctx: &mut Self::Context) -> Running
fn stopping(&mut self, ctx: &mut Self::Context) -> Running
Method is called after an actor is in
Actor::Stopping
state. There
could be several reasons for stopping. Context::stop
get called
by the actor itself. All addresses to current actor get dropped and
no more evented objects left in the context. Read moreSource§impl<T: FromRedisValue + 'static> Handler<Command<T>> for RedisExecutorSync
impl<T: FromRedisValue + 'static> Handler<Command<T>> for RedisExecutorSync
Auto Trait Implementations§
impl Freeze for RedisExecutorSync
impl RefUnwindSafe for RedisExecutorSync
impl Send for RedisExecutorSync
impl Sync for RedisExecutorSync
impl Unpin for RedisExecutorSync
impl UnwindSafe for RedisExecutorSync
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