Scenic.Driver.validate_opts

You're seeing just the callback validate_opts, go back to Scenic.Driver module for more information.

Specs

validate_opts(opts :: Keyword.t()) ::
  {:ok, any()}
  | {:error, String.t()}
  | {:error, NimbleOptions.ValidationError.t()}

Validate the options passed to a Driver.

The list of options for a driver are passed in as opts. If you decide then are good, return them, or a transformed set of them as {:ok, opts}

If they are invalid, return either one of:

  • {:error, String.t()}
  • {:error, NimbleOptions.ValidationError.t()}

Scenic uses NimbleOptions internally for options validation, so NimbleOptions errors are supported.