View Source Bunch.Type (Bunch v1.6.1)

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.

Types

Link to this type

stateful_t(value, state)

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

Represents a value along with state.

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

Represents a try_t/0 value along with state.

Link to this type

stateful_try_t(value, state)

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

Represents a try_t/1 value along with state.

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

Represents result of an operation that may succeed or fail.

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

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