Celixir.Types.Optional (Celixir v0.3.0)

Copy Markdown View Source

CEL optional type — represents a value that may or may not be present.

Used with optional fields in protobuf messages and the optional library.

Summary

Types

t()

@type t() :: %Celixir.Types.Optional{has_value: boolean(), value: any()}

Functions

has_value?(optional)

none()

of(value)

of_non_zero_value(value)

or_optional(opt, other)

or_value(optional, default)

value(optional)