#[non_exhaustive]pub enum ApprovalScope {
Once,
ThisSession,
ForToolWithSameArgsHash,
ForPolicyTemplate,
}Expand description
审批范围(ADR 0003 §D6)。
I02+I03 实装:Once / ThisSession。后两项放占位,I05+ 启用。
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.
Once
只对当前 invocation_id 生效,消费即失效。
ThisSession
对同一 session_id 下、(server_id, tool_name, args_hash) 相同的后续调用自动放行。
ForToolWithSameArgsHash
跨 session,对相同 args_hash 的调用放行(I05+)。
ForPolicyTemplate
派生为临时 allow 规则(I05+)。
Trait Implementations§
Source§impl Clone for ApprovalScope
impl Clone for ApprovalScope
Source§fn clone(&self) -> ApprovalScope
fn clone(&self) -> ApprovalScope
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 moreimpl Copy for ApprovalScope
Source§impl Debug for ApprovalScope
impl Debug for ApprovalScope
Source§impl<'de> Deserialize<'de> for ApprovalScope
impl<'de> Deserialize<'de> for ApprovalScope
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ApprovalScope, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ApprovalScope, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ApprovalScope
Source§impl Hash for ApprovalScope
impl Hash for ApprovalScope
Source§impl PartialEq for ApprovalScope
impl PartialEq for ApprovalScope
Source§fn eq(&self, other: &ApprovalScope) -> bool
fn eq(&self, other: &ApprovalScope) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ApprovalScope
impl Serialize for ApprovalScope
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ApprovalScope
Auto Trait Implementations§
impl Freeze for ApprovalScope
impl RefUnwindSafe for ApprovalScope
impl Send for ApprovalScope
impl Sync for ApprovalScope
impl Unpin for ApprovalScope
impl UnsafeUnpin for ApprovalScope
impl UnwindSafe for ApprovalScope
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