pub struct Vtl2LunBuilder { /* private fields */ }Expand description
A builder for a VTL2 LUN, which is a storage device presented from VTL2 to the guest.
A LUN can be one of two flavors: a disk or a DVD (really a virtual optical device, since it’s a CD-ROM when presented over IDE). A DVD can be empty (backed by no physical devices) or it can be backed by one or more physical devices. A disk must be backed by one or more physical devices. (This is not checked, since there may be interesting test cases that need to violate these requirements.)
Implementations§
Source§impl Vtl2LunBuilder
impl Vtl2LunBuilder
Sourcepub fn disk() -> Self
pub fn disk() -> Self
Creates a new disk LUN builder with default values. Here “disk” is as opposed to NOT a DVD.
Sourcepub fn dvd() -> Self
pub fn dvd() -> Self
Creates a new dvd LUN builder with default values. Here “dvd” is as opposed to NOT a disk.
Sourcepub fn with_location(self, location: u32) -> Self
pub fn with_location(self, location: u32) -> Self
Guest visible location of the device (aka a guest “LUN”)
Sourcepub fn with_physical_devices(
self,
physical_devices: Vec<Vtl2StorageBackingDeviceBuilder>,
) -> Self
pub fn with_physical_devices( self, physical_devices: Vec<Vtl2StorageBackingDeviceBuilder>, ) -> Self
The physical devices backing the LUN.
Overwrites any current physical backing device configuration (one or many).
Sourcepub fn with_physical_device(
self,
physical_device: Vtl2StorageBackingDeviceBuilder,
) -> Self
pub fn with_physical_device( self, physical_device: Vtl2StorageBackingDeviceBuilder, ) -> Self
The single physical device backing the LUN.
Overwrites any current physical backing device configuration (one or many).
Sourcepub fn with_chunk_size_in_kb(self, chunk_size_in_kb: u32) -> Self
pub fn with_chunk_size_in_kb(self, chunk_size_in_kb: u32) -> Self
For striped devices, the size of the stripe chunk in KB.
Trait Implementations§
Source§impl Debug for Vtl2LunBuilder
impl Debug for Vtl2LunBuilder
Source§impl PartialEq for Vtl2LunBuilder
impl PartialEq for Vtl2LunBuilder
impl Eq for Vtl2LunBuilder
impl StructuralPartialEq for Vtl2LunBuilder
Auto Trait Implementations§
impl Freeze for Vtl2LunBuilder
impl RefUnwindSafe for Vtl2LunBuilder
impl Send for Vtl2LunBuilder
impl Sync for Vtl2LunBuilder
impl Unpin for Vtl2LunBuilder
impl UnwindSafe for Vtl2LunBuilder
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.