pub enum InitialContents<'a> {
FromCapacity(u64),
FromBufferAndCapactity(u64, &'a [u8]),
FromBuffer(&'a [u8]),
FromVmo(Vmo),
}
Expand description
The initial contents of the VMO. This also determines the size of the block device.
Variants§
FromCapacity(u64)
An empty VMO will be created with capacity for this many blocks.
FromBufferAndCapactity(u64, &'a [u8])
A VMO is created with capacity for this many blocks and the buffer’s contents copied into it.
FromBuffer(&'a [u8])
A VMO is created which is exactly large enough for the initial contents (rounded up to block size), and the buffer’s contents copied into it.
FromVmo(Vmo)
The provided VMO is used. If its size is not block-aligned, the data will be truncated.
Auto Trait Implementations§
impl<'a> Freeze for InitialContents<'a>
impl<'a> RefUnwindSafe for InitialContents<'a>
impl<'a> Send for InitialContents<'a>
impl<'a> Sync for InitialContents<'a>
impl<'a> Unpin for InitialContents<'a>
impl<'a> UnwindSafe for InitialContents<'a>
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