Bunch.Type (Bunch v1.6.3)

View Source

A bunch of commonly used types.

Summary

Types

Represents a value along with state.

Represents a try_t/0 value along with state.

Represents a try_t/1 value along with state.

Represents result of an operation that may succeed or fail.

Represents result of an operation that may return something or fail with any reason.

Represents result of an operation that may return something or fail.

Types

stateful_t(value, state)

@type stateful_t(value, state) :: {value, state}

Represents a value along with state.

stateful_try_t(state)

@type stateful_try_t(state) :: stateful_t(try_t(), state)

Represents a try_t/0 value along with state.

stateful_try_t(value, state)

@type stateful_try_t(value, state) :: stateful_t(try_t(value), state)

Represents a try_t/1 value along with state.

try_t()

@type try_t() :: :ok | {:error, reason :: any()}

Represents result of an operation that may succeed or fail.

try_t(value)

@type try_t(value) :: {:ok, value} | {:error, reason :: any()}

Represents result of an operation that may return something or fail with any reason.

try_t(value, reason)

@type try_t(value, reason) :: {:ok, value} | {:error, reason}

Represents result of an operation that may return something or fail.