pub enum Provenance {
Literal,
Glob,
Variable,
ProcessSub,
CommandSub,
}Expand description
How statically bounded a command argument’s value is.
Derived purely from the tree-sitter-bash AST node kind of the argument —
no heuristics, no disk I/O. Controls whether path_scope is computable
and feeds every_arg/any_arg quantifiers in the policy DSL (R295-F9).
Ordinal order is severity: CommandSub > ProcessSub > Variable > Glob
Literal. TheOrdimpl enables the fold inarg_provenance.
Variants§
Literal
Fully static — value known at parse time (Word, RawString, Number, …).
Glob
Unquoted Word containing *, ?, or [ — expands to an unknown set of paths.
Variable
$VAR, ${…}, $((…)) — value unknown at gate time.
ProcessSub
<(cmd) process substitution — data flows from a subprocess file descriptor.
CommandSub
$(cmd) command substitution — injection point; result may contain arbitrary text.
Trait Implementations§
Source§impl Clone for Provenance
impl Clone for Provenance
Source§fn clone(&self) -> Provenance
fn clone(&self) -> Provenance
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 Provenance
Source§impl Debug for Provenance
impl Debug for Provenance
Source§impl<'de> Deserialize<'de> for Provenance
impl<'de> Deserialize<'de> for Provenance
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 Provenance
Source§impl Ord for Provenance
impl Ord for Provenance
Source§fn cmp(&self, other: &Provenance) -> Ordering
fn cmp(&self, other: &Provenance) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Provenance
impl PartialEq for Provenance
Source§impl PartialOrd for Provenance
impl PartialOrd for Provenance
Source§impl Serialize for Provenance
impl Serialize for Provenance
impl StructuralPartialEq for Provenance
Auto Trait Implementations§
impl Freeze for Provenance
impl RefUnwindSafe for Provenance
impl Send for Provenance
impl Sync for Provenance
impl Unpin for Provenance
impl UnsafeUnpin for Provenance
impl UnwindSafe for Provenance
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