An opened consumer stream with explicit frame ownership receipts.
transfer/2 must perform every fallible admission check before claiming the
frame. After claim it must return a transferred receipt and retain a path that
retires the holder exactly once. Implementations must not raise across an
unknown claim point.
close/1 is idempotent and returns only after admission is closed and all
pending/current claims are retired or scheduled for consumer-safe retirement.
Summary
Types
@type ownership_error() :: {:caller_owned | :transferred, term()}
@type t() :: term()
All the types that implement this protocol.
@type transfer_result() :: {:ok, :transferred | :released} | {:error, ownership_error()}
Functions
@spec close(t()) :: :ok
@spec transfer(t(), VideoInterop.Frame.t()) :: transfer_result()