Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add high level wrapper for RedisModule_EmitAOF #75

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

messense
Copy link
Contributor

Closes #74

@gkorland gkorland requested a review from gavrie May 10, 2020 11:53
@gkorland gkorland added the enhancement New feature or request label May 10, 2020
@@ -209,4 +209,9 @@ impl Context {
pub fn create_string(&self, s: &str) -> RedisString {
RedisString::create(self.ctx, s)
}

#[cfg(feature = "experimental-api")]
pub fn emit_aof(&self, io: *mut raw::RedisModuleIO, command: &str, args: &[&str]) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The public API of Context should not use raw pointers like *mut raw::RedisModuleIO; its whole purpose it to provide a safe abstraction over them.

I haven't dived deeply into this, but it seems the correct thing here is to create a wrapper struct around the raw type and pass safe Rust references to it (like Context itself).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add high level wrapper for RedisModule_EmitAOF
3 participants