Skip to content

Commit 12ba3dd

Browse files
authored
Merge pull request #359 from RedisLabsModules/add-debug-implementations
Add a Debug trait implementation for AclPermissions.
2 parents e791067 + 185bced commit 12ba3dd

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/context/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ unsafe impl Sync for DetachedContext {}
242242

243243
/// `Context` is a structure that's designed to give us a high-level interface to
244244
/// the Redis module API by abstracting away the raw C FFI calls.
245+
#[derive(Debug)]
245246
pub struct Context {
246247
pub ctx: *mut raw::RedisModuleCtx,
247248
}
@@ -251,6 +252,7 @@ pub struct Context {
251252
/// This guerd make sure to unset the user when freed.
252253
/// It prevent privilege escalation security issues
253254
/// that can happened by forgeting to unset the user.
255+
#[derive(Debug)]
254256
pub struct ContextUserScope<'ctx> {
255257
ctx: &'ctx Context,
256258
user: *mut raw::RedisModuleUser,
@@ -864,6 +866,7 @@ unsafe impl RedisLockIndicator for Context {}
864866
bitflags! {
865867
/// An object represent ACL permissions.
866868
/// Used to check ACL permission using `acl_check_key_permission`.
869+
#[derive(Debug)]
867870
pub struct AclPermissions : c_int {
868871
/// User can look at the content of the value, either return it or copy it.
869872
const ACCESS = raw::REDISMODULE_CMD_KEY_ACCESS as c_int;

src/stream.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ use crate::Status;
66
use std::os::raw::c_long;
77
use std::ptr;
88

9+
#[derive(Debug)]
910
pub struct StreamRecord {
1011
pub id: raw::RedisModuleStreamID,
1112
pub fields: Vec<(RedisString, RedisString)>,
1213
}
1314

15+
#[derive(Debug)]
1416
pub struct StreamIterator<'key> {
1517
key: &'key RedisKey,
1618
}

0 commit comments

Comments
 (0)