Struct hitbox_redis::RedisBackend [−][src]
pub struct RedisBackend { /* fields omitted */ }
Expand description
Redis cache backend based on redis-rs crate.
This actor provides redis as storage Backend for hitbox. Its use one MultiplexedConnection for asynchronous network interaction.
Implementations
impl RedisBackend
[src]
impl RedisBackend
[src]pub async fn new() -> Result<RedisBackend, Error>
[src]
pub async fn new() -> Result<RedisBackend, Error>
[src]Create new backend instance with default settings.
Examples
use hitbox_redis::RedisBackend; #[actix_rt::main] async fn main() { let backend = RedisBackend::new().await; }
pub fn builder() -> RedisBackendBuilder
[src]
pub fn builder() -> RedisBackendBuilder
[src]Creates new RedisBackend builder with default settings.
Trait Implementations
impl Actor for RedisBackend
[src]
impl Actor for RedisBackend
[src]Implementation actix Actor trait for Redis cache backend.
fn stopping(&mut self, ctx: &mut Self::Context) -> Running
[src]
fn stopping(&mut self, ctx: &mut Self::Context) -> Running
[src]Called after an actor is in Actor::Stopping
state. Read more
fn start(self) -> Addr<Self> where
Self: Actor<Context = Context<Self>>,
[src]
fn start(self) -> Addr<Self> where
Self: Actor<Context = Context<Self>>,
[src]Start a new asynchronous actor, returning its address. Read more
fn start_default() -> Addr<Self> where
Self: Actor<Context = Context<Self>> + Default,
[src]
fn start_default() -> Addr<Self> where
Self: Actor<Context = Context<Self>> + Default,
[src]Construct and 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,
[src]
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,
[src]Start new actor in arbiter’s thread.
impl Backend for RedisBackend
[src]
impl Backend for RedisBackend
[src]impl Handler<Delete> for RedisBackend
[src]
impl Handler<Delete> for RedisBackend
[src]Implementation of Actix Handler for Delete message.
type Result = ResponseFuture<Result<DeleteStatus, BackendError>>
type Result = ResponseFuture<Result<DeleteStatus, BackendError>>
The type of value that this handler will return. Read more
impl Handler<Get> for RedisBackend
[src]
impl Handler<Get> for RedisBackend
[src]Implementation of Actix Handler for Get message.
impl Handler<Lock> for RedisBackend
[src]
impl Handler<Lock> for RedisBackend
[src]Implementation of Actix Handler for Lock message.
type Result = ResponseFuture<Result<LockStatus, BackendError>>
type Result = ResponseFuture<Result<LockStatus, BackendError>>
The type of value that this handler will return. Read more
impl Handler<Set> for RedisBackend
[src]
impl Handler<Set> for RedisBackend
[src]Implementation of Actix Handler for Set message.