pub struct RedisAdapterCtr<R> { /* private fields */ }
Expand description
The adapter constructor. For each namespace you define, a new adapter instance is created from this constructor.
Implementations§
Source§impl RedisAdapterCtr<RedisDriver>
impl RedisAdapterCtr<RedisDriver>
Sourcepub async fn new_with_redis(client: &Client) -> RedisResult<Self>
Available on crate feature redis
only.
pub async fn new_with_redis(client: &Client) -> RedisResult<Self>
redis
only.Create a new adapter constructor with the redis
driver and a default config.
Sourcepub async fn new_with_redis_config(
client: &Client,
config: RedisAdapterConfig,
) -> RedisResult<Self>
Available on crate feature redis
only.
pub async fn new_with_redis_config( client: &Client, config: RedisAdapterConfig, ) -> RedisResult<Self>
redis
only.Create a new adapter constructor with the redis
driver and a custom config.
Source§impl RedisAdapterCtr<ClusterDriver>
impl RedisAdapterCtr<ClusterDriver>
Sourcepub async fn new_with_cluster(client: &ClusterClient) -> RedisResult<Self>
Available on crate feature redis-cluster
only.
pub async fn new_with_cluster(client: &ClusterClient) -> RedisResult<Self>
redis-cluster
only.Create a new adapter constructor with the redis
driver and a default config.
Sourcepub async fn new_with_cluster_config(
client: &ClusterClient,
config: RedisAdapterConfig,
) -> RedisResult<Self>
Available on crate feature redis-cluster
only.
pub async fn new_with_cluster_config( client: &ClusterClient, config: RedisAdapterConfig, ) -> RedisResult<Self>
redis-cluster
only.Create a new adapter constructor with the redis
driver and a default config.
Source§impl RedisAdapterCtr<FredDriver>
impl RedisAdapterCtr<FredDriver>
Sourcepub async fn new_with_fred(client: SubscriberClient) -> FredResult<Self>
Available on crate feature fred
only.
pub async fn new_with_fred(client: SubscriberClient) -> FredResult<Self>
fred
only.Create a new adapter constructor with the default fred
driver and a default config.
Sourcepub async fn new_with_fred_config(
client: SubscriberClient,
config: RedisAdapterConfig,
) -> FredResult<Self>
Available on crate feature fred
only.
pub async fn new_with_fred_config( client: SubscriberClient, config: RedisAdapterConfig, ) -> FredResult<Self>
fred
only.Create a new adapter constructor with the default fred
driver and a custom config.
Source§impl<R: Driver> RedisAdapterCtr<R>
impl<R: Driver> RedisAdapterCtr<R>
Sourcepub fn new_with_driver(
driver: R,
config: RedisAdapterConfig,
) -> RedisAdapterCtr<R>
pub fn new_with_driver( driver: R, config: RedisAdapterConfig, ) -> RedisAdapterCtr<R>
Trait Implementations§
Auto Trait Implementations§
impl<R> Freeze for RedisAdapterCtr<R>where
R: Freeze,
impl<R> RefUnwindSafe for RedisAdapterCtr<R>where
R: RefUnwindSafe,
impl<R> Send for RedisAdapterCtr<R>where
R: Send,
impl<R> Sync for RedisAdapterCtr<R>where
R: Sync,
impl<R> Unpin for RedisAdapterCtr<R>where
R: Unpin,
impl<R> UnwindSafe for RedisAdapterCtr<R>where
R: UnwindSafe,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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