pub struct RedisKey { /* private fields */ }
Implementations§
Source§impl 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<&[u8]>, 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>
pub fn hash_get_multi<'a, A, B>( &self, fields: &'a [A], ) -> Result<Option<HMGetResult<'a, A, B>>, RedisError>
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.
pub fn get_stream_iterator( &self, reverse: bool, ) -> Result<StreamIterator<'_>, RedisError>
pub fn get_stream_range_iterator( &self, from: Option<RedisModuleStreamID>, to: Option<RedisModuleStreamID>, exclusive: bool, reverse: bool, ) -> Result<StreamIterator<'_>, RedisError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RedisKey
impl RefUnwindSafe for RedisKey
impl !Send for RedisKey
impl !Sync for RedisKey
impl Unpin for RedisKey
impl UnwindSafe for RedisKey
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