Struct redis_module::key::RedisKey
source · 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>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.
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 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