Skip to main content

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//! See: <https://github.com/cottas-rdf>
29
30#![no_std]
31#![deny(unsafe_code)]
32
33#[cfg(feature = "alloc")]
34extern crate alloc;
35
36#[cfg(feature = "std")]
37extern crate std;
38
39mod error;
40pub use error::*;
41
42mod reader;
43pub use reader::*;
44
45mod term;
46pub use term::*;