Module properties

Module properties 

Source
Expand description

Namespace for properties of standard link types

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

use activitystreams_traits::Link;
use activitystreams_types::link::properties::LinkProperties;
use serde_derive::{Deserialize, Serialize};

#[derive(Clone, Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MyLink {
    #[serde(rename = "type")]
    pub kind: String,

    /// Define a require property for the MyLink type
    pub my_property: String,

    #[serde(flatten)]
    pub link_properties: LinkProperties,
}

impl Link for MyLink {}

Structsยง

LinkProperties
Define all the properties of the Object base type as described by the Activity Streams vocabulary.