Module properties

Module properties 

Source
Expand description

Namespace for properties of standard object types

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

use activitystreams_traits::Object;
use activitystreams_types::object::properties::ObjectProperties;
use serde_derive::{Deserialize, Serialize};

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

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

    #[serde(flatten)]
    pub object_properties: ObjectProperties,
}

impl Object for MyObject {}

Structs§

ObjectProperties
Define all the properties of the Object base type as described by the Activity Streams vocabulary.
PlaceProperties
Define all the properties of the Location type as described by the Activity Streams vocabulary.
ProfileProperties
Define all the properties of the Profile type as described by the Activity Streams vocabulary.
RelationshipProperties
Define all the properties of the Relationship type as described by the Activity Streams vocabulary.
TombstoneProperties
Define all the properties of the Tombstone type as described by the Activity Streams vocabulary.

Type Aliases§

UtcTime
Alias chrono::DateTime for use in derive macros