Tinkex.NotGiven (Tinkex v0.3.4)

View Source

Sentinel values for distinguishing omitted fields from explicit nil.

Mirrors Python's NotGiven/Omit pattern so request payload builders can drop fields that callers intentionally left out while preserving nil values.

Summary

Functions

Replace sentinel values with the provided fallback.

Check if a value is the NotGiven sentinel.

Retrieve the omit sentinel used to explicitly drop default values.

Check if a value is the omit sentinel.

Retrieve the NotGiven sentinel.

Functions

coalesce(value, default \\ nil)

@spec coalesce(term(), term()) :: term()

Replace sentinel values with the provided fallback.

is_not_given(value)

(macro)

is_omit(value)

(macro)

not_given?(value)

Check if a value is the NotGiven sentinel.

omit()

@spec omit() :: atom()

Retrieve the omit sentinel used to explicitly drop default values.

omit?(value)

Check if a value is the omit sentinel.

value()

@spec value() :: atom()

Retrieve the NotGiven sentinel.