#[non_exhaustive]pub enum FirewallError {
Policy(PolicyError),
Audit(AuditError),
ReservedScopeKey,
PreflightScanFailed {
reason: String,
},
}Expand description
Firewall 错误。
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Policy(PolicyError)
策略引擎错误。
Audit(AuditError)
审计写入错误。
ReservedScopeKey
I10c-β2 R3 NICE 修复:FirewallConfig.allowed_scopes 使用了保留键
"allowed_hosts",会在 evaluate 合并步骤覆盖 host allowlist —— 启动期
硬拒绝,避免误配置破坏 host 白名单语义。
PreflightScanFailed
ISS-010:T0 preflight 扫描(vigil_redaction::scan_text)返错。
语义:安全核心的 fail-closed 路径 —— preflight 是在规则决策之前运行的, 扫描失败意味着我们无法判断本次调用是否带 PII / Secret,必须视为最坏情况。caller 应把此错误翻译成业务层 Deny(不继续走 policy 评估,也不入 approvals 表)。
reason 由 ScanError::{InferenceFailed, ..} 的 Debug 形式派生,不含用户原文。
Trait Implementations§
Source§impl Debug for FirewallError
impl Debug for FirewallError
Source§impl Display for FirewallError
impl Display for FirewallError
Source§impl Error for FirewallError
impl Error for FirewallError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<AuditError> for FirewallError
impl From<AuditError> for FirewallError
Source§fn from(source: AuditError) -> FirewallError
fn from(source: AuditError) -> FirewallError
Converts to this type from the input type.
Source§impl From<PolicyError> for FirewallError
impl From<PolicyError> for FirewallError
Source§fn from(source: PolicyError) -> FirewallError
fn from(source: PolicyError) -> FirewallError
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for FirewallError
impl !UnwindSafe for FirewallError
impl Freeze for FirewallError
impl Send for FirewallError
impl Sync for FirewallError
impl Unpin for FirewallError
impl UnsafeUnpin for FirewallError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more