Crate redis_module
source ·Re-exports
pub use crate::raw::NotifyEvent;
pub use crate::configuration::ConfigurationValue;
pub use crate::configuration::EnumConfigurationValue;
pub use crate::raw;
pub use crate::rediserror::RedisError;
pub use crate::redisvalue::RedisValue;
pub use crate::raw::*;
Modules
Macros
- Defines a Redis module.
Structs
- An object represent ACL permissions. Used to check ACL permission using
acl_check_key_permission
. Context
is a structure that’s designed to give us a high-level interface to the Redis module API by abstracting away the raw C FFI calls.- This struct allows logging when the Redis GIL is not acquired. It is implemented
Send
andSync
so it can safely be used from within different threads. - A
ThreadSafeContext
can either be bound to a blocked client, or detached from any client. - This struct allows to guard some data and makes sure the data is only access when the Redis GIL is locked. From example, assuming you module want to save some statistics inside some global variable, but without the need to protect this variable with some mutex (because we know this variable is protected by Redis lock). For example, look at examples/threads.rs
Enums
LogLevel
is a level of logging to be specified with a Redis log directive.
Constants
Traits
- Whenever the user gets a reference to a struct that implements this trait, it can assume that the Redis GIL is held. Any struct that implements this trait can be used to retrieve objects which are GIL protected (see RedisGILGuard for more information)
Functions
- Initialize RedisModuleAPI without register as a module.