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<Self>
pub const fn from_opaque(value: u64) -> Option<Self>
Recover an opaque session identity previously returned by Self::opaque.
Zero is reserved and never identifies a live opened root.
Trait Implementations§
impl Copy for SessionId
impl Eq for SessionId
impl StructuralPartialEq for SessionId
Auto Trait Implementations§
impl Freeze for SessionId
impl RefUnwindSafe for SessionId
impl Send for SessionId
impl Sync for SessionId
impl Unpin for SessionId
impl UnsafeUnpin for SessionId
impl UnwindSafe for SessionId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more