pub struct Config<E> { /* private fields */ }Expand description
The sled embedded database! Implements Deref<Target = sled::Tree> to refer to a default keyspace / namespace / bucket.
Implementations§
Source§impl<E> Config<E>where
E: Encryption,
impl<E> Config<E>where
E: Encryption,
pub fn new(encryption: E) -> Self
pub fn path<P: AsRef<Path>>(self, path: P) -> Self
pub fn open(&self) -> Result<Db<E>>
pub fn cache_capacity(self, to: u64) -> Self
pub fn mode(self, to: Mode) -> Self
pub fn use_compression(self, to: bool) -> Self
pub fn compression_factor(self, to: i32) -> Self
pub fn temporary(self, to: bool) -> Self
pub fn create_new(self, to: bool) -> Self
pub fn print_profile_on_drop(self, to: bool) -> Self
Trait Implementations§
Auto Trait Implementations§
impl<E> Freeze for Config<E>
impl<E> !RefUnwindSafe for Config<E>
impl<E> Send for Config<E>
impl<E> Sync for Config<E>
impl<E> Unpin for Config<E>
impl<E> !UnwindSafe for Config<E>
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