@@ -134,9 +134,16 @@ bitflags! {
134134 const EXPIRED = REDISMODULE_NOTIFY_EXPIRED ;
135135 const EVICTED = REDISMODULE_NOTIFY_EVICTED ;
136136 const STREAM = REDISMODULE_NOTIFY_STREAM ;
137+ /// Available only starting from Redis `7.0.1`.
138+ const NEW = REDISMODULE_NOTIFY_NEW ;
137139 const MODULE = REDISMODULE_NOTIFY_MODULE ;
138140 const LOADED = REDISMODULE_NOTIFY_LOADED ;
139141 const MISSED = REDISMODULE_NOTIFY_KEY_MISS ;
142+ /// Does not include the [`Self::MISSED`] and [`Self::NEW`].
143+ ///
144+ /// Includes [`Self::GENERIC`], [`Self::STRING`], [`Self::LIST`],
145+ /// [`Self::SET`], [`Self::HASH`], [`Self::ZSET`], [`Self::EXPIRED`],
146+ /// [`Self::EVICTED`], [`Self::STREAM`], [`Self::MODULE`].
140147 const ALL = REDISMODULE_NOTIFY_ALL ;
141148 const TRIMMED = REDISMODULE_NOTIFY_TRIMMED ;
142149 }
@@ -905,6 +912,24 @@ pub fn get_keyspace_events() -> NotifyEvent {
905912 }
906913}
907914
915+ /// Returns all the available notification flags for key-space
916+ /// notifications.
917+ ///
918+ /// # Safety
919+ ///
920+ /// This function is safe to use as it doesn't perform any work with
921+ /// the [RedisModuleCtx] pointer except for passing it to the redis server.
922+ ///
923+ /// # Panics
924+ ///
925+ /// Panics when the [RedisModule_GetKeyspaceNotificationFlagsAll] is
926+ /// unavailable.
927+ pub fn get_keyspace_notification_flags_all ( ) -> NotifyEvent {
928+ unsafe {
929+ NotifyEvent :: from_bits_truncate ( RedisModule_GetKeyspaceNotificationFlagsAll . unwrap ( ) ( ) )
930+ }
931+ }
932+
908933#[ derive( Debug , PartialEq , Eq , PartialOrd , Ord ) ]
909934pub struct Version {
910935 pub major : i32 ,
0 commit comments