pub struct RedisConnection {
pub client: Client,
pub connection: MultiplexedConnection,
}
Fields§
§client: Client
§connection: MultiplexedConnection
Implementations§
Source§impl RedisConnection
impl RedisConnection
pub async fn connect( host: &str, port: u16, database: &str, username: &str, password: &str, ) -> Result<RedisConnection>
pub async fn list_keys(&mut self, pattern: Option<&str>) -> Result<Vec<String>>
pub async fn get_key_info(&mut self, key: &str) -> Result<KeyInfo>
pub async fn get_string_value(&mut self, key: &str) -> Result<String>
pub async fn get_list_values( &mut self, key: &str, start: isize, end: isize, ) -> Result<Vec<String>>
pub async fn get_set_values(&mut self, key: &str) -> Result<Vec<String>>
pub async fn get_hash_values( &mut self, key: &str, ) -> Result<HashMap<String, String>>
pub async fn get_sorted_set_values( &mut self, key: &str, start: isize, end: isize, ) -> Result<Vec<(String, f64)>>
pub async fn ping(&mut self) -> Result<String>
pub async fn info(&mut self) -> Result<HashMap<String, String>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RedisConnection
impl RefUnwindSafe for RedisConnection
impl Send for RedisConnection
impl Sync for RedisConnection
impl Unpin for RedisConnection
impl UnwindSafe for RedisConnection
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> 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