GuardrailResult
Defined in the guardrails module.Rust AI Agent SDK Result of a guardrail validation.
Fields
| Name | Type | Description |
|---|---|---|
success | bool | Whether the guardrail check passed |
result | Option<String> | The result if modified, or original if unchanged |
error | String | Error message if validation failed |
metadata | HashMap<String | Additional metadata |
Methods
success
| Name | Type |
|---|---|
result | impl Into<String> |
pass
failure
| Name | Type |
|---|---|
error | impl Into<String> |
from_tuple
| Name | Type |
|---|---|
success | bool |
data | impl Into<String> |
with_metadata
| Name | Type |
|---|---|
key | impl Into<String> |
value | impl Into<String> |
is_success
is_failure
get_result_or
| Name | Type |
|---|---|
original | &str |
Source
View on GitHub
praisonai/src/guardrails/mod.rs at line 38
