pub struct ClientDatabaseFormatOptions {
pub page_group_size: NonZeroU32,
pub force: bool,
}Expand description
Options for ClientDatabase::format()
Fields§
§page_group_size: NonZeroU32The number of pages of OwnedPages::ALIGN bytes in a single page group.
A storage item must fit into a single page group together with the page group header and a
next page group entry, so this bounds the size of the largest storage item, like a block. A
larger number also wastes a smaller share of each page group at its end, where the next
storage item doesn’t fit. A smaller number reclaims storage in smaller steps, since page
groups are freed whole, and makes ClientDatabase::open() use less RAM, since it reads a
whole page group at once.
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
impl Copy for ClientDatabaseFormatOptions
Auto Trait Implementations§
impl Forget for ClientDatabaseFormatOptions
impl Freeze for ClientDatabaseFormatOptions
impl Move for ClientDatabaseFormatOptions
impl RefUnwindSafe for ClientDatabaseFormatOptions
impl Send for ClientDatabaseFormatOptions
impl Sync for ClientDatabaseFormatOptions
impl Unpin for ClientDatabaseFormatOptions
impl UnsafeUnpin for ClientDatabaseFormatOptionswhere
NonZeroU32Inner: UnsafeUnpin,
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