Trait sophia_api::serializer::TripleSerializer
source · [−]pub trait TripleSerializer {
type Error: 'static + Error;
fn serialize_triples<TS>(
&mut self,
source: TS
) -> StreamResult<&mut Self, TS::Error, Self::Error>
where
TS: TripleSource,
Self: Sized;
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.
Associated Types
Required methods
fn 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
fn serialize_graph<G>(
&mut self,
graph: &G
) -> StreamResult<&mut Self, G::Error, Self::Error> where
G: Graph,
Self: Sized,
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.