@@ -27,10 +27,12 @@ use crate::{
2727 prelude:: { Validate , ValidationResult } ,
2828 validation:: ValidationContext ,
2929} ;
30+ #[ cfg( feature = "serde" ) ] use serde:: { Deserialize , Serialize } ;
3031
3132use super :: bom:: SpecVersion ;
3233
3334#[ derive( Clone , Debug , PartialEq , Eq ) ]
35+ #[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
3436pub struct Annotations ( pub Vec < Annotation > ) ;
3537
3638impl Validate for Annotations {
@@ -44,6 +46,7 @@ impl Validate for Annotations {
4446}
4547
4648#[ derive( Clone , Debug , PartialEq , Eq ) ]
49+ #[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
4750pub struct Annotation {
4851 pub bom_ref : Option < String > ,
4952 pub subjects : Vec < String > ,
@@ -64,6 +67,7 @@ impl Validate for Annotation {
6467
6568/// Represents an Annotator: organization, individual, component or service.
6669#[ derive( Clone , Debug , PartialEq , Eq ) ]
70+ #[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
6771pub enum Annotator {
6872 Organization ( OrganizationalEntity ) ,
6973 Individual ( OrganizationalContact ) ,
0 commit comments