#[non_exhaustive]pub enum PreallocateMode {
None,
Zero,
Allocate,
WriteData,
}
Expand description
Storage object preallocation modes.
When resizing or creating storage objects, this mode determines whether and how the new data range is to be preallocated.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
None
No preallocation.
Reading the new range may return random data.
Zero
Ensure range reads as zeroes.
Does not necessarily allocate data, but has to ensure the new range will read back as zeroes.
Allocate
Extent preallocation.
Do not write data, but ensure all new extents are allocated.
WriteData
Full data preallocation.
Write zeroes to the whole range.
Trait Implementations§
Source§impl Clone for PreallocateMode
impl Clone for PreallocateMode
Source§fn clone(&self) -> PreallocateMode
fn clone(&self) -> PreallocateMode
Returns a copy 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 moreSource§impl Debug for PreallocateMode
impl Debug for PreallocateMode
Source§impl PartialEq for PreallocateMode
impl PartialEq for PreallocateMode
impl Copy for PreallocateMode
impl Eq for PreallocateMode
impl StructuralPartialEq for PreallocateMode
Auto Trait Implementations§
impl Freeze for PreallocateMode
impl RefUnwindSafe for PreallocateMode
impl Send for PreallocateMode
impl Sync for PreallocateMode
impl Unpin for PreallocateMode
impl UnwindSafe for PreallocateMode
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