Gcode.Option (gcode v1.0.1)
A helper which represents an optional type.
Summary
Functions
Create or match a none
Is the value a none?
Create or match a some
Is the value a some?
Attempt to unwrap an option. Raises an error if the option is a none
Types
Link to this type
opt_none()
@type opt_none() :: :error
Link to this type
some(t)
@type some(t) :: {:ok, t}
Link to this type
t(value)
Functions
@spec none() :: Macro.t()
Create or match a none
Link to this function
none?(arg1)
Is the value a none?
Create or match a some
Link to this function
some?(arg1)
Is the value a some?
Link to this function
unwrap!(arg1)
Attempt to unwrap an option. Raises an error if the option is a none