Expand description
Traits for Activity Streams
These traits don’t provide any functionality other than anotations for types created in other
projects. See the activitystreams-types crate for examples of how these traits could be used.
§Examples
use activitystreams_traits::{Object, Actor};
use serde_derive::{Deserialize, Serialize};
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct Persona {
#[serde(rename = "@context")]
context: serde_json::Value,
#[serde(rename = "type")]
kind: String,
}
impl Object for Persona {}
impl Actor for Persona {}
Modules§
- properties
- A module containing helpers for tranlsating common JSON representations to and from concrete types
Enums§
- Error
- The Error type
Traits§
- Activity
- An Activity is a subtype of
Objectthat describes some form of action that may happen, is currently happening, or has already happened. - Actor
Actortypes areObjecttypes that are capable of performing activities.- Collection
- A Collection is a subtype of
Objectthat represents ordered or unordered sets ofObjectorLinkinstances. - Collection
Page - Used to represent distinct subsets of items from a Collection.
- Intransitive
Activity - Instances of
IntransitiveActivityare a subtype ofActivityrepresenting intransitive actions. - Link
- A Link is an indirect, qualified reference to a resource identified by a URL.
- Object
- Describes an object of any kind.
Type Aliases§
- Result
- An alias for Result<T, Error>