#[non_exhaustive]pub enum InjectionMethod {
HttpHeader,
ChildEnv,
Pipe,
TempFile,
HookCommand,
}Expand description
凭据注入方式。优先级参见主方案 §5.5。
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.
HttpHeader
Gateway 内部在 HTTP header 上注入。
ChildEnv
子进程环境变量(env_clear 后仅此 lease)。
Pipe
pipe / fd 注入。
TempFile
临时文件(最后手段,需在进程结束时抹除)。
HookCommand
PreToolUse hook 在 shell 命令内联替换 secret://<alias> 占位符(执行边界注入,
TASK-005)。真值经 lease 授权解析后写回 updatedInput.command,模型仍只见占位符;
与 gateway 侧的 InjectionMethod::ChildEnv 区分(hook 无法对宿主子进程设 OS env,
只能改写命令本身),故单列一档便于审计区分注入来源。
Trait Implementations§
Source§impl Clone for InjectionMethod
impl Clone for InjectionMethod
Source§fn clone(&self) -> InjectionMethod
fn clone(&self) -> InjectionMethod
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 InjectionMethod
Source§impl Debug for InjectionMethod
impl Debug for InjectionMethod
Source§impl<'de> Deserialize<'de> for InjectionMethod
impl<'de> Deserialize<'de> for InjectionMethod
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
impl Eq for InjectionMethod
Source§impl Hash for InjectionMethod
impl Hash for InjectionMethod
Source§impl PartialEq for InjectionMethod
impl PartialEq for InjectionMethod
Source§fn eq(&self, other: &InjectionMethod) -> bool
fn eq(&self, other: &InjectionMethod) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for InjectionMethod
impl Serialize for InjectionMethod
impl StructuralPartialEq for InjectionMethod
Auto Trait Implementations§
impl Freeze for InjectionMethod
impl RefUnwindSafe for InjectionMethod
impl Send for InjectionMethod
impl Sync for InjectionMethod
impl Unpin for InjectionMethod
impl UnsafeUnpin for InjectionMethod
impl UnwindSafe for InjectionMethod
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.