pub struct Builder { /* private fields */ }
Expand description
Configuration builder of a redb Database.
Implementations§
source§impl Builder
impl Builder
sourcepub fn set_cache_size(&mut self, bytes: usize) -> &mut Self
pub fn set_cache_size(&mut self, bytes: usize) -> &mut Self
Set the amount of memory (in bytes) used for caching data
sourcepub fn create(&self, path: impl AsRef<Path>) -> Result<Database, DatabaseError>
pub fn create(&self, path: impl AsRef<Path>) -> Result<Database, DatabaseError>
Opens the specified file as a redb database.
- if the file does not exist, or is an empty file, a new database will be initialized in it
- if the file is a valid redb database, it will be opened
- otherwise this function will return an error
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