Skip to main content

accept_control_data

Function accept_control_data 

Source
pub fn accept_control_data<T>(data: ControlData<T>) -> T
Expand description

Accepts only trusted control data.

UntrustedData cannot be passed into this function directly.

use llm_tool_runtime::{accept_control_data, UntrustedData};

let untrusted = UntrustedData("payload".to_string());
// Type mismatch: this function expects `ControlData`, not `UntrustedData`.
accept_control_data(untrusted);