pub trait ErpCommandSource:
Send
+ Sync
+ 'static {
// Required methods
async fn next(&self) -> Result<Option<InboundErpCommand>, ErpAdapterError>;
async fn ack(&self, id: &str) -> Result<(), ErpAdapterError>;
async fn nack(&self, id: &str, reason: &str) -> Result<(), ErpAdapterError>;
}Expand description
Inbound command source — mako-engine polls this for new BO4E objects
from the ERP.
Implement this for broker-based inbound flows (Kafka consumer, SFTP poll, database change feed, …) to make the entire integration fully event-driven — no synchronous REST round-trip required.
§Contract
Required Methods§
Sourceasync fn next(&self) -> Result<Option<InboundErpCommand>, ErpAdapterError>
async fn next(&self) -> Result<Option<InboundErpCommand>, ErpAdapterError>
Return the next pending BO4E command, or None when the source is idle.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<S: ErpCommandSource> ErpCommandSource for Arc<S>
Blanket Arc implementation so ErpCommandSource can be shared across tasks.
impl<S: ErpCommandSource> ErpCommandSource for Arc<S>
Blanket Arc implementation so ErpCommandSource can be shared across tasks.