rdf_reader_trig/lib.rs
1// This is free and unencumbered software released into the public domain.
2
3//! A TriG file reader for RDF.rs, a Rust framework for RDF
4//! knowledge graphs.
5//!
6//! # Examples
7//!
8//! ```rust,no_run
9//! # #[tokio::main]
10//! # async fn main() -> Result<(), Box<dyn std::error::Error>> {
11//! use tokio::fs::File;
12//! let file = File::open("example.trig").await?;
13//!
14//! use rdf_reader_trig::TrigReader;
15//! let reader = TrigReader::from(file);
16//!
17//! use futures::StreamExt;
18//! reader
19//! .into_stream()
20//! .for_each(|quad| async move {
21//! eprintln!("{:?}", quad);
22//! })
23//! .await;
24//! # Ok(())
25//! # }
26//! ```
27
28#![no_std]
29#![deny(unsafe_code)]
30
31#[cfg(feature = "alloc")]
32extern crate alloc;
33
34#[cfg(feature = "oxrdf")]
35mod oxrdf {
36 mod error;
37 pub use error::*;
38
39 mod quad;
40 pub use quad::*;
41
42 mod reader;
43 pub use reader::*;
44}
45#[cfg(feature = "oxrdf")]
46pub use oxrdf::*;