use chrono::Local;
use std::error::Error;
use std::fs::File;
use std::io::BufReader;
#[allow(dead_code)]
#[derive(Debug)]
struct Hist {
id: String,
item: Vec<HistoryItems>,
}
#[allow(dead_code)]
#[derive(Debug)]
struct HistoryItems {
from: String,
to: String,
}
pub fn write_history_as_json() -> Result<(), Box<dyn Error>> {
let c_time = Local::now();
let _formatted_time = c_time.format("%Y-%m-%d_%H:%M:%S").to_string();
Ok(())
}
#[allow(dead_code)]
fn test_function_01() {
let c_time = Local::now();
let formatted_time = c_time.format("%Y-%m-%d_%H:%M:%S").to_string();
println!("{}", formatted_time);
}
pub fn write_history() -> Result<(), Box<dyn Error>> {
let file = File::open("roxide_history.json").expect("where is the roxide_history.json file?");
let _reader = BufReader::new(file);
Ok(())
}