pub struct AiNodeContract {
pub contract_version: String,
pub thresholds: RoutingThresholds,
pub confidence_type: Option<ConfidenceType>,
pub max_inference_ms: Option<u64>,
}Expand description
RAO node contract carried by an ai node (scalar fields on the node body,
so it round-trips through the DSL). Presence of contract: true opts the
node into contract-bound output: the model must return an
AiOutputEnvelope, and the engine validates and routes it.
Fields§
§contract_version: String§thresholds: RoutingThresholds§confidence_type: Option<ConfidenceType>When set, the envelope’s confidence_type must match.
max_inference_ms: Option<u64>Inference wall-clock budget; exceeding it fails the node.
Implementations§
Source§impl AiNodeContract
impl AiNodeContract
Sourcepub fn from_node_data(data: &Value) -> Result<Option<Self>, ContractError>
pub fn from_node_data(data: &Value) -> Result<Option<Self>, ContractError>
Read the contract off an AI node’s data. Returns Ok(None) when the
node does not opt in (contract absent or false). Field names follow
the node-data camelCase convention.
Trait Implementations§
Source§impl Clone for AiNodeContract
impl Clone for AiNodeContract
Source§fn clone(&self) -> AiNodeContract
fn clone(&self) -> AiNodeContract
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AiNodeContract
impl Debug for AiNodeContract
Source§impl<'de> Deserialize<'de> for AiNodeContract
impl<'de> Deserialize<'de> for AiNodeContract
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AiNodeContract
impl PartialEq for AiNodeContract
Source§impl Serialize for AiNodeContract
impl Serialize for AiNodeContract
impl StructuralPartialEq for AiNodeContract
Auto Trait Implementations§
impl Freeze for AiNodeContract
impl RefUnwindSafe for AiNodeContract
impl Send for AiNodeContract
impl Sync for AiNodeContract
impl Unpin for AiNodeContract
impl UnsafeUnpin for AiNodeContract
impl UnwindSafe for AiNodeContract
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