pub struct InspectedCommand {
pub source: String,
pub program: Option<String>,
pub argv: Vec<String>,
pub redirects: Vec<InspectedRedirect>,
pub descendant_execs: Vec<DescendantExec>,
}Expand description
Parse and inspect Brush shell source without expansion or execution.
The returned source-bound schema lets an embedder present command
substitutions, state-free arithmetic expansions, redirections, and
statically discoverable commands for approval before invoking
BrushShellTool. Arithmetic that depends on shell variables, arrays,
assignments, or nested expansion fails closed, as do parameter forms that
can reinterpret runtime values as expansion syntax.
One simple shell command or pipeline stage.
Fields§
§source: StringSource slice spanning this stage’s words and redirect targets, excluding pipeline/list separators. The inspection root always retains the exact complete source; a redirect written before the first word may begin just outside this best-effort stage slice.
program: Option<String>Statically resolved executable/builtin name, when the node executes one.
argv: Vec<String>Shell words in argv position, before runtime expansion.
redirects: Vec<InspectedRedirect>Redirections attached to this stage.
descendant_execs: Vec<DescendantExec>Commands delegated to a child program rather than spawned by Brush itself.
Trait Implementations§
Source§impl Clone for InspectedCommand
impl Clone for InspectedCommand
Source§fn clone(&self) -> InspectedCommand
fn clone(&self) -> InspectedCommand
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InspectedCommand
impl Debug for InspectedCommand
impl Eq for InspectedCommand
Source§impl PartialEq for InspectedCommand
impl PartialEq for InspectedCommand
Source§impl Serialize for InspectedCommand
impl Serialize for InspectedCommand
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,
impl StructuralPartialEq for InspectedCommand
Auto Trait Implementations§
impl Freeze for InspectedCommand
impl RefUnwindSafe for InspectedCommand
impl Send for InspectedCommand
impl Sync for InspectedCommand
impl Unpin for InspectedCommand
impl UnsafeUnpin for InspectedCommand
impl UnwindSafe for InspectedCommand
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, T> ConvertInto<T> for Fwhere
T: ConvertFrom<F>,
impl<F, T> ConvertInto<T> for Fwhere
T: ConvertFrom<F>,
Source§fn convert_into(self) -> T
fn convert_into(self) -> T
Self to a value of type T.Source§impl<F, T> ConvertTryFrom<F> for Twhere
F: ConvertInto<T>,
impl<F, T> ConvertTryFrom<F> for Twhere
F: ConvertInto<T>,
Source§impl<F, T> ConvertTryInto<T> for Fwhere
T: ConvertTryFrom<F>,
impl<F, T> ConvertTryInto<T> for Fwhere
T: ConvertTryFrom<F>,
Source§type Error = <T as ConvertTryFrom<F>>::Error
type Error = <T as ConvertTryFrom<F>>::Error
Source§fn convert_try_into(self) -> Result<T, <T as ConvertTryFrom<F>>::Error>
fn convert_try_into(self) -> Result<T, <T as ConvertTryFrom<F>>::Error>
Self to a value of type T.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
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
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