pub trait TripleSerializer {
    type Error: 'static + Error;

    // Required method
    fn serialize_triples<TS>(
        &mut self,
        source: TS
    ) -> StreamResult<&mut Self, TS::Error, Self::Error>
       where TS: TripleSource,
             Self: Sized;

    // Provided method
    fn serialize_graph<G>(
        &mut self,
        graph: &G
    ) -> StreamResult<&mut Self, G::Error, Self::Error>
       where G: Graph,
             Self: Sized { ... }
}
Expand description

A triple serializer writes triples according to a given format.

Required Associated Types§

source

type Error: 'static + Error

The error type that may be raised during serialization.

Required Methods§

source

fn serialize_triples<TS>( &mut self, source: TS ) -> StreamResult<&mut Self, TS::Error, Self::Error>
where TS: TripleSource, Self: Sized,

Serialize all triples from the given TripleSource.

Provided Methods§

source

fn serialize_graph<G>( &mut self, graph: &G ) -> StreamResult<&mut Self, G::Error, Self::Error>
where G: Graph, Self: Sized,

Serialize a whole Graph.

While this method has a default implementation based on serialize_triples, some implementations may override it in order to better use the structure of the Graph.

Implementors§