pub struct Drive {
pub drive_id: String,
pub partuuid: Option<String>,
pub is_root_device: bool,
pub cache_type: Option<CacheType>,
pub is_read_only: bool,
pub path_on_host: String,
pub rate_limiter: Option<RateLimiter>,
pub io_engine: Option<IoEngine>,
pub socket: Option<String>,
}Fields§
§drive_id: Stringdrive id Required: true
partuuid: Option<String>partuuid Represents the unique id of the boot partition of this device. It is optional and it will be taken into account only if the is_root_device field is true.
is_root_device: boolis root device Required: true
cache_type: Option<CacheType>cache type Represents the caching strategy for the block device.
is_read_only: boolVirtioBlock specific parameters: Is block read only. This field is required for virtio-block config and should be omitted for vhost-user-block configuration. Required: true
path_on_host: StringVirtioBlock specific parameters: Host level path for the guest drive. This field is required for virtio-block config and should be omitted for vhost-user-block configuration. Required: true
rate_limiter: Option<RateLimiter>VirtioBlock specific parameters: rate limiter
io_engine: Option<IoEngine>VirtioBlock specific parameters: Type of the IO engine used by the device. “Async” is supported on host kernels newer than 5.10.51. This field is optional for virtio-block config and should be omitted for vhost-user-block configuration.
socket: Option<String>VhostUserBlock specific parameters Path to the socket of vhost-user-block backend. This field is required for vhost-user-block config should be omitted for virtio-block configuration.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Drive
impl<'de> Deserialize<'de> for Drive
Source§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 Ord for Drive
impl Ord for Drive
Source§impl PartialOrd for Drive
impl PartialOrd for Drive
impl Eq for Drive
impl StructuralPartialEq for Drive
Auto Trait Implementations§
impl Freeze for Drive
impl RefUnwindSafe for Drive
impl Send for Drive
impl Sync for Drive
impl Unpin for Drive
impl UnwindSafe for Drive
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more