pub struct ClientDatabaseFormatOptions {
pub page_group_size: NonZeroU32,
pub force: bool,
}Expand description
Options for ClientDatabase
Fields§
§page_group_size: NonZeroU32The number of AlignedPages in a single page group.
Each group always has a set of storage items with monotonically increasing sequence numbers. The database only frees page groups for reuse when all storage items there are no longer in use.
A smaller number means storage can be reclaimed for reuse more quickly and higher concurrency during restart, but must not be too small that no storage item fits within a page group anymore. A larger number allows finding the range of sequence numbers that are already used and where potential write interruption happened on restart more efficiently, but will use more RAM in the process.
The recommended size is 256 MiB unless a tiny database is used for testing purposes, where a smaller value might work too.
force: boolBy default, formatting will be aborted if the database appears to be already formatted.
Setting this option to true skips the check and formats the database anyway.
Trait Implementations§
Source§impl Clone for ClientDatabaseFormatOptions
impl Clone for ClientDatabaseFormatOptions
Source§fn clone(&self) -> ClientDatabaseFormatOptions
fn clone(&self) -> ClientDatabaseFormatOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ClientDatabaseFormatOptions
impl Debug for ClientDatabaseFormatOptions
impl Copy for ClientDatabaseFormatOptions
Auto Trait Implementations§
impl Freeze for ClientDatabaseFormatOptions
impl RefUnwindSafe for ClientDatabaseFormatOptions
impl Send for ClientDatabaseFormatOptions
impl Sync for ClientDatabaseFormatOptions
impl Unpin for ClientDatabaseFormatOptions
impl UnwindSafe for ClientDatabaseFormatOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more