floppy_resources/
lib.rs

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4//! Client definitions for describing floppy controller configuration.
5//!
6//! TODO: refactor to support `Resource`-based instantiation of floppy
7//! controllers, at which point this crate name makes sense.
8
9#![forbid(unsafe_code)]
10
11use mesh::MeshPayload;
12use vm_resource::Resource;
13use vm_resource::kind::DiskHandleKind;
14
15/// The configuration for a floppy disk.
16#[derive(Debug, MeshPayload)]
17pub struct FloppyDiskConfig {
18    /// The backing disk media.
19    pub disk_type: Resource<DiskHandleKind>,
20    /// Whether the disk is read-only.
21    pub read_only: bool,
22}
23
24/// The configuration for a floppy controller.
25#[derive(Debug, MeshPayload)]
26pub struct FloppyControllerConfig {
27    /// The floppy disks attached to the controller.
28    pub floppy_disks: Vec<FloppyDiskConfig>,
29}