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

[Help] does this work with HashSet Commands ? #6

Closed
nabeel99 opened this issue Sep 13, 2023 · 1 comment
Closed

[Help] does this work with HashSet Commands ? #6

nabeel99 opened this issue Sep 13, 2023 · 1 comment

Comments

@nabeel99
Copy link

Hey
I just wanted to know if this works with hgetall and hget (multiple specific fields) , for e.g if i have a hashset on my redis server and i create a struct mapping the field names and setting their type to all String, will this be able to convert those redis internal Value into my struct ?
Idk if its a limitation or something am doing wrong as i have been able to succesfully deserialize a hashset into a corresponding struct, would love any pointers or if its a limitation pls confirm it.

@daniel7grant
Copy link
Owner

Hey Nabeel, no, this library only works with string and json types. JSON is usually better in most cases because it supports nested structs and other constructs, albeit with a slight performance cost.

If you insist on hashes, I recommend checking out the redis-derive crate, which does similar things then this crate, but saves to a hash.

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

No branches or pull requests

2 participants