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§
- Object
Properties - Define all the properties of the Object base type as described by the Activity Streams vocabulary.
- Place
Properties - Define all the properties of the Location type as described by the Activity Streams vocabulary.
- Profile
Properties - Define all the properties of the Profile type as described by the Activity Streams vocabulary.
- Relationship
Properties - Define all the properties of the Relationship type as described by the Activity Streams vocabulary.
- Tombstone
Properties - 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