Struct redis_module::key::RedisKey
source · [−]pub struct RedisKey { /* private fields */ }
Implementations
sourceimpl RedisKey
impl RedisKey
pub fn open(ctx: *mut RedisModuleCtx, key: &RedisString) -> Self
sourcepub fn get_value<T>(
&self,
redis_type: &RedisType
) -> Result<Option<&T>, RedisError>
pub fn get_value<T>(
&self,
redis_type: &RedisType
) -> Result<Option<&T>, RedisError>
Panics
Will panic if RedisModule_ModuleTypeGetValue
is missing in redismodule.h
sourcepub fn key_type(&self) -> KeyType
pub fn key_type(&self) -> KeyType
Panics
Will panic if RedisModule_KeyType
is missing in redismodule.h
pub fn read(&self) -> Result<Option<String>, RedisError>
pub fn hash_get(&self, field: &str) -> Result<Option<RedisString>, RedisError>
sourcepub fn hash_get_multi<'a, A, B>(
&self,
fields: &'a [A]
) -> Result<Option<HMGetResult<'a, A, B>>, RedisError> where
A: Into<Vec<u8>> + Clone,
RedisString: Into<B>,
pub fn hash_get_multi<'a, A, B>(
&self,
fields: &'a [A]
) -> Result<Option<HMGetResult<'a, A, B>>, RedisError> where
A: Into<Vec<u8>> + Clone,
RedisString: Into<B>,
Returns the values associated with the specified fields in the hash stored at this key.
The result will be None
if the key does not exist.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for RedisKey
impl !Send for RedisKey
impl !Sync for RedisKey
impl Unpin for RedisKey
impl UnwindSafe for RedisKey
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more