pub enum DiskSource<'a> {
Device(&'a Path),
Image(&'a Path),
Handover(&'a Path),
}Expand description
What a disk being staged is — which decides what the VM gets, and what happens to the caller’s own copy.
Variants§
Device(&'a Path)
A block device — a device-mapper volume, a loop device — that the VM must open as one. Mirrored, never copied.
Image(&'a Path)
A file the caller keeps: the VM gets a private copy, so guest writes never reach the original.
Handover(&'a Path)
A file the caller gives up: it is moved in, and no longer exists at
the source once staging returns. The counterpart of
Staging::unstage_disk — the disk of a discarded VM, parked
outside, coming back into a fresh one.
Implementations§
Trait Implementations§
Source§impl<'a> Clone for DiskSource<'a>
impl<'a> Clone for DiskSource<'a>
impl<'a> Copy for DiskSource<'a>
Source§impl<'a> Debug for DiskSource<'a>
impl<'a> Debug for DiskSource<'a>
impl<'a> Eq for DiskSource<'a>
Source§impl<'a> PartialEq for DiskSource<'a>
impl<'a> PartialEq for DiskSource<'a>
impl<'a> StructuralPartialEq for DiskSource<'a>
Auto Trait Implementations§
impl<'a> Freeze for DiskSource<'a>
impl<'a> RefUnwindSafe for DiskSource<'a>
impl<'a> Send for DiskSource<'a>
impl<'a> Sync for DiskSource<'a>
impl<'a> Unpin for DiskSource<'a>
impl<'a> UnsafeUnpin for DiskSource<'a>
impl<'a> UnwindSafe for DiskSource<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.