@@ -38,36 +38,36 @@ use tokio::runtime::Runtime;
38
38
/// The struct is freed by the external caller by using `free_command_response` to avoid memory leaks.
39
39
/// TODO: Add a type enum to validate what type of response is being sent in the CommandResponse.
40
40
#[ repr( C ) ]
41
- #[ derive( Debug ) ]
41
+ #[ derive( Debug , Clone ) ]
42
42
pub struct CommandResponse {
43
- response_type : ResponseType ,
44
- int_value : i64 ,
45
- float_value : c_double ,
46
- bool_value : bool ,
43
+ pub response_type : ResponseType ,
44
+ pub int_value : i64 ,
45
+ pub float_value : c_double ,
46
+ pub bool_value : bool ,
47
47
48
48
/// Below two values are related to each other.
49
49
/// `string_value` represents the string.
50
50
/// `string_value_len` represents the length of the string.
51
- string_value : * mut c_char ,
52
- string_value_len : c_long ,
51
+ pub string_value : * mut c_char ,
52
+ pub string_value_len : c_long ,
53
53
54
54
/// Below two values are related to each other.
55
55
/// `array_value` represents the array of CommandResponse.
56
56
/// `array_value_len` represents the length of the array.
57
- array_value : * mut CommandResponse ,
58
- array_value_len : c_long ,
57
+ pub array_value : * mut CommandResponse ,
58
+ pub array_value_len : c_long ,
59
59
60
60
/// Below two values represent the Map structure inside CommandResponse.
61
61
/// The map is transformed into an array of (map_key: CommandResponse, map_value: CommandResponse) and passed to Go.
62
62
/// These are represented as pointers as the map can be null (optionally present).
63
- map_key : * mut CommandResponse ,
64
- map_value : * mut CommandResponse ,
63
+ pub map_key : * mut CommandResponse ,
64
+ pub map_value : * mut CommandResponse ,
65
65
66
66
/// Below two values are related to each other.
67
67
/// `sets_value` represents the set of CommandResponse.
68
68
/// `sets_value_len` represents the length of the set.
69
- sets_value : * mut CommandResponse ,
70
- sets_value_len : c_long ,
69
+ pub sets_value : * mut CommandResponse ,
70
+ pub sets_value_len : c_long ,
71
71
}
72
72
73
73
impl Default for CommandResponse {
@@ -90,7 +90,7 @@ impl Default for CommandResponse {
90
90
}
91
91
92
92
#[ repr( C ) ]
93
- #[ derive( Debug , Default ) ]
93
+ #[ derive( Debug , Default , Clone ) ]
94
94
pub enum ResponseType {
95
95
#[ default]
96
96
Null = 0 ,
@@ -132,8 +132,8 @@ pub type FailureCallback = unsafe extern "C" fn(
132
132
/// The struct is freed by the external caller by using `free_connection_response` to avoid memory leaks.
133
133
#[ repr( C ) ]
134
134
pub struct ConnectionResponse {
135
- conn_ptr : * const c_void ,
136
- connection_error_message : * const c_char ,
135
+ pub conn_ptr : * const c_void ,
136
+ pub connection_error_message : * const c_char ,
137
137
}
138
138
139
139
/// A `GlideClient` adapter.
0 commit comments