Gcode.Model.Skip (gcode v1.0.0)

A G-code skip.

Link to this section Summary

Functions

Initialise a skip without a number.

Initialise a skip with a number.

Link to this section Types

@type error() :: {:skip_error, String.t()}
@type t() :: %Gcode.Model.Skip{number: Gcode.Option.t(non_neg_integer())}

Link to this section Functions

@spec init() :: Gcode.Result.t(t())

Initialise a skip without a number.

example

Example

iex> Skip.init()
{:ok, %Skip{number: none()}}
@spec init(non_neg_integer()) :: Gcode.Result.t(t(), error())

Initialise a skip with a number.

example

Example

iex> 13
...> |> Skip.init()
{:ok, %Skip{number: some(13)}}