Nvir.Cast (Nvir v0.13.2)
View SourceCollection of casters for environment variables.
Summary
Functions
Casts the given value to the desired type.
Types
Functions
Casts the given value to the desired type.
Environment variables are always defined as a string. Thus, the cast/2
function will only accept strings for the value
argument.
Accepts a built-in caster or a custom function returning {:ok, value}
or
{:error, String.t()}
. You may as well directly return an error tuple from a
recursive cast/2
call.
The list of built-in casters is described in the reading environment variables guide.