Skip to main content

CallbackInvoker

Trait CallbackInvoker 

Source
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§

Source

type Error

Error produced by the callback transport. Kept generic so a renderer-backed impl, an in-process impl, and a future network impl can each carry their own diagnostic shape.

Required Methods§

Source

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.

Implementors§