Expand description
Unified error type for all guardrail-rs crates.
§A note on Upstream and the dependency budget
Per the project’s dependency budget (spec §20), guardrail-core does not
depend on reqwest by default — it is the foundational crate and should
remain usable in constrained / embedded contexts without pulling in an
HTTP client. However, the spec’s error model calls for
Upstream(#[from] reqwest::Error) so that ? works ergonomically at the
call site in guardrail-proxy.
We resolve this by making reqwest an optional dependency gated
behind the reqwest-errors feature. guardrail-proxy enables this
feature; consumers of guardrail-core alone (e.g. a future WASM build,
or someone embedding just the classifiers) get the lighter
Upstream(String) variant with no behavioral difference apart from the
#[from] conversion.
Enums§
- Guardrail
Error - Top-level error type used throughout
guardrail-rs.