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: lib.rs
    path of file: ./repos/operative-framework/opf-db/src
    
    the code of the file until where you have to start completion: use std::collections::HashMap;
use std::time::SystemTime;

use log::info;
use rand::{distributions::Alphanumeric, Rng};
use tokio::sync::mpsc::{unbounded_chann
    
pub async fn new(node_tx: UnboundedSender<(Domain, Event)>) -> (UnboundedSender<Event>, DBStore) {
    let (self_tx, self_rx) = unbounded_channel::<Event>();

    // generate a first workspace name, can be update.
    let workspace_id = 0;
    let random_name: String = rand::thread_rng()
        .sample_iter(&Alphanumeric)
        .take(7)
        .map(char::from)
        .collect();
    let workspace_name = format!("tmp/{}", random_name);

    let temp_db = DB::new(self_tx.clone());
    let mut dbs = HashMap::new();
    dbs.insert(workspace_id, temp_db);
    let tx = self_tx.clone();

    let _ = send_event_to(
        &node_tx,
        (Domain::CLI, Event::SetWorkspace(workspace_name.clone())),
    )
    .await;

    let mut workspaces = HashMap::new();
    workspaces.insert(
        workspace_id,
        Workspace {
            workspace_id,
            workspace_name,
            workspace_created_at: SystemTime::now(),
        },
    );

    (
        tx,
        DBStore {
            dbs,
            workspaces,
            current_workspace: 0,
            self_tx,
            self_rx,
            node_tx,
        },
    )
}