pub fn open() -> Self {
        let db = Config::default()
            .path(Path::new(DB_PATH))
            .cache_capacity(CACHE_CAPACITY)
            .mode(Mode::HighThroughput)
            .flush_every_ms(Some(FLUSH_INTERVAL_MS))
            .open()
            .expect("Failed to open the database");
        let config_tree = db
            .open_tree("config")
            .expect("Failed to open or create the config DB tree");
        let credentials_tree = db
            .open_tree("credentials")
            .expect("Failed to open or create the credentials DB tree");

        Self {
            db,
            config_tree,
            credentials_tree,
        }
    }
/// Opens the Hive database. If no database exists, a new one is created.
///
/// # Panics
/// If any of the open procedures fail.
Opens the Hive database. If no database exists, a new one is created.
Opens the Hive database . If no database exists a new one is created .
pub fn open() -> Self {
        let db = Config::default()
            .path(Path::new(DB_PATH))
            .cache_capacity(CACHE_CAPACITY)
            .mode(Mode::HighThroughput)
            .flush_every_ms(Some(FLUSH_INTERVAL_MS))
            .open()
            .expect("Failed to open the database");
        let config_tree = db
            .open_tree("config")
            .expect("Failed to open or create the config DB tree");
        let credentials_tree = db
            .open_tree("credentials")
            .expect("Failed to open or create the credentials DB tree");
        Self {
            db,
            config_tree,
            credentials_tree,
        }
    }
pub fn open ( ) -> Self { let db = Config :: default ( ) . path ( Path :: new ( DB_PATH ) ) . cache_capacity ( CACHE_CAPACITY ) . mode ( Mode :: HighThroughput ) . flush_every_ms ( Some ( FLUSH_INTERVAL_MS ) ) . open ( ) . expect ( " " ) ; let config_tree = db . open_tree ( " " ) . expect ( " " ) ; let credentials_tree = db . open_tree ( " " ) . expect ( " " ) ; Self { db , config_tree , credentials_tree , } }
Opens the Hive database.
Opens the Hive database .
panics
If any of the open procedures fail.
If any of the open procedures fail .