#[non_exhaustive]pub struct ApprovalOrigin {
pub kind: String,
pub command: Option<String>,
pub url: Option<String>,
}Expand description
What triggered a tool action, shown so the user can judge it. It is display-only and untrusted, and policy rules never match on it.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.kind: StringWhich kind of origin this is: shellCommand or url.
command: Option<String>The shell command whose process asked for the action. Present when
kind is shellCommand.
url: Option<String>The full URL a fetch tool is requesting. Present when kind is url.
Implementations§
Source§impl ApprovalOrigin
The ApprovalOrigin.kind wire words (same single-source rule).
impl ApprovalOrigin
The ApprovalOrigin.kind wire words (same single-source rule).
Trait Implementations§
Source§impl Clone for ApprovalOrigin
impl Clone for ApprovalOrigin
Source§impl Debug for ApprovalOrigin
impl Debug for ApprovalOrigin
Source§impl<'de> Deserialize<'de> for ApprovalOrigin
impl<'de> Deserialize<'de> for ApprovalOrigin
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 ApprovalOrigin
Source§impl PartialEq for ApprovalOrigin
impl PartialEq for ApprovalOrigin
Source§impl Serialize for ApprovalOrigin
impl Serialize for ApprovalOrigin
impl StructuralPartialEq for ApprovalOrigin
Auto Trait Implementations§
impl Forget for ApprovalOrigin
impl Freeze for ApprovalOrigin
impl Move for ApprovalOrigin
impl RefUnwindSafe for ApprovalOrigin
impl Send for ApprovalOrigin
impl Sync for ApprovalOrigin
impl Unpin for ApprovalOrigin
impl UnsafeUnpin for ApprovalOrigin
impl UnwindSafe for ApprovalOrigin
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