GPUI.Schema.Extension.Support (gpui v0.2.0-rc.1)

Copy Markdown View Source

Bounded display support for one exact presentation contract version.

Summary

Functions

Maximum extension contracts advertised by one display or remote peer.

Builds and validates support against the canonical schema contract.

Tests whether support provides one exact contract version and optional capability.

Types

t()

@type t() :: %GPUI.Schema.Extension.Support{
  capabilities: [atom()],
  id: atom(),
  version: pos_integer()
}

Functions

max_contracts()

@spec max_contracts() :: pos_integer()

Maximum extension contracts advertised by one display or remote peer.

new(id, version, capabilities)

@spec new(atom(), pos_integer(), [atom()]) :: {:ok, t()} | {:error, term()}

Builds and validates support against the canonical schema contract.

provides?(support, id, version, capability \\ nil)

@spec provides?(t(), atom(), pos_integer(), atom() | nil) :: boolean()

Tests whether support provides one exact contract version and optional capability.