PolicyResult
Defined in the policy module.Rust AI Agent SDK Result of a policy check.
Fields
| Name | Type | Description |
|---|---|---|
passed | bool | Whether the check passed |
action | PolicyAction | Action to take |
triggered_rule | Option<String> | Rule that was triggered (if any) |
message | Option<String> | Message |
modified_content | Option<String> | Modified content (if redacted) |
Methods
pass
block
| Name | Type |
|---|---|
rule | impl Into<String> |
message | impl Into<String> |
warn
| Name | Type |
|---|---|
rule | impl Into<String> |
message | impl Into<String> |
redact
| Name | Type |
|---|---|
rule | impl Into<String> |
modified | impl Into<String> |
Source
View on GitHub
praisonai/src/policy/mod.rs at line 53
