[][src]Crate activitystreams_types

ActivityStreams Types

This crate defines the base set of types from the Activity Streams specification.

Example Usage

use activitystreams_types::{context, link::Mention};

fn run() -> Result<(), anyhow::Error> {
    /// A Mention is the only predefined Link type in the Activity Streams spec
    let mut mention = Mention::default();
    mention.as_mut().set_context_xsd_any_uri(context())?;

    let mention_string = serde_json::to_string(&mention)?;

    let mention: Mention = serde_json::from_str(&mention_string)?;

    Ok(())
}

Modules

activity
actor

Namespace for Actor types

collection

Namespace for Collection types

link

Namespace for Link types

object

Namespace for Object types

primitives

Types defined as 'primitives' are used as building-blocks for ActivityStreams objects.

Functions

context

The context associated with all of the Activity Streams types defined in the crate.