use-guardrail 0.0.1

AI guardrail metadata primitives for RustUse.
Documentation
  • Coverage
  • 0.97%
    1 out of 103 items documented1 out of 28 items with examples
  • Size
  • Source code size: 11.58 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.27 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 4s Average build duration of successful builds.
  • all releases: 4s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-ai
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-guardrail

AI guardrail metadata primitives for RustUse.

Experimental

use-guardrail is experimental while use-ai remains below 0.3.0.

Example

use use_guardrail::{GuardrailAction, GuardrailKind, GuardrailName};

let name = GuardrailName::new("pii-redaction")?;

assert_eq!(name.as_str(), "pii-redaction");
assert_eq!("require review".parse::<GuardrailAction>()?, GuardrailAction::RequireReview);
assert_eq!(GuardrailKind::ToolUse.as_str(), "tool-use");
# Ok::<(), use_guardrail::GuardrailError>(())

Scope

  • Guardrail names and identifiers plus kind, action, severity, status, policy area, check, result, and violation labels.
  • Metadata only.

Non-goals

  • Moderation, redaction, policy checks, prompt-injection detection, enforcement, or human-review workflows.

License

Licensed under either Apache-2.0 or MIT.