CodeSampleX

示例

RegexBuilder enforces memory and nesting limits at compile time via Error::CompiledTooBig and Error::Syntax, and controls octal syntax, quantifier greediness, and Unicode character classes.

sha256:574f036389cec38bb62c26ab576954b8abd760beb1fad5213bd8de7071dee81c

发布状态。LOCAL_PASS 表示仅在作者环境中通过;PUBLISHED 表示已公开并等待独立验证;CROSS_PASS 表示另一验证者已复现;MATRIX_PASS 表示在不同环境中通过;STABLE 表示近期无失败且独立通过持续稳定。 证据强度。L0 仅有源码;L1 已解析依赖;L2 已编译或加载;L3 已通过契约;L4 已被独立复现;L5 已在不同环境中通过。 MIT-0

执行证据

分开显示声明环境和签名验证运行,明确样本的证明范围。

证据依据
独立交叉验证
验证回执
2
验证级别
L4_CROSS_PASS

声明的环境

执行上下文
rust
操作系统
linux
架构
x64
运行时
rust
语言
rust
包管理器
cargo

验证运行环境

rust 1 · linux alpine/x64 · docker PASS
执行上下文
rust 1
操作系统
linux alpine · musl
架构
x64
运行时
rust 1
语言
rust
包管理器
cargo
执行方式
container · docker

CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · cargo@1 · 2026-08-18

rust 1 · linux alpine/x64 · docker PASS
执行上下文
rust 1
操作系统
linux alpine · musl
架构
x64
运行时
rust 1
语言
rust
包管理器
cargo
执行方式
container · docker

CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · cargo@1 · 2026-08-18

案例

HOW
目标
RegexBuilder enforces memory and nesting limits at compile time via Error::CompiledTooBig and Error::Syntax, and controls octal syntax, quantifier greediness, and Unicode character classes.
符号
  • regex::RegexBuilder
  • regex::Error
环境
rust
创建时间
2026-08-18T10:08:33Z

契约

  1. RegexBuilder::size_limit restricts the compiled regex memory footprint, returning Error::CompiledTooBig with the configured limit when exceeded rather than panicking or truncating the pattern.
  2. RegexBuilder::nest_limit bounds the maximum nesting depth of parentheses, returning Error::Syntax when exceeded.
  3. RegexBuilder rejects octal escape sequences by default with Error::Syntax, but correctly resolves them when octal is explicitly enabled.
  4. RegexBuilder::swap_greed inverts the default greediness of repetition operators, causing + to match lazily.
  5. RegexBuilder::unicode controls whether shorthand character classes like \d match Unicode digits or strictly ASCII digits.

文件

  • Cargo.lock
  • Cargo.toml
  • NOTES.md
  • csx.json
  • src/lib.rs

下载源代码构件 (tar.gz)

原始种子者

csx-seed

验证回执

  • rust 1 · linux alpine/x64 · docker PASS
    CONTAINER_RUN compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS cargo@1
    ed25519:d91480838ac982c9
  • rust 1 · linux alpine/x64 · docker PASS
    CONTAINER_RUN compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS cargo@1
    ed25519:2175b912ea1c23b1