Skip to main content

pipe

Function pipe 

Source
pub fn pipe<S, K>(source: S, sink: K) -> Result<()>
where S: EventSource, K: EventSink,
Expand description

Pull events from source and push them into sink until the source drains, then call EventSink::finish on the sink.

This is the canonical way to run a DocSpec conversion pipeline. The function returns on the first error from either side and never buffers events beyond the single in-flight event.

ยงErrors

Returns any error produced by source.next_event(), sink.handle_event(), or sink.finish(). Errors propagate immediately; processing stops at the first error.