From 96e9ad61bffdfe3d55dfe2da2581773b7bdee5d6 Mon Sep 17 00:00:00 2001 From: asonix Date: Wed, 13 May 2020 22:54:50 -0500 Subject: [PATCH] Hmmm... --- .gitignore | 2 + Cargo.toml | 15 + examples/basic.rs | 36 +++ examples/de.rs | 68 ++++ src/activity.rs | 793 +++++++++++++++++++++++++++++++++++++++++++++ src/actor.rs | 162 ++++++++++ src/collection.rs | 295 +++++++++++++++++ src/either.rs | 38 +++ src/lib.rs | 9 + src/object.rs | 806 ++++++++++++++++++++++++++++++++++++++++++++++ src/primitives.rs | 210 ++++++++++++ src/traits.rs | 38 +++ 12 files changed, 2472 insertions(+) create mode 100644 .gitignore create mode 100644 Cargo.toml create mode 100644 examples/basic.rs create mode 100644 examples/de.rs create mode 100644 src/activity.rs create mode 100644 src/actor.rs create mode 100644 src/collection.rs create mode 100644 src/either.rs create mode 100644 src/lib.rs create mode 100644 src/object.rs create mode 100644 src/primitives.rs create mode 100644 src/traits.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..96ef6c0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/target +Cargo.lock diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..d62168e --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "activitystreams-new" +version = "0.1.0" +authors = ["asonix "] +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +activitystreams = { version = "0.6.1", default-features = false, features = ["kinds","primitives"] } +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" + +[dev-dependencies] +anyhow = "1.0" diff --git a/examples/basic.rs b/examples/basic.rs new file mode 100644 index 0000000..3d28669 --- /dev/null +++ b/examples/basic.rs @@ -0,0 +1,36 @@ +use activitystreams_new::{ + context, + object::{ApObject, Video}, + primitives::{XsdAnyUri, XsdString}, +}; + +fn main() -> Result<(), Box> { + let mut v: ApObject