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§
- alloc
- apierror
- commands
- configuration
- error
- key
- logging
- native_
types - raw
- rediserror
- redisraw
- redisvalue
- server_
events - stream
Macros§
- enum_
configuration - redis_
command - redis_
event_ handler - redis_
module - Defines a Redis module.
Structs§
- AclPermissions
- An object represent ACL permissions.
Used to check ACL permission using
acl_check_key_permission
. - Blocked
Client - Call
Options - Call
Options Builder - Context
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.- Context
Flags - Context
Guard - Detached
Context - 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. - Detached
Context Guard - This object is returned after locking Redis from DetachedContext. On dispose, Redis will be unlocked. This object implements Deref for Context so it can be used just like any Redis Context for command invocation. This object should not be used to return replies because there is no real client behind this context to return replies to.
- Detached
From Client - A
ThreadSafeContext
can either be bound to a blocked client, or detached from any client. - Future
Call Reply - A future call reply struct that will be return in case the module invoke a blocking command using [call_blocking]. This struct can be used to set unblock handler. Notice that the struct can not outlive the `ctx lifetime, This is because the future handler must be set before the Redis GIL will be released.
- Info
Context - Info
Context Field Bottom Level Data - A type for the
key => bottom-level-value
storage of an info section. - Keys
Cursor - Redis
Buffer - RedisGIL
Guard - 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
- Redis
String - Thread
Safe Context
Enums§
- Call
Option Resp - Call
Reply - Error
Reply - Info
Context Builder Field Bottom Level Value - The values allowed in the “info” sections and dictionaries.
- Info
Context Builder Field TopLevel Value - Promise
Call Reply
Constants§
Statics§
- MODULE_
CONTEXT - The detached Redis module context (the context of this module). It is only set to a proper value after the module is initialised via the provided redis_module macro. See DetachedContext.
Traits§
- NextArg
- Redis
Lock Indicator - 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§
- basic_
info_ command_ handler - Default “INFO” command handler for the module.
- decode_
args - init_
api - Initialize RedisModuleAPI without register as a module.
Type Aliases§
- Call
Result - Info
Context Field TopLevel Data - A type alias for the
key => top-level-value
storage of an info section. - Info
Handler Function Type - A type alias for the custom info command handler.
The function may optionally return an object of one section to add.
If nothing is returned, it is assumed that the function has already
filled all the information required via
InfoContext::builder
. - LogLevel
Deprecated - OneInfo
Section Data - One section contents: name and children.
- Redis
Result - A short-hand type that stores a std::result::Result with custom type and RedisError.
- Redis
Value Result - A RedisResult with RedisValue.