[−][src]Derive Macro activitystreams_derive::PropRefs
#[derive(PropRefs)] { // Attributes available to this derive: #[prop_refs] }
Derive implementations for activitystreams objects
ⓘThis example is not tested
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize, PropRefs)] #[prop_refs(Object)] pub struct MyStruct { /// Derive AsRef<MyProperties> and AsMut<MyProperties> delegating to `my_field` #[prop_refs] my_field: MyProperties, /// Derive the above, plus Object (activitystreams) #[prop_refs] obj_field: ObjectProperties, }