pub struct Builder { /* private fields */ }Expand description
Builder for the Db instance.
Implementations§
source§impl Builder
impl Builder
sourcepub fn new() -> Self
pub fn new() -> Self
Similar to redb::Builder::new().
sourcepub fn set_cache_size(&mut self, bytes: usize) -> &mut Self
pub fn set_cache_size(&mut self, bytes: usize) -> &mut Self
Similar to redb::Builder::set_cache_size().
sourcepub fn create(&self, path: impl AsRef<Path>) -> Result<Db>
pub fn create(&self, path: impl AsRef<Path>) -> Result<Db>
Creates a new Db instance using the given path.
Similar to redb::Builder.create(…)
sourcepub fn create_tmp(&self, path: impl AsRef<Path>) -> Result<Db>
pub fn create_tmp(&self, path: impl AsRef<Path>) -> Result<Db>
Creates a new Db instance using Builder::create in order to create it in a temporary
directory with the given path.
Example: builder::create_tmp('project/my_db') will create the db to /tmp/project/my_db.
Auto Trait Implementations§
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
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