pub enum Opcode {
Show 22 variants
Set {
name: u32,
value: u32,
},
SetList {
name: u32,
start: u32,
len: u16,
},
Send {
probe: u32,
payload: Option<u32>,
},
Match(u32),
MatchAll {
start: u32,
len: u16,
},
MatchAny {
start: u32,
len: u16,
},
Assert(u32),
Extract {
name: u32,
source: u32,
},
IfMatch {
matcher: u32,
else_pc: Pc,
},
ForList {
item: u32,
start: u32,
len: u16,
end_pc: Pc,
},
ForVar {
item: u32,
list: u32,
end_pc: Pc,
},
LoopBack,
Break,
Save {
from: u32,
to: u32,
},
Evidence(u32),
Retry {
probe: u32,
count: u32,
},
RetryDelay(u32),
Sleep(u32),
Stop,
Fail,
Continue,
Exit,
}Expand description
A single VM instruction. Operands are u32/u16 indices into the
program’s pools (strings, matchers, extracts, evidence) or program
counters (Pc) into code — never inline data.
Variants§
Set
Set a string variable: name and value index the string pool.
SetList
Set a list variable from len consecutive strings starting at start.
Fields
Send
Perform a probe’s request. payload, if set, overrides the probe’s
payload (string-pool or payload-pool index, per probe kind).
Fields
Match(u32)
Evaluate one matcher (matcher-pool index); on failure, latch the match chain false.
MatchAll
Evaluate len matchers starting at start; all must pass.
MatchAny
Evaluate len matchers starting at start; any one passing succeeds.
Assert(u32)
Like Match, but a failure aborts the run with an error.
Extract
Extract a value into a variable. name is a string-pool index; source
indexes the extract pool.
Fields
IfMatch
If the matcher holds, fall through; otherwise jump to else_pc.
Fields
ForList
Begin a for over a literal list (len strings from start), binding
each to item. end_pc is the instruction after the loop.
Fields
ForVar
Begin a for over a list variable (list), binding each to item.
Fields
LoopBack
End-of-loop-body marker: advance the loop or exit it.
Break
Exit the innermost loop.
Save
Snapshot a probe’s response under another name (from/to index the
string pool).
Fields
Evidence(u32)
Attach evidence (evidence-pool index) when the match chain is true.
Retry
Re-send a probe up to count times, stopping on first success.
RetryDelay(u32)
Set the delay between Retry attempts (string-pool index of a duration).
Sleep(u32)
Sleep for a duration (string-pool index of a duration literal).
Stop
Stop the run, emitting no finding.
Fail
Abort the run with an error.
Continue
Skip to the next iteration of the innermost loop.
Exit
Stop the run, emitting the finding if the match chain held.