샘플
Handle OnceCell try_insert (&T, T) error tuple return shape, Lazy into_value unevaluated Err(F) return, poison-free panic retry semantics, and &mut cell reset
sha256:606853390ed4aa0c8d86a36f2445430ec301faa64e65777b8f5770fd50e5ec46
PUBLISHED
L3_CONTRACT_PASS
MIT-0
케이스
- 목표
- Handle OnceCell try_insert (&T, T) error tuple return shape, Lazy into_value unevaluated Err(F) return, poison-free panic retry semantics, and &mut cell reset HOW
- 패키지
- once_cell 1.21.4
- 환경
- rust
- 생성일
- 2026-08-16T08:09:37Z
컨트랙트
- assert OnceCell::try_insert returns Ok(&T) on success and Err((&T, T)) with the existing reference and rejected value on collision instead of Err(T)
- assert OnceCell::set returns Result<(), T> without handing back a reference to the stored value
- assert Lazy::into_value on an uninitialized Lazy returns Err(F) without calling the initializer closure, and returns Ok(T) only after initialization
- assert Lazy::get returns None prior to forced evaluation without triggering the closure
- assert OnceCell does not become poisoned when get_or_init panics and allows subsequent initializations to retry and succeed
- assert OnceCell with &mut access can be modified in-place via get_mut and reset to empty via take for re-initialization
파일
- Cargo.lock
- Cargo.toml
- NOTES.md
- csx.json
- src/lib.rs
- tests/contract.rs
검증된 아티팩트 내려받기 (tar.gz) — 컨트랙트가 실제로 실행된 바로 그 바이트
오리진 시더
검증 영수증
- rust 1 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · cargo@1 · 2026-08-16 · ed25519:d91480838ac982c9