activitystreams_traits/
lib.rs

1/*
2 * This file is part of ActivityStreams Traits.
3 *
4 * Copyright © 2018 Riley Trautman
5 *
6 * ActivityStreams Traits is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * ActivityStreams Traits is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with ActivityStreams Traits.  If not, see <http://www.gnu.org/licenses/>.
18 */
19
20//! Traits for Activity Streams
21//!
22//! These traits don't provide any functionality other than anotations for types created in other
23//! projects. See the `activitystreams-types` crate for examples of how these traits could be used.
24//!
25//! ## Examples
26//!
27//! ```rust
28//! use activitystreams_traits::{Object, Actor};
29//! use serde_derive::{Deserialize, Serialize};
30//!
31//! #[derive(Clone, Debug, Default, Deserialize, Serialize)]
32//! #[serde(rename_all = "camelCase")]
33//! pub struct Persona {
34//!     #[serde(rename = "@context")]
35//!     context: serde_json::Value,
36//!
37//!     #[serde(rename = "type")]
38//!     kind: String,
39//! }
40//!
41//! impl Object for Persona {}
42//! impl Actor for Persona {}
43//!
44//! # fn main() {}
45//! ```
46
47mod activity;
48mod actor;
49mod collection;
50mod error;
51mod link;
52mod object;
53pub mod properties;
54
55pub use self::activity::*;
56pub use self::actor::*;
57pub use self::collection::*;
58pub use self::error::*;
59pub use self::link::*;
60pub use self::object::*;