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
unused
device_type: Option<i32>
compat
device_path: Option<String>
compat
sub_device_path: Option<u32>
compat
Implementations§
Source§impl Lun
impl Lun
Sourcepub fn channel(&self) -> u32
pub fn channel(&self) -> u32
Returns the value of channel
, or the default value if channel
is unset.
Sourcepub fn medium_rotation_rate(&self) -> u32
pub fn medium_rotation_rate(&self) -> u32
Returns the value of medium_rotation_rate
, or the default value if medium_rotation_rate
is unset.
Sourcepub fn physical_sector_size(&self) -> u32
pub fn physical_sector_size(&self) -> u32
Returns the value of physical_sector_size
, or the default value if physical_sector_size
is unset.
Sourcepub fn write_cache(&self) -> bool
pub fn write_cache(&self) -> bool
Returns the value of write_cache
, or the default value if write_cache
is unset.
Sourcepub fn disable_thin_provisioning(&self) -> bool
pub fn disable_thin_provisioning(&self) -> bool
Returns the value of disable_thin_provisioning
, or the default value if disable_thin_provisioning
is unset.
Sourcepub fn max_transfer_length(&self) -> u64
pub fn max_transfer_length(&self) -> u64
Returns the value of max_transfer_length
, or the default value if max_transfer_length
is unset.
Sourcepub fn scsi_disk_size_in_bytes(&self) -> u64
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.
Sourcepub fn ntfs_guid(&self) -> &str
pub fn ntfs_guid(&self) -> &str
Returns the value of ntfs_guid
, or the default value if ntfs_guid
is unset.
Sourcepub fn device_type(&self) -> DeviceType
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.
Sourcepub fn set_device_type(&mut self, value: DeviceType)
pub fn set_device_type(&mut self, value: DeviceType)
Sets device_type
to the provided enum value.
Sourcepub fn device_path(&self) -> &str
pub fn device_path(&self) -> &str
Returns the value of device_path
, or the default value if device_path
is unset.
Sourcepub fn sub_device_path(&self) -> u32
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§
§impl<'de> Deserialize<'de> for Lun
impl<'de> Deserialize<'de> for Lun
§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl Message for Lun
impl Message for Lun
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self
.