Пример
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