@@ -16,8 +16,8 @@ pub struct Annotations {
1616 pub audience : Option < Vec < Role > > ,
1717 #[ serde( skip_serializing_if = "Option::is_none" ) ]
1818 pub priority : Option < f32 > ,
19- #[ serde( skip_serializing_if = "Option::is_none" ) ]
20- pub timestamp : Option < DateTime < Utc > > ,
19+ #[ serde( skip_serializing_if = "Option::is_none" , rename = "lastModified" ) ]
20+ pub last_modified : Option < DateTime < Utc > > ,
2121}
2222
2323impl Annotations {
@@ -30,7 +30,7 @@ impl Annotations {
3030 ) ;
3131 Annotations {
3232 priority : Some ( priority) ,
33- timestamp : Some ( timestamp) ,
33+ last_modified : Some ( timestamp) ,
3434 audience : None ,
3535 }
3636 }
@@ -72,7 +72,7 @@ impl<T: AnnotateAble> Annotated<T> {
7272 self . annotations . as_ref ( ) . and_then ( |a| a. priority )
7373 }
7474 pub fn timestamp ( & self ) -> Option < DateTime < Utc > > {
75- self . annotations . as_ref ( ) . and_then ( |a| a. timestamp )
75+ self . annotations . as_ref ( ) . and_then ( |a| a. last_modified )
7676 }
7777 pub fn with_audience ( self , audience : Vec < Role > ) -> Annotated < T >
7878 where
@@ -92,7 +92,7 @@ impl<T: AnnotateAble> Annotated<T> {
9292 annotations : Some ( Annotations {
9393 audience : Some ( audience) ,
9494 priority : None ,
95- timestamp : None ,
95+ last_modified : None ,
9696 } ) ,
9797 }
9898 }
@@ -114,7 +114,7 @@ impl<T: AnnotateAble> Annotated<T> {
114114 raw : self . raw ,
115115 annotations : Some ( Annotations {
116116 priority : Some ( priority) ,
117- timestamp : None ,
117+ last_modified : None ,
118118 audience : None ,
119119 } ) ,
120120 }
@@ -128,15 +128,15 @@ impl<T: AnnotateAble> Annotated<T> {
128128 Annotated {
129129 raw : self . raw ,
130130 annotations : Some ( Annotations {
131- timestamp : Some ( timestamp) ,
131+ last_modified : Some ( timestamp) ,
132132 ..annotations
133133 } ) ,
134134 }
135135 } else {
136136 Annotated {
137137 raw : self . raw ,
138138 annotations : Some ( Annotations {
139- timestamp : Some ( timestamp) ,
139+ last_modified : Some ( timestamp) ,
140140 priority : None ,
141141 audience : None ,
142142 } ) ,
@@ -211,7 +211,7 @@ pub trait AnnotateAble: sealed::Sealed {
211211 Self : Sized ,
212212 {
213213 self . annotate ( Annotations {
214- timestamp : Some ( timestamp) ,
214+ last_modified : Some ( timestamp) ,
215215 ..Default :: default ( )
216216 } )
217217 }
0 commit comments