I want to call a Redis function with a binary value of [u8] using the redis-rs crate using the following code:
let _ : () = redis::cmd("...").arg("...").arg(data).query(&mut con)?;
However, it results in this error when data is Vec<u8>:
the trait `redis::ToRedisArgs` is not implemented for `&std::vec::Vec<u8>`
And this error when data is [u8]:
the trait `redis::ToRedisArgs` is not implemented for `[u8]`
When looking at the documentation for ToRedisArgs, there should be one implementation for Vec<T> though.
&[u8]orVec<u8>, but you apparently tried with[u8]and&Vec<u8>, so you need to dereference or reference as appropriate.&[u8]when passing in a&Vec<u8>.