pub struct BlockConfig {
pub drive_id: String,
pub path_on_host: PathBuf,
pub is_root_device: bool,
pub is_read_only: bool,
pub cache_type: CacheType,
pub partuuid: Option<String>,
}Expand description
Block-device configuration.
Fields§
§drive_id: StringOperator-supplied identifier — surfaces via VIRTIO_BLK_T_GET_ID.
path_on_host: PathBufPath to the host-side backing file.
is_root_device: booltrue if the drive is the root device (informational; no behavior).
is_read_only: booltrue opens the backing file read-only and offers VIRTIO_BLK_F_RO.
cache_type: CacheTypeUnsafe (no flush) or Writeback (flush honored).
partuuid: Option<String>PARTUUID, threaded into the FDT boot_args if is_root_device.
Trait Implementations§
Source§impl Clone for BlockConfig
impl Clone for BlockConfig
Source§fn clone(&self) -> BlockConfig
fn clone(&self) -> BlockConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BlockConfig
impl RefUnwindSafe for BlockConfig
impl Send for BlockConfig
impl Sync for BlockConfig
impl Unpin for BlockConfig
impl UnsafeUnpin for BlockConfig
impl UnwindSafe for BlockConfig
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