xref: /cloud-hypervisor/hypervisor/src/device.rs (revision 190a11f2124b0b60a2d44e85b7c9988373acfb6d)
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")]
22     SetDeviceAttribute(#[source] anyhow::Error),
23     ///
24     /// Get device attribute error
25     ///
26     #[error("Failed to get device attribute")]
27     GetDeviceAttribute(#[source] anyhow::Error),
28 }
29