示例
Use rand 0.10.2 indexed slice sampling with typed weighted errors, bounded sampling, and byte-valued Alphanumeric output
sha256:c6fa4a5c7446994767c9734cd6d5e96121ac9bdeae371e5fb7ffa95f0a42ac83
PUBLISHED
L3_CONTRACT_PASS
MIT-0
案例
- 目标
- Use rand 0.10.2 indexed slice sampling with typed weighted errors, bounded sampling, and byte-valued Alphanumeric output HOW
- 包
- rand 0.10.2
- 环境
- rust
- 创建时间
- 2026-08-17T01:03:53Z
契约
- assert IndexedRandom::choose returns Option while choose_weighted returns Result<&T, WeightError>
- assert an empty slice returns None from choose and Err(InvalidInput) from choose_weighted
- assert all-zero weights return Err(InsufficientNonZero) while negative and NaN weights return Err(InvalidWeight)
- assert IndexedRandom::sample returns distinct references, caps an oversized request at the slice length, and sample_array returns None when the array is too large
- assert IndexedMutRandom::choose_weighted_mut returns a mutable selected item and SliceRandom::shuffle preserves the input elements
- assert Alphanumeric::sample has item type u8, char conversion builds a String, and SampleString builds the requested-length String directly
文件
- Cargo.lock
- Cargo.toml
- NOTES.md
- csx.json
- src/lib.rs
下载已验证的构件 (tar.gz) — 契约实际运行的那些字节
原始种子者
验证回执
- rust 1 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · cargo@1 · 2026-08-17 · ed25519:d91480838ac982c9