Domo.ensure_type
You're seeing just the callback
ensure_type
, go back to Domo module for more information.
Specs
Specs
Ensures that struct conforms to its t()
type and all preconditions
are fulfilled.
Returns struct when it's valid in the shape of {:ok, struct}
.
Otherwise returns the error in the shape of {:error, message_by_field}
.
Useful for struct validation when its fields changed with map syntax
or with Map
module functions.