#![allow(missing_docs)]
#[allow(unused_imports)]
use crate::disk_image::DiskImageFormat;
#[allow(unused_imports)]
pub use firkin_types::{BlockDeviceId, Size, VirtiofsTag, VmId, VsockPort};
#[allow(unused_imports)]
use std::path::{Path, PathBuf};
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct VirtiofsShare {
pub(crate) tag: VirtiofsTag,
pub(crate) host_path: PathBuf,
}
impl VirtiofsShare {
#[must_use]
pub fn tag(&self) -> &VirtiofsTag {
&self.tag
}
#[must_use]
pub fn host_path(&self) -> &Path {
&self.host_path
}
}
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct BlockDevice {
pub(crate) id: BlockDeviceId,
pub(crate) path: PathBuf,
pub(crate) disk_image_format: DiskImageFormat,
pub(crate) read_only: bool,
}
impl BlockDevice {
#[must_use]
pub const fn id(&self) -> BlockDeviceId {
self.id
}
#[must_use]
pub fn path(&self) -> &Path {
&self.path
}
#[must_use]
pub const fn disk_image_format(&self) -> DiskImageFormat {
self.disk_image_format
}
#[must_use]
pub const fn read_only(&self) -> bool {
self.read_only
}
}