Struct wildland_databases::redis_client::RedisClient
source · pub struct RedisClient { /* private fields */ }
Implementations§
source§impl RedisClient
impl RedisClient
pub fn new( redis_url: impl ToString, key_prefix: Option<String> ) -> Result<Self, ClientCreationError>
pub fn with_prefix_ext(self, prefix_extension: impl Display) -> Self
pub fn find_keys( &self, query: impl Display ) -> Result<Vec<String>, ClientOperationError>
pub fn query_get( &self, query: impl Display ) -> Result<HashMap<String, String>, ClientOperationError>
pub fn get( &self, key: impl Display ) -> Result<Option<String>, ClientOperationError>
pub fn get_many<T: Display>( &self, keys: &[T] ) -> Result<Vec<String>, ClientOperationError>
pub fn set( &self, key: impl Display, data: &str ) -> Result<(), ClientOperationError>
pub fn delete(&self, key: impl Display) -> Result<(), ClientOperationError>
pub fn is_alive(&self) -> Result<bool, ClientOperationError>
Trait Implementations§
source§impl Clone for RedisClient
impl Clone for RedisClient
source§fn clone(&self) -> RedisClient
fn clone(&self) -> RedisClient
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for RedisClient
impl Send for RedisClient
impl Sync for RedisClient
impl Unpin for RedisClient
impl !UnwindSafe for RedisClient
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