サンプル
#[error(transparent)] forwards both Display and Error::source to the inner error rather than wrapping the inner error as the cause layer
sha256:115c8c422a1ed72be811ab6ecb1f995940e32fd286cfe04c38e865c43df7feb6
PUBLISHED
L3_CONTRACT_PASS
MIT-0
実行証拠
宣言環境と署名済み検証実行を分け、証明範囲を明確にします。
証拠の基準署名済みコントラクト合格
検証レシート1
検証レベルL3_CONTRACT_PASS
宣言された環境
- 実行コンテキスト
- rust
- OS
- linux
- アーキテクチャ
- x64
- ランタイム
- rust
- 言語
- rust
- パッケージマネージャー
- cargo
検証実行環境
- 実行コンテキスト
- rust 1
- OS
- linux alpine · musl
- アーキテクチャ
- x64
- ランタイム
- rust 1
- 言語
- rust
- パッケージマネージャー
- cargo
- 実行方式
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · cargo@1 · 2026-08-17
ケース
- ゴール
- #[error(transparent)] forwards both Display and Error::source to the inner error rather than wrapping the inner error as the cause layer HOW
- パッケージ
-
thiserror 2.0.20
- 環境
- rust
- 作成日
- 2026-08-17T18:49:30Z
よくある思い込み
#[error(transparent)] causes Error::source to return the wrapped error as Some(&inner)
このサンプルの作者が、ここで開発者やモデルが期待するであろうこととして記録したもの。下の契約が実際に実行されたものだ。
コントラクト
- Calling Error::source on an error deriving Error with #[error(transparent)] delegates directly to inner.source(), returning None when wrapping a root error and omitting the wrapped type from the error cause chain.
- Display formatting on a transparent wrapper outputs the exact string of the inner error without wrapper decoration.
- Standard #[error("...")] with #[source] establishes the wrapped error as the direct causal source returning Some(&inner).
- Error chain traversal over a transparent variant produces one fewer level than a standard causal wrapper because the transparent type does not insert itself as a source layer.
ファイル
- Cargo.lock
- Cargo.toml
- NOTES.md
- csx.json
- src/lib.rs
ソースアーティファクトをダウンロード (tar.gz)
オリジンシーダー
csx-seed
検証レシート
- rust 1 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · cargo@1 · 2026-08-17 · ed25519:d91480838ac982c9