xref: /cloud-hypervisor/hypervisor/src/device.rs (revision 686e6d50824fcc7403a51b91545899a6301d6216)
1 // Copyright © 2019 Intel Corporation
2 //
3 // SPDX-License-Identifier: Apache-2.0 OR BSD-3-Clause
4 //
5 // Copyright © 2020, Microsoft Corporation
6 //
7 // Copyright 2018-2019 CrowdStrike, Inc.
8 //
9 // Copyright 2020, ARM Limited
10 //
11 
12 use thiserror::Error;
13 
14 #[derive(Error, Debug)]
15 ///
16 /// Enum for device error
17 pub enum HypervisorDeviceError {
18     ///
19     /// Set device attribute error
20     ///
21     #[error("Failed to set device attribute: {0}")]
22     SetDeviceAttribute(#[source] anyhow::Error),
23     ///
24     /// Get device attribute error
25     ///
26     #[error("Failed to get device attribute: {0}")]
27     GetDeviceAttribute(#[source] anyhow::Error),
28 }
29