pub struct SqliteTuning {
pub mmap_size: i64,
pub page_size: i64,
pub cache_size_kb: i64,
pub busy_timeout_ms: u64,
pub journal_size_limit: i64,
}Expand description
Tunable SQLite pragmas applied when opening the database. page_size and
auto_vacuum only take effect on a freshly-created database (they are fixed
once the file has content); the rest apply on every open. Defaults target a
Linux host (4 KiB pages match the OS page / filesystem block size).
Fields§
§mmap_size: i64PRAGMA mmap_size in bytes.
page_size: i64PRAGMA page_size in bytes (fresh DB only). Must be a power of two.
cache_size_kb: i64PRAGMA cache_size magnitude in KiB (applied as the negative form).
busy_timeout_ms: u64PRAGMA busy_timeout in milliseconds.
journal_size_limit: i64PRAGMA journal_size_limit in bytes.
Trait Implementations§
Source§impl Clone for SqliteTuning
impl Clone for SqliteTuning
Source§fn clone(&self) -> SqliteTuning
fn clone(&self) -> SqliteTuning
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SqliteTuning
Source§impl Debug for SqliteTuning
impl Debug for SqliteTuning
Auto Trait Implementations§
impl Freeze for SqliteTuning
impl RefUnwindSafe for SqliteTuning
impl Send for SqliteTuning
impl Sync for SqliteTuning
impl Unpin for SqliteTuning
impl UnsafeUnpin for SqliteTuning
impl UnwindSafe for SqliteTuning
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Converts
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>
Converts
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