[][src]Module activitystreams::collection::properties

Namespace for properties of standard collection types

To use these properties in your own types, you can flatten them into your struct with serde:

use activitystreams::{
    collection::properties::CollectionProperties,
    object::properties::ObjectProperties,
    Collection,
    Object,
    PropRefs,
};
use serde::{Deserialize, Serialize};
use std::any::Any;

#[derive(Clone, Debug, Serialize, Deserialize, PropRefs)]
#[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)]
    #[activitystreams(Object)]
    pub object_properties: ObjectProperties,

    #[serde(flatten)]
    #[activitystreams(Collection)]
    pub collection_properties: CollectionProperties,
}

Structs

CollectionPageProperties

The CollectionPage type extends from the base Collection type and inherits all of it's properties.

CollectionProperties

Collection objects are a specialization of the base Object that serve as a container for other Objects or Links.

OrderedCollectionPageProperties

The OrderedCollectionPage type MAY be used to identify a page whose items are strictly ordered.

Enums

CollectionPagePropertiesNextEnum

Variations for the next field from CollectionPageProperties

CollectionPagePropertiesPartOfEnum

Variations for the part_of field from CollectionPageProperties

CollectionPagePropertiesPrevEnum

Variations for the prev field from CollectionPageProperties

CollectionPropertiesCurrentEnum

Variations for the current field from CollectionProperties

CollectionPropertiesFirstEnum

Variations for the first field from CollectionProperties

CollectionPropertiesItemsEnum

Non-Terminating variations for the items field from CollectionProperties

CollectionPropertiesItemsTermEnum

Terminating variations for the items field from CollectionProperties

CollectionPropertiesLastEnum

Non-Terminating variations for the last field from CollectionProperties

CollectionPropertiesLastTermEnum

Terminating variations for the last field from CollectionProperties