MingaEditor.Renderer.TextInteractionIndex.Reader (Minga v0.1.0)

Copy Markdown View Source

Opaque read capability for one renderer-owned interaction-index generation.

Summary

Functions

Creates a read capability for the protected table owned by the renderer.

Resolves input directly from immutable renderer-owned data.

Types

t()

@opaque t()

Functions

new(table)

@spec new(:ets.table()) :: t()

Creates a read capability for the protected table owned by the renderer.

resolve(reader, event)

@spec resolve(t(), MingaEditor.Mouse.TextEvent.t()) ::
  {:ok, MingaEditor.Mouse.Target.Text.t()}
  | {:error,
     :inactive
     | :row_not_found
     | :row_id_mismatch
     | :not_source_backed
     | :unavailable}

Resolves input directly from immutable renderer-owned data.