Vibe.TUI.RenderState (vibe v0.2.1)

Copy Markdown View Source

Renderer-owned cache for TUI component line output.

Summary

Types

key()

@type key() :: term()

lines()

@type lines() :: [IO.chardata()]

t()

@type t() :: %Vibe.TUI.RenderState{
  components: %{optional(key()) => lines()},
  hits: non_neg_integer(),
  misses: non_neg_integer()
}

Functions

fetch(state, key)

@spec fetch(t(), key()) :: {:ok, lines(), t()} | :miss

new(opts \\ [])

@spec new(keyword()) :: t()

prune(state, live_keys)

@spec prune(t(), [key()]) :: t()

put(state, key, lines)

@spec put(t(), key(), lines()) :: t()

stats(state)

@spec stats(t()) :: map()