pub trait TripleSink {
    type Error: StdError;
    type Outcome;

    fn feed<T: Triple>(&mut self, t: &T) -> Result<(), Self::Error>;
    fn finish(&mut self) -> Result<Self::Outcome, Self::Error>;
}
Expand description

A triple sink is anything that consumes triples, produces a result, and may also fail in the process.

Typical triple sinks are serializers or graphs’ inserters and removers.

See also TripleSource.

Required Associated Types

The error type that this triple sink may raise.

Must be Never for infallible sources.

The type of the result produced by this triple sink.

See finish.

Required Methods

Feed one triple in this sink.

Produce the result once all triples were fed.

NB: the behaviour of a triple sink after finish is called is unspecified by this trait.

Implementations on Foreign Types

() acts as a “black hole”, consuming all triples without erring, and producing no result.

Useful for benchmarking triple sources.

Implementors