_=>bail!("The given explanation file {} must have an extension that is .json or .txt",explain_file.display())
}
close_file_writer(file)?;
}elseifexplain||stats{
eprintln!("{:#?}",explanation);
}
@ -648,19 +649,18 @@ fn bulk_load(
Ok(())
}
fndump(
fndump<W: Write>(
store: &Store,
writer: implWrite,
writer: W,
format: RdfFormat,
from_graph_name: Option<GraphNameRef<'_>>,
)-> anyhow::Result<()>{
)-> anyhow::Result<W>{
ensure!(format.supports_datasets()||from_graph_name.is_some(),"The --graph option is required when writing a format not supporting datasets like NTriples, Turtle or RDF/XML");
ifletSome(from_graph_name)=from_graph_name{
Ok(ifletSome(from_graph_name)=from_graph_name{
store.dump_graph(writer,format,from_graph_name)
}else{
store.dump_dataset(writer,format)
}?;
Ok(())
}?)
}
fnformat_from_path<T>(
@ -1631,6 +1631,14 @@ impl Write for ReadForWriteWriter {