MingaEditor.Shell.StateStash (Minga v0.1.0)

Copy Markdown View Source

Stashed shell state tied to the exact shell registry identity that produced it.

Shell state is only safe to restore into the same registered shell module and source. Extension shell ids can be unregistered and later reused, so the registry generation is part of the identity as well.

Summary

Functions

Returns true when the stash belongs to the current registry entry.

Stores shell state with the registry identity that produced it.

Types

t()

@type t() :: %MingaEditor.Shell.StateStash{
  generation: non_neg_integer(),
  module: module(),
  source: MingaEditor.Shell.Entry.source(),
  state: MingaEditor.Shell.shell_state()
}

Functions

matches?(stash, entry)

@spec matches?(t(), MingaEditor.Shell.Entry.t()) :: boolean()

Returns true when the stash belongs to the current registry entry.

new(entry, state)

Stores shell state with the registry identity that produced it.