@@ -40,7 +40,8 @@ bitflags! {
4040 }
4141}
4242
43- #[ derive( Primitive , Debug , PartialEq , Eq ) ]
43+ #[ repr( u32 ) ]
44+ #[ derive( Primitive , Debug , PartialEq , Eq , strum:: FromRepr ) ]
4445pub enum KeyType {
4546 Empty = REDISMODULE_KEYTYPE_EMPTY ,
4647 String = REDISMODULE_KEYTYPE_STRING ,
@@ -58,13 +59,15 @@ impl From<c_int> for KeyType {
5859 }
5960}
6061
61- #[ derive( Primitive , Debug , PartialEq , Eq ) ]
62+ #[ repr( u32 ) ]
63+ #[ derive( Primitive , Debug , PartialEq , Eq , strum:: FromRepr ) ]
6264pub enum Where {
6365 ListHead = REDISMODULE_LIST_HEAD ,
6466 ListTail = REDISMODULE_LIST_TAIL ,
6567}
6668
67- #[ derive( Primitive , Debug , PartialEq , Eq ) ]
69+ #[ repr( i32 ) ]
70+ #[ derive( Primitive , Debug , PartialEq , Eq , strum:: FromRepr ) ]
6871pub enum ReplyType {
6972 Unknown = REDISMODULE_REPLY_UNKNOWN ,
7073 String = REDISMODULE_REPLY_STRING ,
@@ -86,13 +89,15 @@ impl From<c_int> for ReplyType {
8689 }
8790}
8891
89- #[ derive( Primitive , Debug , PartialEq , Eq ) ]
92+ #[ repr( u32 ) ]
93+ #[ derive( Primitive , Debug , PartialEq , Eq , strum:: FromRepr ) ]
9094pub enum Aux {
9195 Before = REDISMODULE_AUX_BEFORE_RDB ,
9296 After = REDISMODULE_AUX_AFTER_RDB ,
9397}
9498
95- #[ derive( Primitive , Debug , PartialEq , Eq ) ]
99+ #[ repr( u32 ) ]
100+ #[ derive( Primitive , Debug , PartialEq , Eq , strum:: FromRepr ) ]
96101pub enum Status {
97102 Ok = REDISMODULE_OK ,
98103 Err = REDISMODULE_ERR ,
0 commit comments