Skip to main content

PhaseSink

Trait PhaseSink 

Source
pub trait PhaseSink: Send + Sync {
    // Required methods
    fn emit(
        &self,
        phase: &str,
        item_type: &str,
        item: &Value,
    ) -> Result<(), StreamError>;
    fn phase_complete(&self, phase: &str) -> Result<(), StreamError>;
    fn flush(&self) -> Result<(), StreamError>;
    fn stats(&self) -> StreamStats;
}
Expand description

Trait for sinks that receive generated items phase-by-phase.

Required Methods§

Source

fn emit( &self, phase: &str, item_type: &str, item: &Value, ) -> Result<(), StreamError>

Emit a single generated item.

Source

fn phase_complete(&self, phase: &str) -> Result<(), StreamError>

Signal that a generation phase has completed.

Source

fn flush(&self) -> Result<(), StreamError>

Flush any buffered data to the underlying sink.

Source

fn stats(&self) -> StreamStats

Return current streaming statistics.

Implementors§