/ src / sinks / mod.rs
mod.rs
 1  //! Sinks: where graph updates go.
 2  
 3  pub mod file;
 4  pub mod stdout;
 5  #[cfg(feature = "kafka")]
 6  pub mod kafka;
 7  
 8  use anyhow::Result;
 9  use crate::graph::GraphUpdate;
10  
11  pub trait Sink {
12      fn emit(&mut self, update: &GraphUpdate) -> Result<()>;
13      fn flush(&mut self) -> Result<()> {
14          Ok(())
15      }
16  }