View Source Qu.Queue protocol (qu v0.1.0)

Protocol definition shared by all queue implementations.

Summary

Types

t()

All the types that implement this protocol.

Types

@type item() :: any()
@type t() :: term()

All the types that implement this protocol.

Functions

@spec peek(t()) :: {:ok, item()} | :error
@spec pop(t()) :: {:ok, item(), t()} | :error
@spec put(t(), item()) :: {:ok, t()} | :error
@spec size(t()) :: integer()