Make RequestDeviceError (de)serializable

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
sagudev 2024-07-19 15:43:21 +02:00 committed by Connor Fitzgerald
parent 56d418f121
commit 7a73c75e6a

View File

@ -23,6 +23,7 @@ type HalInstance<A> = <A as hal::Api>::Instance;
type HalSurface<A> = <A as hal::Api>::Surface; type HalSurface<A> = <A as hal::Api>::Surface;
#[derive(Clone, Debug, Error)] #[derive(Clone, Debug, Error)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[error("Limit '{name}' value {requested} is better than allowed {allowed}")] #[error("Limit '{name}' value {requested} is better than allowed {allowed}")]
pub struct FailedLimit { pub struct FailedLimit {
name: &'static str, name: &'static str,
@ -391,6 +392,8 @@ pub enum GetSurfaceSupportError {
} }
#[derive(Clone, Debug, Error)] #[derive(Clone, Debug, Error)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(bound(deserialize = "'de: 'static")))]
/// Error when requesting a device from the adaptor /// Error when requesting a device from the adaptor
#[non_exhaustive] #[non_exhaustive]
pub enum RequestDeviceError { pub enum RequestDeviceError {