Module activitystreams_types::collection::properties
[−]
[src]
Namespace for properties of standard collection types
To use these properties in your own types, you can flatten them into your struct with serde:
extern crate activitystreams_traits; extern crate activitystreams_types; extern crate serde; #[macro_use] extern crate serde_derive; use activitystreams_traits::{Collection, Object}; use activitystreams_types::{ collection::properties::CollectionProperties, object::properties::ObjectProperties, }; #[derive(Clone, Debug, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct MyCollection { #[serde(rename = "type")] pub kind: String, /// Define a require property for the MyCollection type pub my_property: String, #[serde(flatten)] pub object_properties: ObjectProperties, #[serde(flatten)] pub collection_properties: CollectionProperties, } impl Object for MyCollection {} impl Collection for MyCollection {}
Structs
CollectionPageProperties |
The |
CollectionProperties |
|
OrderedCollectionPageProperties |
The OrderedCollectionPage type MAY be used to identify a page whose items are strictly ordered. |