pub struct TestOracle {
pub fixed_uuid: Uuid,
}Expand description
Deterministic oracle that always returns the caller-supplied fixed_uuid as the
adjudication handle. handle_to_uuid is the identity function on uuid::Uuid.
Both adapter test files use this type (via the re-exported build_oracle_engine helper)
so that both adapters exercise identical oracle behavior.
Fields§
§fixed_uuid: UuidThe UUID returned by every request_adjudication call, allowing callers to predict
the handle before submitting an adjudication response.
Trait Implementations§
Source§impl OraclePort for TestOracle
Available on crate features test-support only.
impl OraclePort for TestOracle
Available on crate features
test-support only.type Error = NoOpError
Source§fn 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.Auto Trait Implementations§
impl Freeze for TestOracle
impl RefUnwindSafe for TestOracle
impl Send for TestOracle
impl Sync for TestOracle
impl Unpin for TestOracle
impl UnsafeUnpin for TestOracle
impl UnwindSafe for TestOracle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more