pub struct DatabaseArguments { /* private fields */ }mdbx only.Expand description
Arguments for database initialization.
Implementations§
Source§impl DatabaseArguments
impl DatabaseArguments
Sourcepub fn new(client_version: ClientVersion) -> Self
pub fn new(client_version: ClientVersion) -> Self
Create new database arguments with given client version.
Sourcepub fn test() -> Self
pub fn test() -> Self
Create database arguments suitable for testing.
Uses a small geometry (64MB max, 4MB growth) to avoid exhausting the system’s
virtual memory map limit (vm.max_map_count) when many test databases are open
concurrently.
Sourcepub const fn with_geometry_max_size(self, max_size: Option<usize>) -> Self
pub const fn with_geometry_max_size(self, max_size: Option<usize>) -> Self
Sets the upper size limit of the db environment, the maximum database size in bytes.
Sourcepub const fn with_geometry_page_size(self, page_size: Option<usize>) -> Self
pub const fn with_geometry_page_size(self, page_size: Option<usize>) -> Self
Sets the database page size value.
Sourcepub const fn with_sync_mode(self, sync_mode: Option<SyncMode>) -> Self
pub const fn with_sync_mode(self, sync_mode: Option<SyncMode>) -> Self
Sets the database sync mode.
Sourcepub const fn with_growth_step(self, growth_step: Option<usize>) -> Self
pub const fn with_growth_step(self, growth_step: Option<usize>) -> Self
Configures the database growth step in bytes.
Sourcepub const fn with_log_level(self, log_level: Option<LogLevel>) -> Self
pub const fn with_log_level(self, log_level: Option<LogLevel>) -> Self
Set the log level.
Sourcepub const fn max_read_transaction_duration(
&mut self,
max_read_transaction_duration: Option<MaxReadTransactionDuration>,
)
pub const fn max_read_transaction_duration( &mut self, max_read_transaction_duration: Option<MaxReadTransactionDuration>, )
Set the maximum duration of a read transaction.
Sourcepub const fn with_max_read_transaction_duration(
self,
max_read_transaction_duration: Option<MaxReadTransactionDuration>,
) -> Self
pub const fn with_max_read_transaction_duration( self, max_read_transaction_duration: Option<MaxReadTransactionDuration>, ) -> Self
Set the maximum duration of a read transaction.
Sourcepub const fn with_exclusive(self, exclusive: Option<bool>) -> Self
pub const fn with_exclusive(self, exclusive: Option<bool>) -> Self
Set the mdbx exclusive flag.
Sourcepub const fn with_max_readers(self, max_readers: Option<u64>) -> Self
pub const fn with_max_readers(self, max_readers: Option<u64>) -> Self
Set max_readers flag.
Sourcepub const fn client_version(&self) -> &ClientVersion
pub const fn client_version(&self) -> &ClientVersion
Returns the client version if any.
Trait Implementations§
Source§impl Clone for DatabaseArguments
impl Clone for DatabaseArguments
Source§impl Debug for DatabaseArguments
impl Debug for DatabaseArguments
Auto Trait Implementations§
impl Freeze for DatabaseArguments
impl RefUnwindSafe for DatabaseArguments
impl Send for DatabaseArguments
impl Sync for DatabaseArguments
impl Unpin for DatabaseArguments
impl UnsafeUnpin for DatabaseArguments
impl UnwindSafe for DatabaseArguments
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
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 moreimpl<T> MaybeDebug for Twhere
T: Debug,
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 184 bytes