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 list_flows(&self) -> Result<impl IntoIterator<Item = u64>, Error>;
async fn handle_flow_inserts(
&self,
request: InsertRequests,
) -> Result<(), Error>;
async fn handle_mark_window_dirty(
&self,
req: DirtyWindowRequests,
) -> 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 list_flows(&self) -> Result<impl IntoIterator<Item = u64>, Error>
async fn list_flows(&self) -> Result<impl IntoIterator<Item = u64>, Error>
List all flows
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
async fn handle_mark_window_dirty( &self, req: DirtyWindowRequests, ) -> Result<(), Error>
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.