pub trait RelayPolicy: Send + Sync {
// Required method
fn reconcile(
&self,
leg: Leg,
ceiling: &PeerCeiling,
payload: &PayloadFacts,
) -> RelayDecision;
}Expand description
Decides what reaches a served peer that may not decode a payload as sent.
Consulted for the env contract at session start and for every observation
and action after the transform hooks, only on a leg whose ceiling the spec
carries (an in-process leg has none). Install one with
RuntimeDriver::with_relay_policy;
the default is RefusingRelayPolicy.
The contract call is advisory-only: the driver records a
RelayDecision::Convert’s advisory but relays nothing, so the policy
owner must down-convert the contract it sends the model at resolve itself.
Required Methods§
fn reconcile( &self, leg: Leg, ceiling: &PeerCeiling, payload: &PayloadFacts, ) -> RelayDecision
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".