pub struct LogOptions { /* private fields */ }
Expand description
Commit log options allow customization of the commit log behavior.
Implementations§
Source§impl LogOptions
impl LogOptions
Sourcepub fn new<P>(log_dir: P) -> LogOptions
pub fn new<P>(log_dir: P) -> LogOptions
Creates minimal log options value with a directory containing the log.
The default values are:
- segment_max_bytes: 1GB
- index_max_entries: 100,000
- message_max_bytes: 1mb
Sourcepub fn segment_max_bytes(&mut self, bytes: usize) -> &mut LogOptions
pub fn segment_max_bytes(&mut self, bytes: usize) -> &mut LogOptions
Bounds the size of a log segment to a number of bytes.
Sourcepub fn index_max_items(&mut self, items: usize) -> &mut LogOptions
pub fn index_max_items(&mut self, items: usize) -> &mut LogOptions
Bounds the size of an individual memory-mapped index file.
Sourcepub fn message_max_bytes(&mut self, bytes: usize) -> &mut LogOptions
pub fn message_max_bytes(&mut self, bytes: usize) -> &mut LogOptions
Bounds the size of a message to a number of bytes.
Trait Implementations§
Source§impl Clone for LogOptions
impl Clone for LogOptions
Source§fn clone(&self) -> LogOptions
fn clone(&self) -> LogOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for LogOptions
impl RefUnwindSafe for LogOptions
impl Send for LogOptions
impl Sync for LogOptions
impl Unpin for LogOptions
impl UnwindSafe for LogOptions
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