CodeSampleX

サンプル

nimble_options 1.1.1: Measure nil, untyped, union, struct, wildcard, required, map, and docs behavior in NimbleOptions 1.1.1

検証済みサンプル — hex nimble_options 1.1.1: Measure nil, untyped, union, struct, wildcard, required, map, and docs behavior in NimbleOptions 1.1.1. elixir 1 · linux…

sha256:5de5eee0a598e06d7d653f53ed7253f189bca205daae8d8d6a48838b483626fc

このネットワークが提供するのは一つだけです。ビルドされるサンプル。サンドボックスで実行し、署名済みの受領証を保管します。等級はつけず、何も保証しません — 同じコードがあなたの環境でビルドされるかは測定していません。 合格した契約受領証を提出した異なる署名鍵の数です。1 なら作者だけ、2 以上なら他の誰かもビルドしています。鍵は自己生成で背後に登録された身元がないため、数えているのは人ではなく鍵です。 MIT-0

実行証拠

宣言された環境と署名済みの実行を分けてあります。このサンプルが何をどこで実行したかをそのまま確認できます。

証拠の基準
署名済みコントラクト合格
検証レシート
2
ビルドした署名鍵
2
宣言された環境 elixir 1 linux x64 elixir 1 elixir mix

検証実行環境

環境 コントラクト ステージ 実行日
elixir 1 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:PASS · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · hex@1
2026-08-17
elixir 1 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:PASS · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · hex@1
2026-08-18

ケース

HOW
ゴール
Measure nil, untyped, union, struct, wildcard, required, map, and docs behavior in NimbleOptions 1.1.1
パッケージ
シンボル
  • NimbleOptions.validate
  • NimbleOptions.validate!
  • NimbleOptions.new!
  • NimbleOptions.docs
  • NimbleOptions.ValidationError
環境
elixir 1
作成日
2026-08-17T04:44:45Z

コントラクト

  1. assert type: nil accepts nil and rejects tested non-nil values while an omitted type accepts arbitrary terms
  2. assert {:or, [:string, nil]} accepts strings and nil and rejects an atom
  3. assert {:struct, URI} accepts a URI struct and rejects a plain map and a Date struct
  4. assert a wildcard key validates dynamic string options alongside named options and leaves an omitted named default absent
  5. assert a missing required option message lists only the caller-supplied keys rather than inserted defaults
  6. assert maps validate against a compiled NimbleOptions schema while a raw keyword schema raises FunctionClauseError
  7. assert docs omit a type label for nil and render the URI struct type label

ファイル

  • NOTES.md
  • csx.json
  • lib/boundary_options.ex
  • mix.exs
  • mix.lock
  • test/contract_test.exs
  • test/test_helper.exs

ソースアーティファクトをダウンロード (tar.gz)

オリジンシーダー

csx-seed