View Source Bunch.Type (Bunch v1.3.2)

A bunch of commonly used types.

Link to this section 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.

Link to this section 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.