pub fn open<P: AsRef<Path>>(path: P, options: &DbOptions) -> storage::Result<RocksDB> {
        let db = {
            if let Ok(names) = get_cf_names(&path) {
                let cf_names = names.iter().map(|name| name.as_str()).collect::<Vec<_>>();
                rocksdb::DB::open_cf(&options.to_rocksdb(), path, cf_names.as_ref())?
            } else {
                rocksdb::DB::open(&options.to_rocksdb(), path)?
            }
        };
        Ok(RocksDB { db: Arc::new(db) })
    }
/// Open a database stored in the specified path with the specified options.
Open a database stored in the specified path with the specified options.
Open a database stored in the specified path with the specified options .
pub fn open<P: AsRef<Path>>(path: P, options: &DbOptions) -> storage::Result<RocksDB> {
        let db = {
            if let Ok(names) = get_cf_names(&path) {
                let cf_names = names.iter().map(|name| name.as_str()).collect::<Vec<_>>();
                rocksdb::DB::open_cf(&options.to_rocksdb(), path, cf_names.as_ref())?
            } else {
                rocksdb::DB::open(&options.to_rocksdb(), path)?
            }
        };
        Ok(RocksDB { db: Arc::new(db) })
    }
pub fn open < P : AsRef < Path > > ( path : P , options : & DbOptions ) -> storage :: Result < RocksDB > { let db = { if let Ok ( names ) = get_cf_names ( & path ) { let cf_names = names . iter ( ) . map ( | name | name . as_str ( ) ) . collect :: < Vec < _ > > ( ) ; rocksdb :: DB :: open_cf ( & options . to_rocksdb ( ) , path , cf_names . as_ref ( ) ) ? } else { rocksdb :: DB :: open ( & options . to_rocksdb ( ) , path ) ? } } ; Ok ( RocksDB { db : Arc :: new ( db ) } ) }
Open a database stored in the specified path with the specified options.
Open a database stored in the specified path with the specified options .
path
P
options
&DbOptions
path
P
options
&DbOptions