pub trait OraclePort:
Send
+ Sync
+ 'static {
type Error: Error + Send + Sync + 'static;
type Handle: Send + 'static;
// Required methods
fn request_adjudication(
&self,
agent_id: &AgentId,
request: AdjudicationRequest,
) -> Result<Self::Handle, Self::Error>;
fn handle_to_uuid(handle: &Self::Handle) -> Uuid;
}Expand description
The oracle port — pull-based, non-blocking.
Host-implemented. The engine NEVER blocks waiting for a verdict.
When no oracle is registered, conflicting claims surface as Contested
rather than silently picking the incumbent.
Required Associated Types§
Required Methods§
Sourcefn request_adjudication(
&self,
agent_id: &AgentId,
request: AdjudicationRequest,
) -> Result<Self::Handle, Self::Error>
fn request_adjudication( &self, agent_id: &AgentId, request: AdjudicationRequest, ) -> Result<Self::Handle, Self::Error>
Engine requests adjudication. Returns immediately. Handle used for correlation.
Host delivers response asynchronously back into the engine
via EngineHandle::submit_adjudication.
Sourcefn handle_to_uuid(handle: &Self::Handle) -> Uuid
fn handle_to_uuid(handle: &Self::Handle) -> Uuid
Convert an opaque oracle handle to the durable handle_id UUID used as the PK
in the pending_adjudications table as the durable correlation key.
This bridges the oracle’s opaque handle type to the engine’s persistence layer.
Called immediately after request_adjudication returns, before the pending row is inserted.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".