1e7288888SMichael Zhao // Copyright © 2019 Intel Corporation 2e7288888SMichael Zhao // 3e7288888SMichael Zhao // SPDX-License-Identifier: Apache-2.0 OR BSD-3-Clause 4e7288888SMichael Zhao // 5e7288888SMichael Zhao // Copyright © 2020, Microsoft Corporation 6e7288888SMichael Zhao // 7e7288888SMichael Zhao // Copyright 2018-2019 CrowdStrike, Inc. 8e7288888SMichael Zhao // 9e7288888SMichael Zhao // Copyright 2020, ARM Limited 10e7288888SMichael Zhao // 11e7288888SMichael Zhao 12e7288888SMichael Zhao use thiserror::Error; 13e7288888SMichael Zhao 14e7288888SMichael Zhao #[derive(Error, Debug)] 15e7288888SMichael Zhao /// 16e7288888SMichael Zhao /// Enum for device error 17e7288888SMichael Zhao pub enum HypervisorDeviceError { 18e7288888SMichael Zhao /// 19e7288888SMichael Zhao /// Set device attribute error 20e7288888SMichael Zhao /// 21*72c81783SPhilipp Schuster #[error("Failed to set device attribute")] 22e7288888SMichael Zhao SetDeviceAttribute(#[source] anyhow::Error), 2389a6b63eSHenry Wang /// 2489a6b63eSHenry Wang /// Get device attribute error 2589a6b63eSHenry Wang /// 26*72c81783SPhilipp Schuster #[error("Failed to get device attribute")] 2789a6b63eSHenry Wang GetDeviceAttribute(#[source] anyhow::Error), 28e7288888SMichael Zhao } 29