Generic runtime tooling for Breeze applications.
Runtime state is an opaque in-VM value that can be captured, used to replace
a running view tree, or started as an isolated runtime. Development tools can
decide when to capture it through Breeze.Runtime.Hook without Breeze
imposing storage, history, or debugger semantics.
Replacing or starting from runtime state does not invoke mount/2.
Summary
Functions
Exports opaque state from a running Breeze server.
Displays a frame in a running Breeze application.
Dispatches a named event and payload to an isolated runtime.
Dispatches a message to an isolated runtime's handle_info/2 callback.
Dispatches decoded terminal input to an isolated runtime.
Pauses the current runtime frame until the next application interaction.
Renders an isolated runtime and returns its terminal content.
Replaces a running Breeze application's view runtime with exported state.
Returns rendered content, view metadata, and screen dimensions.
Starts an isolated runtime from exported state.
Stops an isolated runtime.
Types
@type t() :: %Breeze.Runtime{pid: pid(), terminal: Termite.Terminal.t()}
Functions
@spec capture_state( pid(), keyword() ) :: {:ok, Breeze.Runtime.State.t()} | {:error, term()}
Exports opaque state from a running Breeze server.
Displays a frame in a running Breeze application.
Pass :live as the frame to return to the application's current output.
Displaying another frame pauses the view runtime until live output is
restored.
Dispatches a named event and payload to an isolated runtime.
Dispatches a message to an isolated runtime's handle_info/2 callback.
Dispatches decoded terminal input to an isolated runtime.
Pauses the current runtime frame until the next application interaction.
Renders an isolated runtime and returns its terminal content.
@spec replace_state(pid(), Breeze.Runtime.State.t()) :: :ok | {:error, term()}
Replaces a running Breeze application's view runtime with exported state.
Returns rendered content, view metadata, and screen dimensions.
@spec start_from_state( Breeze.Runtime.State.t(), keyword() ) :: {:ok, t()} | {:error, term()}
Starts an isolated runtime from exported state.
@spec stop(t()) :: :ok
Stops an isolated runtime.