Function jay_lib::config::set_conf

source ·
pub fn set_conf() -> Result<(), Box<dyn Error>>
Expand description

Open file get fields which is used. written to only once used it for main or lib.

It is just a example for me. Can you be look source code and changed it for yourself.

Example:

    use jay_lib::config::{set_conf,DB_LOCATION,DATA_FROM,DATA_TIDY};
    let db_location;
    let dic_from;
    let tidy_data;
    match set_conf() {
        Ok(_) => {
            db_location = DB_LOCATION.get();
            dic_from = DATA_FROM.get();
            tidy_data = DATA_TIDY.get();
            println!("{:?},{:?},{:?}", db_location, dic_from, tidy_data);
        }
        Err(e) => { eprintln!("{e:?}");return; }
    };

It will be changed. If no exist config file … To Do