pub struct Database<const W: bool, C, B> {
pub db: Db,
pub config: C,
pub books: B,
}Fields§
§db: Db§config: C§books: BImplementations§
Source§impl<C: Serialize, B: Serialize> Database<true, C, B>
impl<C: Serialize, B: Serialize> Database<true, C, B>
pub fn create<P: AsRef<Path>>( path: P, cfs: Vec<ColumnFamilyDescriptor>, options: Options, optimistic_transactions: bool, config: C, books: B, ) -> Result<Self, Error>
pub fn write_config(&self, config: &C) -> Result<(), Error>
pub fn write_books(&self, books: &B) -> Result<(), Error>
Source§impl<'de, C: Deserialize<'de>, B: Deserialize<'de>> Database<true, C, B>
impl<'de, C: Deserialize<'de>, B: Deserialize<'de>> Database<true, C, B>
pub fn open_with_pessimistic_transactions<P: AsRef<Path>>( path: P, cfs: Vec<ColumnFamilyDescriptor>, options: Options, ) -> Result<Self, Error>
Source§impl<'de, const W: bool, C: Deserialize<'de>, B: Deserialize<'de>> Database<W, C, B>
impl<'de, const W: bool, C: Deserialize<'de>, B: Deserialize<'de>> Database<W, C, B>
Trait Implementations§
Auto Trait Implementations§
impl<const W: bool, C, B> Freeze for Database<W, C, B>
impl<const W: bool, C, B> RefUnwindSafe for Database<W, C, B>where
C: RefUnwindSafe,
B: RefUnwindSafe,
impl<const W: bool, C, B> Send for Database<W, C, B>
impl<const W: bool, C, B> Sync for Database<W, C, B>
impl<const W: bool, C, B> Unpin for Database<W, C, B>
impl<const W: bool, C, B> UnwindSafe for Database<W, C, B>where
C: UnwindSafe,
B: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more