pub struct LiveSession {
pub definition: DefinitionId,
pub durability: Durability,
pub session: TearSession,
}Expand description
A running session incarnation: the shipped TearSession runtime
state plus the typed link back to the DefinitionId it was
instantiated from, plus its Durability marker.
LiveSession is a graceful extension of TearSession — it embeds
it as-is rather than re-modelling windows/panes — and adds exactly the
two facts the pressure-test found missing: which definition this live
session realizes (illegal state #1/#5 — the typed live→definition
link, so a stale handle isn’t conflated with a durable identity), and
that it is process-bound (illegal state #6).
Fields§
§definition: DefinitionIdThe definition this incarnation was instantiated from. A restart
re-instantiates THIS definition under a new InstanceId; the
link is how the daemon knows which definition a live session
realizes (and how 1 definition → N live instances is tracked, in
praça’s InstanceRegistry).
durability: DurabilityDurability marker — always Durability::ProcessBound; there is
no restart-surviving value to set it to.
session: TearSessionThe runtime session state (windows, panes, live layout, scrollback-bearing pane ids). Embedded as-is.
Implementations§
Source§impl LiveSession
impl LiveSession
Sourcepub fn new(definition: DefinitionId, session: TearSession) -> Self
pub fn new(definition: DefinitionId, session: TearSession) -> Self
Construct a live session from a freshly-spawned TearSession and
the definition it realizes. Always Durability::ProcessBound.
Sourcepub fn instance(&self) -> InstanceId
pub fn instance(&self) -> InstanceId
This incarnation’s spawn-unique handle — the embedded session’s id,
not a stored duplicate (no drift between two id fields). Typed as
InstanceId to document that it is the LIVE handle, distinct
from self.definition.
Trait Implementations§
Source§impl Clone for LiveSession
impl Clone for LiveSession
Source§fn clone(&self) -> LiveSession
fn clone(&self) -> LiveSession
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more