use rio_api::iri::*; use rio_api::model::{NamedNode, Triple}; use rio_api::parser::TriplesParser; use rio_turtle::{TurtleError, TurtleParser}; use std::fs::File; use std::io::BufReader; fn main() { let rdf_type = NamedNode { iri: "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", }; let mut count = 0; let mut res = TurtleParser::new( BufReader::new(File::open("lv2core.ttl").unwrap()), "file:foo.ttl", ) .unwrap() .into_iter(|t| { println!("{}", t); Ok(()) as Result<(), TurtleError> }); for e in res { if let Err(e) = e { println!("{}", e); } } }