Enum Preallocate
pub enum Preallocate {
Zero,
ShortFirst,
Size,
None,
}Expand description
How new segment files are prepared.
Variants§
Zero
Write zeros through the whole file and flush it, so later writes are
overwrites and fdatasync has no metadata to persist.
ShortFirst
Zero-fill at most one MiB when opening a shard. Prepare full-size successor segments ahead of rollover.
Size
Only set the file length.
None
Grow the file as records are written.
Trait Implementations§
§impl Clone for Preallocate
impl Clone for Preallocate
§fn clone(&self) -> Preallocate
fn clone(&self) -> Preallocate
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 more§impl Debug for Preallocate
impl Debug for Preallocate
§impl PartialEq for Preallocate
impl PartialEq for Preallocate
impl Copy for Preallocate
impl Eq for Preallocate
impl StructuralPartialEq for Preallocate
Auto Trait Implementations§
impl Freeze for Preallocate
impl RefUnwindSafe for Preallocate
impl Send for Preallocate
impl Sync for Preallocate
impl Unpin for Preallocate
impl UnsafeUnpin for Preallocate
impl UnwindSafe for Preallocate
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