[][src]Struct rkv::Manager

pub struct Manager { /* fields omitted */ }

A process is only permitted to have one open handle to each Rkv environment. This manager exists to enforce that constraint: don't open environments directly.

Methods

impl Manager[src]

pub fn singleton() -> &'static RwLock<Manager>[src]

pub fn get<'p, P>(&self, path: P) -> Result<Option<Arc<RwLock<Rkv>>>, Error> where
    P: Into<&'p Path>, 
[src]

Return the open env 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]

Return the open env 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]

Return the open env at path with capacity capacity, or create it by calling f.

Auto Trait Implementations

impl Send for Manager

impl Unpin for Manager

impl Sync for Manager

impl UnwindSafe for Manager

impl RefUnwindSafe for Manager

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]