pub trait CallbackInvoker {
type Error;
// Required method
fn invoke(
&self,
plan: &RoutingPlan,
payloads: &[PayloadEnvelope],
) -> Result<CallbackResponse, Self::Error>;
}Expand description
Callback invocation seam.
Issue #3 owns the protocol renderer side of this seam; the
signature is shaped so a renderer-backed implementation can plug
in without this module knowing anything about a protocol
module.
The argument shape mirrors the renderer-input tuple coordinated
with issue #3:
(lifecycle_event, adapter_id, adapter_version, integration_mode, frame_ctx, payload_envelope, placement_class, receipt_meta).
All of those fields are reachable from a RoutingPlan plus the
optional PayloadEnvelopes the caller is delivering, so the
trait method takes those two and lets the implementation
destructure.
The PayloadEnvelope::body is treated as opaque bytes/value —
implementations must not parse it.
Required Associated Types§
Required Methods§
Sourcefn invoke(
&self,
plan: &RoutingPlan,
payloads: &[PayloadEnvelope],
) -> Result<CallbackResponse, Self::Error>
fn invoke( &self, plan: &RoutingPlan, payloads: &[PayloadEnvelope], ) -> Result<CallbackResponse, Self::Error>
Invoke the client callback for a routed event.
payloads carries any PayloadEnvelopes the caller is
delivering alongside the event. The router does not inspect
payload bodies; the invoker may, but is not required to.