pub struct FormatCreateBuilderBase<S: Storage> {
image: S,
size: u64,
prealloc_mode: PreallocateMode,
}
Expand description
Image creation builder with the most basic options.
Fields§
§image: S
Metadata (image) file
size: u64
Virtual disk size
prealloc_mode: PreallocateMode
Preallocation mode
Implementations§
Source§impl<S: Storage> FormatCreateBuilderBase<S>
impl<S: Storage> FormatCreateBuilderBase<S>
Sourcepub fn new(image: S) -> Self
pub fn new(image: S) -> Self
Helper for FormatCreateBuilder::new()
.
Sourcepub fn set_size(&mut self, size: u64)
pub fn set_size(&mut self, size: u64)
Helper for FormatCreateBuilder::size()
.
Sourcepub fn set_preallocate(&mut self, prealloc_mode: PreallocateMode)
pub fn set_preallocate(&mut self, prealloc_mode: PreallocateMode)
Helper for FormatCreateBuilder::preallocate()
.
Sourcepub fn get_preallocate(&self) -> PreallocateMode
pub fn get_preallocate(&self) -> PreallocateMode
Get the preallocation mode.
Sourcepub fn get_image_ref(&self) -> &S
pub fn get_image_ref(&self) -> &S
Get the image file to be formatted, by reference.
Auto Trait Implementations§
impl<S> Freeze for FormatCreateBuilderBase<S>where
S: Freeze,
impl<S> RefUnwindSafe for FormatCreateBuilderBase<S>where
S: RefUnwindSafe,
impl<S> Send for FormatCreateBuilderBase<S>
impl<S> Sync for FormatCreateBuilderBase<S>
impl<S> Unpin for FormatCreateBuilderBase<S>where
S: Unpin,
impl<S> UnwindSafe for FormatCreateBuilderBase<S>where
S: UnwindSafe,
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