@@ -76,6 +76,7 @@ impl TrackingData {
76
76
}
77
77
78
78
#[ derive( Clone , Debug ) ]
79
+ #[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
79
80
pub struct ResourceErrorIdent {
80
81
r#type : & ' static str ,
81
82
label : String ,
@@ -341,6 +342,8 @@ pub struct BufferMapOperation {
341
342
}
342
343
343
344
#[ derive( Clone , Debug , Error ) ]
345
+ #[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
346
+ #[ cfg_attr( feature = "serde" , serde( bound( deserialize = "'de: 'static" ) ) ) ]
344
347
#[ non_exhaustive]
345
348
pub enum BufferAccessError {
346
349
#[ error( transparent) ]
@@ -389,6 +392,8 @@ pub enum BufferAccessError {
389
392
}
390
393
391
394
#[ derive( Clone , Debug , Error ) ]
395
+ #[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
396
+ #[ cfg_attr( feature = "serde" , serde( bound( deserialize = "'de: 'static" ) ) ) ]
392
397
#[ error( "Usage flags {actual:?} of {res} do not contain required usage flags {expected:?}" ) ]
393
398
pub struct MissingBufferUsageError {
394
399
pub ( crate ) res : ResourceErrorIdent ,
@@ -405,6 +410,8 @@ pub struct MissingTextureUsageError {
405
410
}
406
411
407
412
#[ derive( Clone , Debug , Error ) ]
413
+ #[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
414
+ #[ cfg_attr( feature = "serde" , serde( bound( deserialize = "'de: 'static" ) ) ) ]
408
415
#[ error( "{0} has been destroyed" ) ]
409
416
pub struct DestroyedResourceError ( pub ResourceErrorIdent ) ;
410
417
0 commit comments