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§
Required Methods§
Sourcefn serialize_triples<TS>(
&mut self,
source: TS,
) -> StreamResult<&mut Self, TS::Error, Self::Error>where
TS: TripleSource,
Self: Sized,
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§
Sourcefn serialize_graph<G>(
&mut self,
graph: &G,
) -> StreamResult<&mut Self, G::Error, Self::Error>
fn serialize_graph<G>( &mut self, graph: &G, ) -> StreamResult<&mut Self, G::Error, Self::Error>
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.