pub struct SessionId(/* private fields */);Expand description
Opaque identity of one opened-root lifetime.
This process-local value prevents a cursor or expected version from one open from being accepted by another whose sequence happens to match. It is not a credential and is never persisted.
Implementations§
Source§impl SessionId
impl SessionId
Sourcepub const fn opaque(self) -> u64
pub const fn opaque(self) -> u64
Return the process-local opaque value for a language or wire adapter.
This value is an identity, not a credential. Consumers should preserve it exactly and must not infer ordering or lifetime from it.
Sourcepub const fn from_opaque(value: u64) -> Option<SessionId>
pub const fn from_opaque(value: u64) -> Option<SessionId>
Recover an opaque session identity previously returned by Self::opaque.
Zero is reserved and never identifies a live opened root.
impl SessionId
Identity of one live opened-root lifetime.
The value is process-local, opaque, and never persisted. It prevents a future cursor or continuation from being accepted by another open whose sequence also began at zero; it is not a credential.