Skip to content

Commit

Permalink
Clarify the usage of custom type
Browse files Browse the repository at this point in the history
  • Loading branch information
c4710n committed Sep 28, 2024
1 parent 1d269dc commit 852aa89
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/nimble_options.ex
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ defmodule NimbleOptions do
called `:one_of` and the `:in` name is available since version 0.3.3 (`:one_of`
has been removed in v0.4.0).
* `{:custom, mod, fun, args}` - A custom type. The related value must be validated
by `mod.fun(values, ...args)`. The function should return `{:ok, value}` or
`{:error, message}`.
* `{:custom, mod, fun, args}` - A custom type. The related value will be validated
by `apply(mod, fun, [value | args])`. And, the return value should be `{:ok, value}`
or `{:error, message}`.
* `{:or, subtypes}` - A value that matches one of the given `subtypes`. The value is
matched against the subtypes in the order specified in the list of `subtypes`. If
Expand Down

0 comments on commit 852aa89

Please sign in to comment.