#[non_exhaustive]pub enum FirewallOutcome {
Allowed {
decision: DecisionRecord,
effects: EffectVector,
},
Denied {
decision: DecisionRecord,
effects: EffectVector,
},
Approve {
decision: DecisionRecord,
effects: EffectVector,
approval: ApprovalRequest,
},
}Expand description
Firewall.evaluate() 返回的裁决结果。
caller(I04 MCP Hub)根据此结果决定:
Allowed: 直接执行下游Denied: 对 agent 返回安全错误Approve: 创建 approval 并阻塞 / 异步等待 wait_for_resolution
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.
Allowed
放行。
Denied
拒绝。
Approve
需要审批。
Fields
§
decision: DecisionRecord决策记录(已写入账本)
§
effects: EffectVector推断出的 effects
§
approval: ApprovalRequest待审批请求(已入 approvals 表)
Implementations§
Source§impl FirewallOutcome
impl FirewallOutcome
Sourcepub fn decision_kind(&self) -> DecisionKind
pub fn decision_kind(&self) -> DecisionKind
快捷:返回底层 DecisionKind。
Trait Implementations§
Source§impl Clone for FirewallOutcome
impl Clone for FirewallOutcome
Source§fn clone(&self) -> FirewallOutcome
fn clone(&self) -> FirewallOutcome
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FirewallOutcome
impl RefUnwindSafe for FirewallOutcome
impl Send for FirewallOutcome
impl Sync for FirewallOutcome
impl Unpin for FirewallOutcome
impl UnsafeUnpin for FirewallOutcome
impl UnwindSafe for FirewallOutcome
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