pub enum ActionState {
Proposed,
SchemaValidated,
PolicyChecked,
Dispatched,
Succeeded,
RejectedInvalidSchema,
DeniedByCapability,
DeniedByPolicy,
Failed,
}Expand description
动作生命周期状态(精简版,9 态)。
只保留当前管线可达的状态;budget/调度/privacy 相关终态延后到机制存在时。
Variants§
Proposed
SchemaValidated
PolicyChecked
Dispatched
Succeeded
终态:执行成功。
RejectedInvalidSchema
终态:schema 校验失败(如缺失必需 target、非法 risk/effect 组合)。
DeniedByCapability
终态:能力等级拒绝(PolicyEngine 的 RiskExceedsCapability /
ActionCapabilityDenied)。
DeniedByPolicy
终态:策略拒绝(风险超配置、置信度过低、target 不在上下文等)。
Failed
终态:adapter 执行返回 Err。
Implementations§
Source§impl ActionState
impl ActionState
Sourcepub fn is_terminal(self) -> bool
pub fn is_terminal(self) -> bool
是否为终态。
Trait Implementations§
Source§impl Clone for ActionState
impl Clone for ActionState
Source§fn clone(&self) -> ActionState
fn clone(&self) -> ActionState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ActionState
impl Debug for ActionState
Source§impl<'de> Deserialize<'de> for ActionState
impl<'de> Deserialize<'de> for ActionState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for ActionState
impl Hash for ActionState
Source§impl Ord for ActionState
impl Ord for ActionState
Source§fn cmp(&self, other: &ActionState) -> Ordering
fn cmp(&self, other: &ActionState) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ActionState
impl PartialEq for ActionState
Source§impl PartialOrd for ActionState
impl PartialOrd for ActionState
Source§impl Serialize for ActionState
impl Serialize for ActionState
impl Copy for ActionState
impl Eq for ActionState
impl StructuralPartialEq for ActionState
Auto Trait Implementations§
impl Freeze for ActionState
impl RefUnwindSafe for ActionState
impl Send for ActionState
impl Sync for ActionState
impl Unpin for ActionState
impl UnsafeUnpin for ActionState
impl UnwindSafe for ActionState
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