Help me with using Redis

I've been trying to learn how to use the cmd function for rust & redis, what do I pass into "con: &mut redis::Connection" to be able to successfully call fn do_something?

pub fn do_something(con: &mut redis::Connection) -> redis::RedisResult<()>
let _ : () = redis::cmd("SET").arg("my_key").arg(42).query(con)?;

Thanks for all the future help.

fn main() -> redis::RedisResult<()> {
    let client = redis::Client::open("redis://")?;
    let mut con = client.get_connection()?;

    do_something(&mut con)?;


Thank you so much :smiley:

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.