Crate activitystreams_traits [−] [src]
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
extern crate activitystreams_traits; extern crate serde; #[macro_use] extern crate serde_derive; extern crate serde_json; use activitystreams_traits::{Object, Actor}; #[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 |
Actor |
|
Collection |
A Collection is a subtype of |
CollectionPage |
Used to represent distinct subsets of items from a Collection. |
IntransitiveActivity |
Instances of |
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> |