Skip to main content

format_ntriples_to

Function format_ntriples_to 

Source
pub fn format_ntriples_to<W: Write>(quins: &[NQuin], out: &mut W) -> Result<()>
Expand description

Serialise quins as N-Triples, writing each line directly to out.

The function itself performs no heap allocation — it writes bytes directly to the caller-supplied W sink. Callers that need an in-memory buffer should pass &mut Vec<u8>.

Subject values are written via write_iri_term (which accounts for the MSB / did:q42 flag). Object values additionally check bits 60-62 for inline-typed literals.