vtl2_settings_proto

Struct Lun

Source
pub struct Lun {
Show 24 fields pub channel: Option<u32>, pub location: u32, pub device_id: String, pub vendor_id: String, pub product_id: String, pub product_revision_level: String, pub serial_number: String, pub model_number: String, pub medium_rotation_rate: Option<u32>, pub physical_sector_size: Option<u32>, pub fua: Option<bool>, pub write_cache: Option<bool>, pub odx: Option<bool>, pub disable_thin_provisioning: Option<bool>, pub max_transfer_length: Option<u64>, pub physical_devices: Option<PhysicalDevices>, pub is_dvd: bool, pub chunk_size_in_kb: u32, pub scsi_disk_size_in_bytes: Option<u64>, pub ntfs_guid: Option<String>, pub total_logic_size_in_kb: u32, pub device_type: Option<i32>, pub device_path: Option<String>, pub sub_device_path: Option<u32>,
}

Fields§

§channel: Option<u32>§location: u32§device_id: String

GUID

§vendor_id: String§product_id: String§product_revision_level: String§serial_number: String§model_number: String§medium_rotation_rate: Option<u32>

Override the disk’s SCSI rotation rate.

§physical_sector_size: Option<u32>

Override the disk’s physical sector size.

§fua: Option<bool>

Override whether the disk reports FUA support.

§write_cache: Option<bool>

Override whether the disk reports that it has a cache.

§odx: Option<bool>

Override whether the disk supports ODX (copy offload).

§disable_thin_provisioning: Option<bool>

Override unmap/trim support. If true, disable unmap. If false, enable unmap. If missing, use the backend disk’s settings.

§max_transfer_length: Option<u64>

Override the disk’s maximum write same length.

§physical_devices: Option<PhysicalDevices>§is_dvd: bool§chunk_size_in_kb: u32§scsi_disk_size_in_bytes: Option<u64>

Specify small size vm, for example independently attach a 75GB NVMe controller, but show as a 5GB SCSI disk inside VM

§ntfs_guid: Option<String>

GUID for NTFS format

GUID

§total_logic_size_in_kb: u32
👎Deprecated

unused

§device_type: Option<i32>
👎Deprecated

compat

§device_path: Option<String>
👎Deprecated

compat

§sub_device_path: Option<u32>
👎Deprecated

compat

Implementations§

Source§

impl Lun

Source

pub fn channel(&self) -> u32

Returns the value of channel, or the default value if channel is unset.

Source

pub fn medium_rotation_rate(&self) -> u32

Returns the value of medium_rotation_rate, or the default value if medium_rotation_rate is unset.

Source

pub fn physical_sector_size(&self) -> u32

Returns the value of physical_sector_size, or the default value if physical_sector_size is unset.

Source

pub fn fua(&self) -> bool

Returns the value of fua, or the default value if fua is unset.

Source

pub fn write_cache(&self) -> bool

Returns the value of write_cache, or the default value if write_cache is unset.

Source

pub fn odx(&self) -> bool

Returns the value of odx, or the default value if odx is unset.

Source

pub fn disable_thin_provisioning(&self) -> bool

Returns the value of disable_thin_provisioning, or the default value if disable_thin_provisioning is unset.

Source

pub fn max_transfer_length(&self) -> u64

Returns the value of max_transfer_length, or the default value if max_transfer_length is unset.

Source

pub fn scsi_disk_size_in_bytes(&self) -> u64

Returns the value of scsi_disk_size_in_bytes, or the default value if scsi_disk_size_in_bytes is unset.

Source

pub fn ntfs_guid(&self) -> &str

Returns the value of ntfs_guid, or the default value if ntfs_guid is unset.

Source

pub fn device_type(&self) -> DeviceType

Returns the enum value of device_type, or the default if the field is unset or set to an invalid enum value.

Source

pub fn set_device_type(&mut self, value: DeviceType)

Sets device_type to the provided enum value.

Source

pub fn device_path(&self) -> &str

Returns the value of device_path, or the default value if device_path is unset.

Source

pub fn sub_device_path(&self) -> u32

Returns the value of sub_device_path, or the default value if sub_device_path is unset.

Trait Implementations§

Source§

impl Clone for Lun

Source§

fn clone(&self) -> Lun

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Lun

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Lun

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
§

impl<'de> Deserialize<'de> for Lun

§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Message for Lun

Source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
Source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
Source§

fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message to a buffer. Read more
Source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
Source§

fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
Source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
Source§

fn decode<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes an instance of the message from a buffer. Read more
Source§

fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes a length-delimited instance of the message from the buffer.
Source§

fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
Source§

fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
Source§

impl PartialEq for Lun

Source§

fn eq(&self, other: &Lun) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl Serialize for Lun

§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Lun

Auto Trait Implementations§

§

impl Freeze for Lun

§

impl RefUnwindSafe for Lun

§

impl Send for Lun

§

impl Sync for Lun

§

impl Unpin for Lun

§

impl UnwindSafe for Lun

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,