Struct spacetimedb_commitlog::Options
source · pub struct Options {
pub log_format_version: u8,
pub max_segment_size: u64,
pub max_records_in_commit: NonZeroU16,
}
Expand description
Commitlog
options.
Fields§
§log_format_version: u8
Set the log format version to write, and the maximum supported version.
Choosing a payload format T
of Commitlog
should usually result in
updating the DEFAULT_LOG_FORMAT_VERSION
of this crate. Sometimes it
may however be useful to set the version at runtime, e.g. to experiment
with new or very old versions.
Default: DEFAULT_LOG_FORMAT_VERSION
max_segment_size: u64
The maximum size in bytes to which log segments should be allowed to grow.
Default: 1GiB
max_records_in_commit: NonZeroU16
The maximum number of records in a commit.
If this number is exceeded, the commit is flushed to disk even without
explicitly calling Commitlog::flush
.
Default: 65,535
Trait Implementations§
impl Copy for Options
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnwindSafe for Options
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
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