You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: set.rs
    path of file: ./repos/Rust-Full-Stack/microservices_with_docker/tonic_server/src/service/user/redis
    
    the code of the file until where you have to start completion: use redis::{
    Client as RedisClient,
    Commands,
    RedisResult,
    ToRedisArgs, RedisWrite,
};

use crate::{
    user::{
        UserReply
    },
};

use serde_json;

pub fn list_of_users(users: Vec<UserReply>) -> RedisRe
    
pub fn user(id: String, user: UserReply) -> RedisResult<()> {
    // Extract the Redis target database to variable later.
    let client = RedisClient::open("redis://0.0.0.0:6379/")?;
    let mut con = client.get_connection()?;

    // The input and output of Redis database should be serialized.
    let serialized = serde_json::to_string(&user).unwrap();
    let _ : () = con.set(&id, serialized)?;
    Ok(())
}