pub struct DefinitionId(pub u64);Expand description
Stable identity of a session definition — the durable, project-stable identity of a latent shape.
Unlike InstanceId (a spawn-unique daemon handle that changes
every restart), a DefinitionId is the SAME across daemon
restarts and across hosts: its inner u64 IS the
ishou_tokens stable_seed of the project root — the very seed
praça’s name derivation uses — so a definition keeps its
identity, and therefore its display name, forever.
The whole point of the type is that a fn taking a
DefinitionId cannot be handed an InstanceId: confusing the
durable identity of a definition with the ephemeral handle of a
running instance is a compile error (E0308), not a runtime mix-up.
Tuple Fields§
§0: u64Implementations§
Source§impl DefinitionId
impl DefinitionId
Source§impl DefinitionId
impl DefinitionId
Sourcepub fn from_project(root: &Path) -> Self
pub fn from_project(root: &Path) -> Self
The definition id for a project root. Equal to the project’s
name_seed by construction — inner == stable_seed(root), the
exact derivation praça’s SessionRecord uses — so
a definition’s identity and its display name share one seed and
migration from the old records is lossless.
Trait Implementations§
Source§impl Clone for DefinitionId
impl Clone for DefinitionId
Source§fn clone(&self) -> DefinitionId
fn clone(&self) -> DefinitionId
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more