1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! Crate-wide error type.
//!
//! [`enum@Error`] is the only error type returned from public APIs in this crate.
//! Variants wrap common foreign errors (`std::io`, `serde_json`, `reqwest`,
//! `regex`) plus three string-tagged categories ([`Error::Config`],
//! [`Error::Scan`], [`Error::Sanitize`]) for domain failures that do not map
//! cleanly to a foreign error.
//!
//! No variant carries sensitive content (URLs / file paths may appear in the
//! `Display` form; raw HTTP bodies / pasted plaintext never do).
use Error;
/// Top-level error for all `agentsec-core` operations.
///
/// Construct via `?` on a foreign error (auto-converted by [`From`]) or via
/// one of the string-tagged variants for domain-specific failures.
/// Convenience alias for `Result<T, agentsec_core::Error>`.
pub type Result<T> = Result;