pub mod csv;
pub mod mm;
pub mod rdf;
pub use csv::Csv;
pub use mm::MatrixMarket;
pub use rdf::{Rdf, RdfFormat};
use oxttl::TurtleSyntaxError;
use thiserror::Error;
use crate::lagraph_sys::GrB_Info;
#[derive(Error, Debug)]
pub enum FormatError {
#[error("CSV error: {0}")]
Csv(#[from] ::csv::Error),
#[error("Missing CSV column '{name}'")]
MissingColumn { name: String },
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
#[error("MatrixMarket read error (code {code}): {message}")]
MatrixMarket { code: GrB_Info, message: String },
#[error("Invalid format in '{file}' at line {line}: {reason}")]
InvalidFormat {
file: String,
line: usize,
reason: String,
},
#[error("RDF parse error: {0}")]
Rdf(#[from] TurtleSyntaxError),
#[error("RDF literal cannot be used as a graph node")]
LiteralAsNode,
}