Struct rkv::Manager [−][src]
pub struct Manager { /* fields omitted */ }
Methods
impl Manager
[src]
impl Manager
pub fn singleton() -> &'static RwLock<Manager>
[src]
pub fn singleton() -> &'static RwLock<Manager>
pub fn get<'p, P>(&self, path: P) -> Result<Option<Arc<RwLock<Rkv>>>, Error> where
P: Into<&'p Path>,
[src]
pub fn get<'p, P>(&self, path: P) -> Result<Option<Arc<RwLock<Rkv>>>, Error> where
P: Into<&'p Path>,
Return the open store at path
, returning None
if it has not already been opened.
pub fn get_or_create<'p, F, P>(
&mut self,
path: P,
f: F
) -> Result<Arc<RwLock<Rkv>>, StoreError> where
F: FnOnce(&Path) -> Result<Rkv, StoreError>,
P: Into<&'p Path>,
[src]
pub fn get_or_create<'p, F, P>(
&mut self,
path: P,
f: F
) -> Result<Arc<RwLock<Rkv>>, StoreError> where
F: FnOnce(&Path) -> Result<Rkv, StoreError>,
P: Into<&'p Path>,
Return the open store at path
, or create it by calling f
.
pub fn get_or_create_with_capacity<'p, F, P>(
&mut self,
path: P,
capacity: c_uint,
f: F
) -> Result<Arc<RwLock<Rkv>>, StoreError> where
F: FnOnce(&Path, c_uint) -> Result<Rkv, StoreError>,
P: Into<&'p Path>,
[src]
pub fn get_or_create_with_capacity<'p, F, P>(
&mut self,
path: P,
capacity: c_uint,
f: F
) -> Result<Arc<RwLock<Rkv>>, StoreError> where
F: FnOnce(&Path, c_uint) -> Result<Rkv, StoreError>,
P: Into<&'p Path>,
Return the open store at path
with capacity capacity
,
or create it by calling f
.