pub struct DiskSpec {
pub id: String,
pub path: PathBuf,
pub read_only: bool,
pub root: bool,
pub cache: CacheMode,
}Expand description
One block device.
Fields§
§id: StringUnique within the spec; drivers use it as the device’s name, and as
a file name or URL segment, so it is held to the VmId rule
([A-Za-z0-9._-], at most 64 characters, not . or ..).
path: PathBufThe backing file on the host.
read_only: boolExpose the disk read-only.
root: boolThis disk holds the root filesystem (at most one per spec).
cache: CacheModeHost-side write caching.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DiskSpec
impl<'de> Deserialize<'de> for DiskSpec
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for DiskSpec
impl StructuralPartialEq for DiskSpec
Auto Trait Implementations§
impl Freeze for DiskSpec
impl RefUnwindSafe for DiskSpec
impl Send for DiskSpec
impl Sync for DiskSpec
impl Unpin for DiskSpec
impl UnsafeUnpin for DiskSpec
impl UnwindSafe for DiskSpec
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.