Skip to main content

ExprKind

Enum ExprKind 

Source
pub enum ExprKind {
Show 186 variants Integer(i64), Float(f64), String(String), Bareword(String), Regex(String, String), QW(Vec<String>), Undef, MagicConst(MagicConstKind), InterpolatedString(Vec<StringPart>), ScalarVar(String), ArrayVar(String), HashVar(String), ArrayElement { array: String, index: Box<Expr>, }, HashElement { hash: String, key: Box<Expr>, }, ArraySlice { array: String, indices: Vec<Expr>, }, HashSlice { hash: String, keys: Vec<Expr>, }, HashSliceDeref { container: Box<Expr>, keys: Vec<Expr>, }, AnonymousListSlice { source: Box<Expr>, indices: Vec<Expr>, }, ScalarRef(Box<Expr>), ArrayRef(Vec<Expr>), HashRef(Vec<(Expr, Expr)>), CodeRef { params: Vec<SubSigParam>, body: Block, }, SubroutineRef(String), SubroutineCodeRef(String), DynamicSubCodeRef(Box<Expr>), Deref { expr: Box<Expr>, kind: Sigil, }, ArrowDeref { expr: Box<Expr>, index: Box<Expr>, kind: DerefKind, }, BinOp { left: Box<Expr>, op: BinOp, right: Box<Expr>, }, UnaryOp { op: UnaryOp, expr: Box<Expr>, }, PostfixOp { expr: Box<Expr>, op: PostfixOp, }, Assign { target: Box<Expr>, value: Box<Expr>, }, CompoundAssign { target: Box<Expr>, op: BinOp, value: Box<Expr>, }, Ternary { condition: Box<Expr>, then_expr: Box<Expr>, else_expr: Box<Expr>, }, Repeat { expr: Box<Expr>, count: Box<Expr>, }, Range { from: Box<Expr>, to: Box<Expr>, exclusive: bool, step: Option<Box<Expr>>, }, MyExpr { keyword: String, decls: Vec<VarDecl>, }, FuncCall { name: String, args: Vec<Expr>, }, MethodCall { object: Box<Expr>, method: String, args: Vec<Expr>, super_call: bool, }, IndirectCall { target: Box<Expr>, args: Vec<Expr>, ampersand: bool, pass_caller_arglist: bool, }, Typeglob(String), TypeglobExpr(Box<Expr>), Print { handle: Option<String>, args: Vec<Expr>, }, Say { handle: Option<String>, args: Vec<Expr>, }, Printf { handle: Option<String>, args: Vec<Expr>, }, Die(Vec<Expr>), Warn(Vec<Expr>), Match { expr: Box<Expr>, pattern: String, flags: String, scalar_g: bool, delim: char, }, Substitution { expr: Box<Expr>, pattern: String, replacement: String, flags: String, delim: char, }, Transliterate { expr: Box<Expr>, from: String, to: String, flags: String, delim: char, }, MapExpr { block: Block, list: Box<Expr>, flatten_array_refs: bool, stream: bool, }, MapExprComma { expr: Box<Expr>, list: Box<Expr>, flatten_array_refs: bool, stream: bool, }, GrepExpr { block: Block, list: Box<Expr>, keyword: GrepBuiltinKeyword, }, GrepExprComma { expr: Box<Expr>, list: Box<Expr>, keyword: GrepBuiltinKeyword, }, SortExpr { cmp: Option<SortComparator>, list: Box<Expr>, }, ReverseExpr(Box<Expr>), Rev(Box<Expr>), JoinExpr { separator: Box<Expr>, list: Box<Expr>, }, SplitExpr { pattern: Box<Expr>, string: Box<Expr>, limit: Option<Box<Expr>>, }, ForEachExpr { block: Block, list: Box<Expr>, }, PMapExpr { block: Block, list: Box<Expr>, progress: Option<Box<Expr>>, flat_outputs: bool, on_cluster: Option<Box<Expr>>, stream: bool, }, PMapChunkedExpr { chunk_size: Box<Expr>, block: Block, list: Box<Expr>, progress: Option<Box<Expr>>, }, PGrepExpr { block: Block, list: Box<Expr>, progress: Option<Box<Expr>>, stream: bool, }, PForExpr { block: Block, list: Box<Expr>, progress: Option<Box<Expr>>, }, ParLinesExpr { path: Box<Expr>, callback: Box<Expr>, progress: Option<Box<Expr>>, }, ParWalkExpr { path: Box<Expr>, callback: Box<Expr>, progress: Option<Box<Expr>>, }, PwatchExpr { path: Box<Expr>, callback: Box<Expr>, }, PSortExpr { cmp: Option<Block>, list: Box<Expr>, progress: Option<Box<Expr>>, }, ReduceExpr { block: Block, list: Box<Expr>, }, PReduceExpr { block: Block, list: Box<Expr>, progress: Option<Box<Expr>>, }, PReduceInitExpr { init: Box<Expr>, block: Block, list: Box<Expr>, progress: Option<Box<Expr>>, }, PMapReduceExpr { map_block: Block, reduce_block: Block, list: Box<Expr>, progress: Option<Box<Expr>>, }, PcacheExpr { block: Block, list: Box<Expr>, progress: Option<Box<Expr>>, }, PselectExpr { receivers: Vec<Expr>, timeout: Option<Box<Expr>>, }, FanExpr { count: Option<Box<Expr>>, block: Block, progress: Option<Box<Expr>>, capture: bool, }, AsyncBlock { body: Block, }, SpawnBlock { body: Block, }, Trace { body: Block, }, Timer { body: Block, }, Bench { body: Block, times: Box<Expr>, }, Spinner { message: Box<Expr>, body: Block, }, Await(Box<Expr>), Slurp(Box<Expr>), Capture(Box<Expr>), Qx(Box<Expr>), FetchUrl(Box<Expr>), Pchannel { capacity: Option<Box<Expr>>, }, Push { array: Box<Expr>, values: Vec<Expr>, }, Pop(Box<Expr>), Shift(Box<Expr>), Unshift { array: Box<Expr>, values: Vec<Expr>, }, Splice { array: Box<Expr>, offset: Option<Box<Expr>>, length: Option<Box<Expr>>, replacement: Vec<Expr>, }, Delete(Box<Expr>), Exists(Box<Expr>), Keys(Box<Expr>), Values(Box<Expr>), Each(Box<Expr>), Chomp(Box<Expr>), Chop(Box<Expr>), Length(Box<Expr>), Substr { string: Box<Expr>, offset: Box<Expr>, length: Option<Box<Expr>>, replacement: Option<Box<Expr>>, }, Index { string: Box<Expr>, substr: Box<Expr>, position: Option<Box<Expr>>, }, Rindex { string: Box<Expr>, substr: Box<Expr>, position: Option<Box<Expr>>, }, Sprintf { format: Box<Expr>, args: Vec<Expr>, }, Abs(Box<Expr>), Int(Box<Expr>), Sqrt(Box<Expr>), Sin(Box<Expr>), Cos(Box<Expr>), Atan2 { y: Box<Expr>, x: Box<Expr>, }, Exp(Box<Expr>), Log(Box<Expr>), Rand(Option<Box<Expr>>), Srand(Option<Box<Expr>>), Hex(Box<Expr>), Oct(Box<Expr>), Lc(Box<Expr>), Uc(Box<Expr>), Lcfirst(Box<Expr>), Ucfirst(Box<Expr>), Fc(Box<Expr>), Crypt { plaintext: Box<Expr>, salt: Box<Expr>, }, Pos(Option<Box<Expr>>), Study(Box<Expr>), Defined(Box<Expr>), Ref(Box<Expr>), ScalarContext(Box<Expr>), Chr(Box<Expr>), Ord(Box<Expr>), OpenMyHandle { name: String, }, Open { handle: Box<Expr>, mode: Box<Expr>, file: Option<Box<Expr>>, }, Close(Box<Expr>), ReadLine(Option<String>), Eof(Option<Box<Expr>>), Opendir { handle: Box<Expr>, path: Box<Expr>, }, Readdir(Box<Expr>), Closedir(Box<Expr>), Rewinddir(Box<Expr>), Telldir(Box<Expr>), Seekdir { handle: Box<Expr>, position: Box<Expr>, }, FileTest { op: char, expr: Box<Expr>, }, System(Vec<Expr>), Exec(Vec<Expr>), Eval(Box<Expr>), Do(Box<Expr>), Require(Box<Expr>), Exit(Option<Box<Expr>>), Chdir(Box<Expr>), Mkdir { path: Box<Expr>, mode: Option<Box<Expr>>, }, Unlink(Vec<Expr>), Rename { old: Box<Expr>, new: Box<Expr>, }, Chmod(Vec<Expr>), Chown(Vec<Expr>), Stat(Box<Expr>), Lstat(Box<Expr>), Link { old: Box<Expr>, new: Box<Expr>, }, Symlink { old: Box<Expr>, new: Box<Expr>, }, Readlink(Box<Expr>), Files(Vec<Expr>), Filesf(Vec<Expr>), FilesfRecursive(Vec<Expr>), Dirs(Vec<Expr>), DirsRecursive(Vec<Expr>), SymLinks(Vec<Expr>), Sockets(Vec<Expr>), Pipes(Vec<Expr>), BlockDevices(Vec<Expr>), CharDevices(Vec<Expr>), Executables(Vec<Expr>), Glob(Vec<Expr>), GlobPar { args: Vec<Expr>, progress: Option<Box<Expr>>, }, ParSed { args: Vec<Expr>, progress: Option<Box<Expr>>, }, Bless { ref_expr: Box<Expr>, class: Option<Box<Expr>>, }, Caller(Option<Box<Expr>>), Wantarray, List(Vec<Expr>), PostfixIf { expr: Box<Expr>, condition: Box<Expr>, }, PostfixUnless { expr: Box<Expr>, condition: Box<Expr>, }, PostfixWhile { expr: Box<Expr>, condition: Box<Expr>, }, PostfixUntil { expr: Box<Expr>, condition: Box<Expr>, }, PostfixForeach { expr: Box<Expr>, list: Box<Expr>, }, RetryBlock { body: Block, times: Box<Expr>, backoff: RetryBackoff, }, RateLimitBlock { slot: u32, max: Box<Expr>, window: Box<Expr>, body: Block, }, EveryBlock { interval: Box<Expr>, body: Block, }, GenBlock { body: Block, }, Yield(Box<Expr>), AlgebraicMatch { subject: Box<Expr>, arms: Vec<MatchArm>, },
}

Variants§

§

Integer(i64)

§

Float(f64)

§

String(String)

§

Bareword(String)

Unquoted identifier used as an expression term (if (FOO)), distinct from quoted 'FOO' / "FOO". Resolved at runtime: nullary subroutine if defined, otherwise stringifies like Perl barewords.

§

Regex(String, String)

§

QW(Vec<String>)

§

Undef

§

MagicConst(MagicConstKind)

__FILE__ / __LINE__ (Perl compile-time literals).

§

InterpolatedString(Vec<StringPart>)

§

ScalarVar(String)

§

ArrayVar(String)

§

HashVar(String)

§

ArrayElement

Fields

§array: String
§index: Box<Expr>
§

HashElement

Fields

§hash: String
§key: Box<Expr>
§

ArraySlice

Fields

§array: String
§indices: Vec<Expr>
§

HashSlice

Fields

§hash: String
§keys: Vec<Expr>
§

HashSliceDeref

@$container{keys} — hash slice when the hash is reached via a scalar ref (Perl @$href{k1,k2}).

Fields

§container: Box<Expr>
§keys: Vec<Expr>
§

AnonymousListSlice

(LIST)[i,...] / (sort ...)[0] — subscript after a non-arrow container (not $a[i] / $r->[i]).

Fields

§source: Box<Expr>
§indices: Vec<Expr>
§

ScalarRef(Box<Expr>)

§

ArrayRef(Vec<Expr>)

§

HashRef(Vec<(Expr, Expr)>)

§

CodeRef

Fields

§body: Block
§

SubroutineRef(String)

Unary &name — invoke subroutine name (Perl &foo / &Foo::bar).

§

SubroutineCodeRef(String)

\&name — coderef to an existing named subroutine (Perl \&foo).

§

DynamicSubCodeRef(Box<Expr>)

\&{ EXPR } — coderef to a subroutine whose name is given by EXPR (string or expression).

§

Deref

Fields

§expr: Box<Expr>
§kind: Sigil
§

ArrowDeref

Fields

§expr: Box<Expr>
§index: Box<Expr>
§

BinOp

Fields

§left: Box<Expr>
§right: Box<Expr>
§

UnaryOp

Fields

§expr: Box<Expr>
§

PostfixOp

Fields

§expr: Box<Expr>
§

Assign

Fields

§target: Box<Expr>
§value: Box<Expr>
§

CompoundAssign

Fields

§target: Box<Expr>
§value: Box<Expr>
§

Ternary

Fields

§condition: Box<Expr>
§then_expr: Box<Expr>
§else_expr: Box<Expr>
§

Repeat

Fields

§expr: Box<Expr>
§count: Box<Expr>
§

Range

Fields

§from: Box<Expr>
§to: Box<Expr>
§exclusive: bool
§step: Option<Box<Expr>>
§

MyExpr

my $x = EXPR (or our / state / local) used as an expression — e.g. inside if (my $line = readline) / while (my $x = next()). Evaluation: declare each var in the current scope, evaluate the initializer (or default to undef), then return the assigned value(s). Distinct from StmtKind::My which only appears at statement level.

Fields

§keyword: String
§decls: Vec<VarDecl>
§

FuncCall

Fields

§name: String
§args: Vec<Expr>
§

MethodCall

Fields

§object: Box<Expr>
§method: String
§args: Vec<Expr>
§super_call: bool

When true, dispatch starts after the caller package in the linearized MRO.

§

IndirectCall

Call through a coderef or invokable scalar: $cr->(...) is [MethodCall]; this is $coderef(...) or &$coderef(...) (the latter sets ampersand).

Fields

§target: Box<Expr>
§args: Vec<Expr>
§ampersand: bool
§pass_caller_arglist: bool

True for unary &$cr with no (...) — Perl passes the caller’s @_ to the invoked sub.

§

Typeglob(String)

Limited typeglob: *FOO → handle name FOO for open / I/O.

§

TypeglobExpr(Box<Expr>)

*{ EXPR } — typeglob slot by dynamic name (e.g. *{$pkg . '::import'}).

§

Print

Fields

§handle: Option<String>
§args: Vec<Expr>
§

Say

Fields

§handle: Option<String>
§args: Vec<Expr>
§

Printf

Fields

§handle: Option<String>
§args: Vec<Expr>
§

Die(Vec<Expr>)

§

Warn(Vec<Expr>)

§

Match

Fields

§expr: Box<Expr>
§pattern: String
§flags: String
§scalar_g: bool

When true, /g uses Perl scalar semantics (one match per eval, updates pos).

§delim: char
§

Substitution

Fields

§expr: Box<Expr>
§pattern: String
§replacement: String
§flags: String
§delim: char
§

Transliterate

Fields

§expr: Box<Expr>
§from: String
§flags: String
§delim: char
§

MapExpr

Fields

§block: Block
§list: Box<Expr>
§flatten_array_refs: bool

flat_map { } — peel one ARRAY ref from each iteration (stryke extension).

§stream: bool

maps / flat_maps — lazy iterator output (stryke); map / flat_map use false.

§

MapExprComma

map EXPR, LIST — EXPR is evaluated in list context with $_ set to each element.

Fields

§expr: Box<Expr>
§list: Box<Expr>
§flatten_array_refs: bool
§stream: bool
§

GrepExpr

Fields

§block: Block
§list: Box<Expr>
§

GrepExprComma

grep EXPR, LIST — EXPR is evaluated with $_ set to each element (Perl list vs scalar context).

Fields

§expr: Box<Expr>
§list: Box<Expr>
§

SortExpr

sort BLOCK LIST, sort SUB LIST, or sort $coderef LIST (Perl uses $a/$b in the comparator).

Fields

§list: Box<Expr>
§

ReverseExpr(Box<Expr>)

§

Rev(Box<Expr>)

rev EXPR — always string-reverse (scalar reverse), stryke extension.

§

JoinExpr

Fields

§separator: Box<Expr>
§list: Box<Expr>
§

SplitExpr

Fields

§pattern: Box<Expr>
§string: Box<Expr>
§limit: Option<Box<Expr>>
§

ForEachExpr

each { BLOCK } @list — execute BLOCK for each element with $_ aliased; void context (returns count in scalar context).

Fields

§block: Block
§list: Box<Expr>
§

PMapExpr

Fields

§block: Block
§list: Box<Expr>
§progress: Option<Box<Expr>>

pmap { } @list, progress => EXPR — when truthy, print a progress bar on stderr.

§flat_outputs: bool

pflat_map { } — flatten each block result like ExprKind::MapExpr (arrays expand); parallel output is stitched in input order (unlike plain pmap, which is unordered).

§on_cluster: Option<Box<Expr>>

pmap_on $cluster { } @list — fan out over SSH (stryke --remote-worker); None = local rayon.

§stream: bool

pmaps / pflat_maps — streaming variant: returns a lazy iterator that processes chunks in parallel via rayon instead of eagerly collecting all results.

§

PMapChunkedExpr

pmap_chunked N { BLOCK } @list [, progress => EXPR] — parallel map in batches of N.

Fields

§chunk_size: Box<Expr>
§block: Block
§list: Box<Expr>
§progress: Option<Box<Expr>>
§

PGrepExpr

Fields

§block: Block
§list: Box<Expr>
§progress: Option<Box<Expr>>

pgrep { } @list, progress => EXPR — stderr progress bar when truthy.

§stream: bool

pgreps — streaming variant: returns a lazy iterator.

§

PForExpr

pfor { BLOCK } @list [, progress => EXPR] — stderr progress bar when truthy.

Fields

§block: Block
§list: Box<Expr>
§progress: Option<Box<Expr>>
§

ParLinesExpr

par_lines PATH, fn { ... } [, progress => EXPR] — optional stderr progress (per line).

Fields

§path: Box<Expr>
§callback: Box<Expr>
§progress: Option<Box<Expr>>
§

ParWalkExpr

par_walk PATH, fn { ... } [, progress => EXPR] — parallel recursive directory walk; $_ is each path.

Fields

§path: Box<Expr>
§callback: Box<Expr>
§progress: Option<Box<Expr>>
§

PwatchExpr

pwatch GLOB, fn { ... } — notify-based watcher (tree-walker only).

Fields

§path: Box<Expr>
§callback: Box<Expr>
§

PSortExpr

psort { } @list [, progress => EXPR] — stderr progress when truthy (start/end phases).

Fields

§list: Box<Expr>
§progress: Option<Box<Expr>>
§

ReduceExpr

reduce { $a + $b } @list — sequential left fold (like List::Util::reduce). $a is the accumulator; $b is the next list element.

Fields

§block: Block
§list: Box<Expr>
§

PReduceExpr

preduce { $a + $b } @list — parallel fold/reduce using rayon. $a and $b are set to the accumulator and current element.

Fields

§block: Block
§list: Box<Expr>
§progress: Option<Box<Expr>>

preduce { } @list, progress => EXPR — stderr progress bar when truthy.

§

PReduceInitExpr

preduce_init EXPR, { $a / $b } @list — parallel fold with explicit identity. Each chunk starts from a clone of EXPR; partials are merged (hash maps add counts per key; other types use the same block with $a / $b as partial accumulators). $a is the accumulator, $b is the next list element; @_ is ($a, $b) for my ($acc, $item) = @_.

Fields

§init: Box<Expr>
§block: Block
§list: Box<Expr>
§progress: Option<Box<Expr>>
§

PMapReduceExpr

pmap_reduce { map } { reduce } @list — fused parallel map + tree reduce (no full mapped array).

Fields

§map_block: Block
§reduce_block: Block
§list: Box<Expr>
§progress: Option<Box<Expr>>
§

PcacheExpr

pcache { BLOCK } @list [, progress => EXPR] — stderr progress bar when truthy.

Fields

§block: Block
§list: Box<Expr>
§progress: Option<Box<Expr>>
§

PselectExpr

pselect($rx1, $rx2, ...) — optional timeout => SECS for bounded wait.

Fields

§receivers: Vec<Expr>
§timeout: Option<Box<Expr>>
§

FanExpr

fan [COUNT] { BLOCK } — execute BLOCK COUNT times in parallel (default COUNT = rayon pool size). fan_cap [COUNT] { BLOCK } — same, but return value is a list of each block’s return value (index order). $_ is set to the iteration index (0..COUNT-1). Optional , progress => EXPR — stderr progress bar (like pmap).

Fields

§count: Option<Box<Expr>>
§block: Block
§progress: Option<Box<Expr>>
§capture: bool
§

AsyncBlock

async { BLOCK } — run BLOCK on a worker thread; returns a task handle.

Fields

§body: Block
§

SpawnBlock

spawn { BLOCK } — same as ExprKind::AsyncBlock (Rust thread::spawn–style naming); join with await.

Fields

§body: Block
§

Trace

trace { BLOCK } — print mysync scalar mutations to stderr (for parallel debugging).

Fields

§body: Block
§

Timer

timer { BLOCK } — run BLOCK and return elapsed wall time in milliseconds (float).

Fields

§body: Block
§

Bench

bench { BLOCK } N — run BLOCK N times (warmup + min/mean/p99 wall time, ms).

Fields

§body: Block
§times: Box<Expr>
§

Spinner

spinner "msg" { BLOCK } — animated spinner on stderr while block runs.

Fields

§message: Box<Expr>
§body: Block
§

Await(Box<Expr>)

await EXPR — join an async task, or return EXPR unchanged.

§

Slurp(Box<Expr>)

Read entire file as UTF-8 (slurp $path).

§

Capture(Box<Expr>)

Run shell command and return structured output (capture "cmd").

§

Qx(Box<Expr>)

`cmd` / qx{cmd} — run via sh -c, return stdout as a string (Perl); updates $?.

§

FetchUrl(Box<Expr>)

Blocking HTTP GET (fetch_url $url).

§

Pchannel

pchannel() — unbounded; pchannel(N) — bounded capacity N.

Fields

§capacity: Option<Box<Expr>>
§

Push

Fields

§array: Box<Expr>
§values: Vec<Expr>
§

Pop(Box<Expr>)

§

Shift(Box<Expr>)

§

Unshift

Fields

§array: Box<Expr>
§values: Vec<Expr>
§

Splice

Fields

§array: Box<Expr>
§offset: Option<Box<Expr>>
§length: Option<Box<Expr>>
§replacement: Vec<Expr>
§

Delete(Box<Expr>)

§

Exists(Box<Expr>)

§

Keys(Box<Expr>)

§

Values(Box<Expr>)

§

Each(Box<Expr>)

§

Chomp(Box<Expr>)

§

Chop(Box<Expr>)

§

Length(Box<Expr>)

§

Substr

Fields

§string: Box<Expr>
§offset: Box<Expr>
§length: Option<Box<Expr>>
§replacement: Option<Box<Expr>>
§

Index

Fields

§string: Box<Expr>
§substr: Box<Expr>
§position: Option<Box<Expr>>
§

Rindex

Fields

§string: Box<Expr>
§substr: Box<Expr>
§position: Option<Box<Expr>>
§

Sprintf

Fields

§format: Box<Expr>
§args: Vec<Expr>
§

Abs(Box<Expr>)

§

Int(Box<Expr>)

§

Sqrt(Box<Expr>)

§

Sin(Box<Expr>)

§

Cos(Box<Expr>)

§

Atan2

Fields

§

Exp(Box<Expr>)

§

Log(Box<Expr>)

§

Rand(Option<Box<Expr>>)

rand with optional upper bound (none = Perl default 1.0).

§

Srand(Option<Box<Expr>>)

srand with optional seed (none = time-based).

§

Hex(Box<Expr>)

§

Oct(Box<Expr>)

§

Lc(Box<Expr>)

§

Uc(Box<Expr>)

§

Lcfirst(Box<Expr>)

§

Ucfirst(Box<Expr>)

§

Fc(Box<Expr>)

Unicode case fold (Perl fc).

§

Crypt

DES-style crypt (see libc crypt(3) on Unix; empty on other targets).

Fields

§plaintext: Box<Expr>
§salt: Box<Expr>
§

Pos(Option<Box<Expr>>)

pos — optional scalar lvalue target (None = $_).

§

Study(Box<Expr>)

study — hint for repeated matching; returns byte length of the string.

§

Defined(Box<Expr>)

§

Ref(Box<Expr>)

§

ScalarContext(Box<Expr>)

§

Chr(Box<Expr>)

§

Ord(Box<Expr>)

§

OpenMyHandle

open my $fh — only valid as ExprKind::Open::handle; declares $fh and binds the handle.

Fields

§name: String
§

Open

Fields

§handle: Box<Expr>
§mode: Box<Expr>
§file: Option<Box<Expr>>
§

Close(Box<Expr>)

§

ReadLine(Option<String>)

§

Eof(Option<Box<Expr>>)

§

Opendir

Fields

§handle: Box<Expr>
§path: Box<Expr>
§

Readdir(Box<Expr>)

§

Closedir(Box<Expr>)

§

Rewinddir(Box<Expr>)

§

Telldir(Box<Expr>)

§

Seekdir

Fields

§handle: Box<Expr>
§position: Box<Expr>
§

FileTest

Fields

§op: char
§expr: Box<Expr>
§

System(Vec<Expr>)

§

Exec(Vec<Expr>)

§

Eval(Box<Expr>)

§

Do(Box<Expr>)

§

Require(Box<Expr>)

§

Exit(Option<Box<Expr>>)

§

Chdir(Box<Expr>)

§

Mkdir

Fields

§path: Box<Expr>
§mode: Option<Box<Expr>>
§

Rename

Fields

§old: Box<Expr>
§new: Box<Expr>
§

Chmod(Vec<Expr>)

chmod MODE, @files — first expr is mode, rest are paths.

§

Chown(Vec<Expr>)

chown UID, GID, @files — first two are uid/gid, rest are paths.

§

Stat(Box<Expr>)

§

Lstat(Box<Expr>)

Fields

§old: Box<Expr>
§new: Box<Expr>

Fields

§old: Box<Expr>
§new: Box<Expr>
§

Files(Vec<Expr>)

files / files DIR — list file names in a directory (default: .).

§

Filesf(Vec<Expr>)

filesf / filesf DIR / f — list only regular file names in a directory (default: .).

§

FilesfRecursive(Vec<Expr>)

fr DIR — list only regular file names recursively (default: .).

§

Dirs(Vec<Expr>)

dirs / dirs DIR / d — list subdirectory names in a directory (default: .).

§

DirsRecursive(Vec<Expr>)

dr DIR — list subdirectory paths recursively (default: .).

sym_links / sym_links DIR — list symlink names in a directory (default: .).

§

Sockets(Vec<Expr>)

sockets / sockets DIR — list Unix socket names in a directory (default: .).

§

Pipes(Vec<Expr>)

pipes / pipes DIR — list named-pipe (FIFO) names in a directory (default: .).

§

BlockDevices(Vec<Expr>)

block_devices / block_devices DIR — list block device names in a directory (default: .).

§

CharDevices(Vec<Expr>)

char_devices / char_devices DIR — list character device names in a directory (default: .).

§

Executables(Vec<Expr>)

exe / exe DIR — list executable file names in a directory (default: .).

§

Glob(Vec<Expr>)

§

GlobPar

Parallel recursive glob (rayon); same patterns as glob, different walk strategy. Optional , progress => EXPR — stderr progress bar (one tick per pattern).

Fields

§args: Vec<Expr>
§progress: Option<Box<Expr>>
§

ParSed

par_sed PATTERN, REPLACEMENT, FILES... [, progress => EXPR] — parallel in-place regex replace per file (g semantics).

Fields

§args: Vec<Expr>
§progress: Option<Box<Expr>>
§

Bless

Fields

§ref_expr: Box<Expr>
§class: Option<Box<Expr>>
§

Caller(Option<Box<Expr>>)

§

Wantarray

§

List(Vec<Expr>)

§

PostfixIf

Fields

§expr: Box<Expr>
§condition: Box<Expr>
§

PostfixUnless

Fields

§expr: Box<Expr>
§condition: Box<Expr>
§

PostfixWhile

Fields

§expr: Box<Expr>
§condition: Box<Expr>
§

PostfixUntil

Fields

§expr: Box<Expr>
§condition: Box<Expr>
§

PostfixForeach

Fields

§expr: Box<Expr>
§list: Box<Expr>
§

RetryBlock

retry { BLOCK } times => N [, backoff => linear|exponential|none] — re-run block until success or attempts exhausted.

Fields

§body: Block
§times: Box<Expr>
§

RateLimitBlock

rate_limit(MAX, WINDOW) { BLOCK } — sliding window: at most MAX runs per WINDOW (e.g. "1s"). slot is assigned at parse time for per-site state in the interpreter.

Fields

§slot: u32
§max: Box<Expr>
§window: Box<Expr>
§body: Block
§

EveryBlock

every(INTERVAL) { BLOCK } — repeat BLOCK forever with sleep (INTERVAL like "5s" or seconds).

Fields

§interval: Box<Expr>
§body: Block
§

GenBlock

gen { ... yield ... } — lazy generator; call ->next for each value.

Fields

§body: Block
§

Yield(Box<Expr>)

yield EXPR — only valid inside gen { } (and propagates through control flow).

§

AlgebraicMatch

match (EXPR) { PATTERN => EXPR, ... } — first matching arm; bindings scoped to the arm body.

Fields

§subject: Box<Expr>

Trait Implementations§

Source§

impl Clone for ExprKind

Source§

fn clone(&self) -> ExprKind

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ExprKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ExprKind

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for ExprKind

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> Finish for T

Source§

fn finish(self)

Does nothing but move self, equivalent to drop.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<F, T> IntoSample<T> for F
where T: FromSample<F>,

Source§

fn into_sample(self) -> T

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<U, T> ToOwnedObj<U> for T
where U: FromObjRef<T>,

Source§

fn to_owned_obj(&self, data: FontData<'_>) -> U

Convert this type into T, using the provided data to resolve any offsets.
Source§

impl<U, T> ToOwnedTable<U> for T
where U: FromTableRef<T>,

Source§

fn to_owned_table(&self) -> U

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,