Trait sophia::serializers::StringSerializer
source · pub trait StringSerializer: TripleSink<Outcome = String, Error = Never> + Sized {
type Config;
fn new(config: Self::Config) -> Self;
fn stringify<T>(&mut self, source: T) -> Result<String, T::Error>
where
T: TripleSource,
{ ... }
fn stringify_graph<G>(&mut self, graph: &mut G) -> Result<String, G::Error>
where
G: Graph,
{ ... }
fn stringify_triple<T>(&mut self, t: &T) -> String
where
T: Triple,
{ ... }
}
Expand description
An extension of the TripleSink
trait,
dedicated to serialization to strings,
with methods more explicitly named.
Required Associated Types
Required Methods
Provided Methods
sourcefn stringify<T>(&mut self, source: T) -> Result<String, T::Error>where
T: TripleSource,
fn stringify<T>(&mut self, source: T) -> Result<String, T::Error>where
T: TripleSource,
Stringify the triples from the given source.
sourcefn stringify_graph<G>(&mut self, graph: &mut G) -> Result<String, G::Error>where
G: Graph,
fn stringify_graph<G>(&mut self, graph: &mut G) -> Result<String, G::Error>where
G: Graph,
Stringify the given graph.
sourcefn stringify_triple<T>(&mut self, t: &T) -> Stringwhere
T: Triple,
fn stringify_triple<T>(&mut self, t: &T) -> Stringwhere
T: Triple,
Stringify the given triple.