rdf_reader_cottas/lib.rs
1// This is free and unencumbered software released into the public domain.
2
3//! A COTTAS 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.cottas").await?;
13//!
14//! use rdf_reader_cottas::CottasReader;
15//! let reader = CottasReader::try_from(file).await?;
16//!
17//! use futures::StreamExt;
18//! reader
19//! .into_stream()
20//! .for_each(|triple| async move {
21//! eprintln!("{:?}", triple);
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 = "std")]
35extern crate std;
36
37mod error;
38pub use error::*;
39
40mod reader;
41pub use reader::*;
42
43mod term;
44pub use term::*;