pub struct FormatOptions {
pub block_size: u32,
pub size: u64,
pub uuid: Option<Uuid>,
pub label: Option<String>,
}Expand description
Parameters for creating a new ext4 image.
Construct via FormatOptions::new and layer on uuid / label as
needed. The resulting options are passed to Formatter::with_options.
Fields§
§block_size: u32Block size in bytes. Only 4096 is currently accepted; the field is explicit so future versions can widen the accepted set without another API break.
size: u64Total size of the image file in bytes.
uuid: Option<Uuid>UUID written to the superblock. None picks a random v4 UUID at
format time.
label: Option<String>Volume label. Must be ≤ 16 bytes UTF-8 and contain no NUL bytes.
None leaves the field zeroed.
Implementations§
Trait Implementations§
Source§impl Clone for FormatOptions
impl Clone for FormatOptions
Source§fn clone(&self) -> FormatOptions
fn clone(&self) -> FormatOptions
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 FormatOptions
impl RefUnwindSafe for FormatOptions
impl Send for FormatOptions
impl Sync for FormatOptions
impl Unpin for FormatOptions
impl UnsafeUnpin for FormatOptions
impl UnwindSafe for FormatOptions
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