mirror of
https://git.asonix.dog/asonix/activitystreams.git
synced 2024-11-22 03:40:59 +00:00
Fix test for traits
This commit is contained in:
parent
bb3112fb10
commit
6bb22797be
2 changed files with 9 additions and 0 deletions
|
@ -12,3 +12,6 @@ keywords = ["activitystreams", "activitypub"]
|
|||
failure = "0.1"
|
||||
serde = "1.0"
|
||||
serde_json = "1.0"
|
||||
|
||||
[dev-dependencies]
|
||||
serde_derive = "1.0"
|
||||
|
|
|
@ -29,18 +29,24 @@
|
|||
//! 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 {}
|
||||
//!
|
||||
//! # fn main() {}
|
||||
//! ```
|
||||
|
||||
#[macro_use]
|
||||
|
|
Loading…
Reference in a new issue