OkThen.Result.none_assert-exclamation-mark
You're seeing just the function
none_assert-exclamation-mark
, go back to OkThen.Result module for more information.
Link to this function
none_assert!(result)
Specs
none_assert!(result_input()) :: :none
Raises ArgumentError
if result
is not tagged :none
. Otherwise, returns result
unchanged.
Equivalent to tagged_assert!(result, :none)
. See tagged_assert!/3
.
Examples
iex> :none |> Result.none_assert!()
:none
iex> {:ok, "hello"} |> Result.none_assert!()
** (ArgumentError) Result is not tagged none: {:ok, "hello"}.