pub trait FlowEngine {
// Required methods
async fn create_flow(
&self,
args: CreateFlowArgs,
) -> Result<Option<u64>, Error>;
async fn remove_flow(&self, flow_id: u64) -> Result<(), Error>;
async fn flush_flow(&self, flow_id: u64) -> Result<usize, Error>;
async fn flow_exist(&self, flow_id: u64) -> Result<bool, Error>;
async fn handle_flow_inserts(
&self,
request: InsertRequests,
) -> Result<(), Error>;
}
Required Methods§
Sourceasync fn create_flow(&self, args: CreateFlowArgs) -> Result<Option<u64>, Error>
async fn create_flow(&self, args: CreateFlowArgs) -> Result<Option<u64>, Error>
Create a flow using the provided arguments, return previous flow id if exists and is replaced
Sourceasync fn flush_flow(&self, flow_id: u64) -> Result<usize, Error>
async fn flush_flow(&self, flow_id: u64) -> Result<usize, Error>
Flush the flow, return the number of rows flushed
Sourceasync fn handle_flow_inserts(
&self,
request: InsertRequests,
) -> Result<(), Error>
async fn handle_flow_inserts( &self, request: InsertRequests, ) -> Result<(), Error>
Handle the insert requests for the flow
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.