mirror of
https://git.asonix.dog/asonix/activitystreams.git
synced 2024-11-25 13:21:00 +00:00
Update readmes
This commit is contained in:
parent
0673f48634
commit
306d4a3289
4 changed files with 6 additions and 33 deletions
19
README.md
19
README.md
|
@ -17,14 +17,8 @@ activitystreams = "0.3"
|
|||
|
||||
And then use it in your project
|
||||
```rust
|
||||
extern crate activitystreams;
|
||||
extern crate anyhow;
|
||||
extern crate serde;
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
extern crate serde_json;
|
||||
|
||||
use activitystreams::{context, Object, Actor, object::Profile};
|
||||
use serde_derive::{Serialize, Deserialize};
|
||||
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
|
@ -73,17 +67,10 @@ serde_json = "1.0"
|
|||
And then in your project
|
||||
```rust
|
||||
#[macro_use]
|
||||
extern crate activitystreams_derive;
|
||||
extern crate activitystreams_traits;
|
||||
extern crate activitystreams_types;
|
||||
extern crate anyhow;
|
||||
extern crate serde;
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
extern crate serde_json;
|
||||
|
||||
use activitystreams_derive::{Properties, UnitString};
|
||||
use activitystreams_traits::{Link, Object};
|
||||
use activitystreams_types::{CustomLink, link::Mention};
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
|
||||
/// Using the UnitString derive macro
|
||||
///
|
||||
|
|
|
@ -19,15 +19,9 @@ serde_json = "1.0"
|
|||
|
||||
And then in your project
|
||||
```rust
|
||||
#[macro_use]
|
||||
extern crate activitystreams_derive;
|
||||
extern crate activitystreams_traits;
|
||||
extern crate serde;
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
extern crate serde_json;
|
||||
|
||||
use activitystreams_derive::{Properties, UnitString};
|
||||
use activitystreams_traits::{Link, Object};
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
|
||||
/// Using the UnitString derive macro
|
||||
///
|
||||
|
|
|
@ -11,12 +11,8 @@ projects. See the `activitystreams-types` crate for examples of how these traits
|
|||
## Examples
|
||||
|
||||
```rust
|
||||
extern crate activitystreams_traits;
|
||||
extern crate serde;
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
|
||||
use activitystreams_traits::{Object, Actor};
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
|
|
|
@ -17,10 +17,6 @@ Then use it in your project!
|
|||
```rust
|
||||
// in your project
|
||||
|
||||
extern crate activitystreams_types;
|
||||
extern crate failure;
|
||||
extern crate serde_json;
|
||||
|
||||
use activitystreams_types::{context, link::Mention};
|
||||
use failure::Error;
|
||||
|
||||
|
|
Loading…
Reference in a new issue