pub struct RedisDAL {
pub con: Option<Connection>,
}Fields§
§con: Option<Connection>Implementations§
Source§impl RedisDAL
impl RedisDAL
pub async fn new(conf: RedisSettings) -> RustiumResult<Self>
Trait Implementations§
Source§impl IKvDal for RedisDAL
impl IKvDal for RedisDAL
fn get<'life0, 'life1, 'async_trait>(
&'life0 mut self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = RustiumResult<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn set<'life0, 'life1, 'async_trait>(
&'life0 mut self,
key: &'life1 str,
val: u64,
exp: SetExpiry,
) -> Pin<Box<dyn Future<Output = RustiumResult<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl Injectable for RedisDAL
impl Injectable for RedisDAL
Source§fn inject(lifetime: ServiceLifetime) -> InjectBuilder
fn inject(lifetime: ServiceLifetime) -> InjectBuilder
Source§fn singleton() -> InjectBuilder
fn singleton() -> InjectBuilder
Creates and returns a builder for a singleton injected type.
Source§fn scoped() -> InjectBuilder
fn scoped() -> InjectBuilder
Creates and returns a builder for a scoped injected type.
Source§fn transient() -> InjectBuilder
fn transient() -> InjectBuilder
Creates and returns a builder for a transient injected type.
Auto Trait Implementations§
impl Freeze for RedisDAL
impl !RefUnwindSafe for RedisDAL
impl Send for RedisDAL
impl Sync for RedisDAL
impl Unpin for RedisDAL
impl !UnwindSafe for RedisDAL
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