pub struct DatabaseBuilder { /* private fields */ }

Implementations

Set the internal page size of the database Larger page sizes will reduce the database file’s overhead, but may decrease write performance Defaults to the native OS page size

Set the internal region size of the database Smaller regions may allow the database to compact more effectively, but will limit the maximum size of values that can be stored Defaults to 4GiB

Whether to grow the database file dynamically. When set to true, the database file will start at a small size and grow as insertions are made When set to false, the database file will be statically sized

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

db_size: the maximum size in bytes of the database.

Safety

The file referenced by path must not be concurrently modified by any other process

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.