-
Notifications
You must be signed in to change notification settings - Fork 65
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
How to use binary/bytes/stringbuffer type #246
Comments
@thomas9911 you're right it seems like a left over from the original API. |
Since I also bumped into this missing functionality the other day I sketched a quick draft that just adds byte-slice-accepting versions of the original methods. Although that might work, perhaps a more generic interface should be implemented (tho even then something like |
I was also working on it 😅 |
Oh damn, sorry - well, mine was just a sketch and I see your version accepts RedisStrings rather than byte slices (as it should) so nvm that 😅 Idk about breaking the public API, but keeping the default read & write with plain old strings as arguments does not seem like good long-term choice either... |
Maybe we could add a trait that can convert rust types into RedisString and let these functions accept this (so &str will keep working) 🤔 |
Well we could make the api accept |
I'm making a module that wants to read/write non-utf8 bytes to Redis. However the RedisKeyWritable read / write function only accept &str and also the higher level call function only accepts strings.
Is there a way to do this currently (without using the raw C bindings) ?
Currently i worked around this by creating my own type and using the set_value / get_value functions.
The text was updated successfully, but these errors were encountered: