_=>bail!("The given explanation file {} must have an extension that is .json or .txt",explain_file.display())
_=>bail!("The given explanation file {} must have an extension that is .json or .txt",explain_file.display())
}
}
close_file_writer(file)?;
}elseifexplain||stats{
}elseifexplain||stats{
eprintln!("{:#?}",explanation);
eprintln!("{:#?}",explanation);
}
}
@ -648,19 +649,18 @@ fn bulk_load(
Ok(())
Ok(())
}
}
fndump(
fndump<W: Write>(
store: &Store,
store: &Store,
writer: implWrite,
writer: W,
format: RdfFormat,
format: RdfFormat,
from_graph_name: Option<GraphNameRef<'_>>,
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");
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)
store.dump_graph(writer,format,from_graph_name)
}else{
}else{
store.dump_dataset(writer,format)
store.dump_dataset(writer,format)
}?;
}?)
Ok(())
}
}
fnformat_from_path<T>(
fnformat_from_path<T>(
@ -1631,6 +1631,14 @@ impl Write for ReadForWriteWriter {