[][src]Crate activitystreams_traits

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 Object that describes some form of action that may happen, is currently happening, or has already happened.

Actor

Actor types are Object types that are capable of performing activities.

Collection

A Collection is a subtype of Object that represents ordered or unordered sets of Object or Link instances.

CollectionPage

Used to represent distinct subsets of items from a Collection.

IntransitiveActivity

Instances of IntransitiveActivity are a subtype of Activity representing 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 Definitions

Result

An alias for Result<T, Error>