1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! This library provides primitive traits to serialize and deserialize
//! Linked-Data types. It is shipped with derive macros (using the `derive`
//! feature) that can automatically implement those primitives for you.
//!
//! # Example
//!
//! ```ignore
//! use rdf_syntax::{IriBuf, iri};
//! use linked_data::{SerializeLinkedData, DeserializeLinkedData};
//!
//! #[derive(SerializeLinkedData, DeserializeLinkedData)]
//! #[ld(prefix("ex" = "http://example.org/"))]
//! struct Foo {
//! #[ld(id)]
//! id: IriBuf,
//!
//! #[ld("ex:name")]
//! name: String,
//!
//! #[ld("ex:email")]
//! email: String
//! }
//!
//! let value = Foo {
//! id: iri!("http://example.org/JohnSmith").to_owned(),
//! name: "John Smith".to_owned(),
//! email: "john.smith@example.org".to_owned()
//! };
//!
//! let quads = linked_data::ser::to_rdf_quads(&value)
//! .expect("RDF serialization failed");
//!
//! for quad in quads {
//! println!("{quad} .")
//! }
//! ```
//!
//! This should print the following:
//! ```text
//! <http://example.org/JohnSmith> <http://example.org/name> "John Smith" .
//! <http://example.org/JohnSmith> <http://example.org/email> "john.smith@example.org" .
//! ```
pub use rdf_syntax;
pub use ;
pub use ;
pub use ;
/// Utility wrapper to turn lists into unordered collections.
;