pub struct Vtl2StorageControllerBuilder { /* private fields */ }Expand description
A builder for a VTL2 storage controller, which presents one or more LUNs to the guest.
The controller has a type (SCSI, IDE, or NVMe). For SCSI controllers, the guest identifies the controller by the supplied instance_id (a GUID). A single disk can be located by its LUN on a specific controller.
Implementations§
Source§impl Vtl2StorageControllerBuilder
impl Vtl2StorageControllerBuilder
Sourcepub fn scsi() -> Self
pub fn scsi() -> Self
Creates a new storage controller builder with default values (a SCSI
controller, with arbitrary instance_id and no disks).
Sourcepub fn with_instance_id(self, instance_id: Guid) -> Self
pub fn with_instance_id(self, instance_id: Guid) -> Self
Set the guest-visible instance GUID.
Sourcepub fn with_protocol(self, protocol: ControllerType) -> Self
pub fn with_protocol(self, protocol: ControllerType) -> Self
Change the guest-visible protocol.
Sourcepub fn add_lun(self, lun: Vtl2LunBuilder) -> Self
pub fn add_lun(self, lun: Vtl2LunBuilder) -> Self
Add a LUN to the controller.
Sourcepub fn add_luns(self, luns: Vec<Vtl2LunBuilder>) -> Self
pub fn add_luns(self, luns: Vec<Vtl2LunBuilder>) -> Self
Add a LUN to the controller.
Sourcepub fn build(self) -> StorageController
pub fn build(self) -> StorageController
Generate the VTL2 settings for the controller.
Trait Implementations§
Source§impl Debug for Vtl2StorageControllerBuilder
impl Debug for Vtl2StorageControllerBuilder
Source§impl PartialEq for Vtl2StorageControllerBuilder
impl PartialEq for Vtl2StorageControllerBuilder
Source§fn eq(&self, other: &Vtl2StorageControllerBuilder) -> bool
fn eq(&self, other: &Vtl2StorageControllerBuilder) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for Vtl2StorageControllerBuilder
impl StructuralPartialEq for Vtl2StorageControllerBuilder
Auto Trait Implementations§
impl Freeze for Vtl2StorageControllerBuilder
impl RefUnwindSafe for Vtl2StorageControllerBuilder
impl Send for Vtl2StorageControllerBuilder
impl Sync for Vtl2StorageControllerBuilder
impl Unpin for Vtl2StorageControllerBuilder
impl UnwindSafe for Vtl2StorageControllerBuilder
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
§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
Compare self to
key and return true if they are equal.