pub struct ShellEvent {
pub turn: u32,
pub binary: String,
pub command: String,
pub argv: Vec<String>,
pub script: Option<String>,
pub recipe: Option<String>,
pub outcome: Option<ShellOutcome>,
}Fields§
§turn: u32§binary: StringThe program that was actually invoked, as a canonicalized absolute
filesystem path when the host could resolve the invoked name against
its PATH at dispatch time (e.g. /usr/bin/pytest). Falls back to
the bare invoked name when resolution finds nothing — never empty,
never an error. This is the only field that identifies what ran;
command carries the argument list alone.
command: StringThe argument list the shell tool received — never the binary name
itself. For a shell interpreter (bash/sh/…) this is the script
text passed via -c.
Truncated to 200 characters, and a display string only. A policy must
decide on argv and script and must never match against command.
argv: Vec<String>The exact argument list the runtime will pass to the executable, never
truncated. For a shell interpreter this is ["-c", <script>].
It names what will actually run, which is what a policy has to decide on:
command is clipped and binary alone does not say what the program was
asked to do.
script: Option<String>The -c body when the interpreter form is used, never truncated, and
none for every other form. A policy must decide on this field rather
than on command.
recipe: Option<String>The body of the recipe this call names, for the build tools the runtime
resolves: make <target>, just <recipe> and npm run <script>. A hook
gating just build decides on the text the justfile gives build, not on
the name alone.
The runtime reads the recipe file out of the workdir it holds the grant on; the hook never reads it and is handed no filesystem grant by this field.
none when the call names no recipe, or when the runtime could not resolve
one — no recipe file, an unparseable one, a target that is not defined, or a
shape the parser does not model. Reading is best-effort: an absent body is
not an error, and it is never a signal that the call is safe.
outcome: Option<ShellOutcome>none means this call has not run. That is the decision point, the one
dispatch at which a returned deny is honored. some(...) is the post-call
observation: the call has already happened and nothing can be refused.
Trait Implementations§
Source§impl Clone for ShellEvent
impl Clone for ShellEvent
impl ComponentType for ShellEvent
Source§impl Debug for ShellEvent
impl Debug for ShellEvent
impl Lift for ShellEvent
impl Lower for ShellEvent
Auto Trait Implementations§
impl Forget for ShellEvent
impl Freeze for ShellEvent
impl RefUnwindSafe for ShellEvent
impl Send for ShellEvent
impl Sync for ShellEvent
impl Unpin for ShellEvent
impl UnsafeUnpin for ShellEvent
impl UnwindSafe for ShellEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more