pub struct BlockDBOptionsBuilder {
pub chunk_size: Option<NonZeroUsize>,
pub max_file_size: Option<NonZeroUsize>,
}Fields§
§chunk_size: Option<NonZeroUsize>§max_file_size: Option<NonZeroUsize>Implementations§
Source§impl BlockDBOptionsBuilder
impl BlockDBOptionsBuilder
Sourcepub fn chunk_size(self, chunk_size: NonZeroUsize) -> Self
pub fn chunk_size(self, chunk_size: NonZeroUsize) -> Self
Defines the size (in bytes) of a single chunk
within a DataBlock. This cannot be changed after the
BlockDB is opened for the first time.
(Default: 4,096)
Sourcepub fn max_file_size(self, max_file_size: NonZeroUsize) -> Self
pub fn max_file_size(self, max_file_size: NonZeroUsize) -> Self
Sets the soft maximum size (in bytes) of a DataFile.
“Soft” means that it may be exceeded once per file (e.g., for large writes).
This can be changed after initialization, but it will not retroactively
affect the size of existing DataFiles.
(Default: 4,096 * 1,000,000)
pub fn build(self) -> BlockDBOptions
Trait Implementations§
Source§impl Debug for BlockDBOptionsBuilder
impl Debug for BlockDBOptionsBuilder
Source§impl Default for BlockDBOptionsBuilder
impl Default for BlockDBOptionsBuilder
Source§fn default() -> BlockDBOptionsBuilder
fn default() -> BlockDBOptionsBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BlockDBOptionsBuilder
impl RefUnwindSafe for BlockDBOptionsBuilder
impl Send for BlockDBOptionsBuilder
impl Sync for BlockDBOptionsBuilder
impl Unpin for BlockDBOptionsBuilder
impl UnwindSafe for BlockDBOptionsBuilder
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