pub struct RuntimeSessionId(/* private fields */);Expand description
Checked, nonzero identity for one browser-runtime start.
Callers must generate a fresh, unpredictable value for every process start. This type rejects the all-zero sentinel, but uniqueness and unpredictability remain caller responsibilities.
Implementations§
Source§impl RuntimeSessionId
impl RuntimeSessionId
Sourcepub const fn new(bytes: [u8; 16]) -> Result<RuntimeSessionId, RuntimeError>
pub const fn new(bytes: [u8; 16]) -> Result<RuntimeSessionId, RuntimeError>
Construct a checked runtime session identity.
§Errors
Returns RuntimeError::ZeroSession for the all-zero sentinel.
Sourcepub const fn into_bytes(self) -> [u8; 16]
pub const fn into_bytes(self) -> [u8; 16]
Return the exact opaque session bytes.
Trait Implementations§
Source§impl Clone for RuntimeSessionId
impl Clone for RuntimeSessionId
Source§fn clone(&self) -> RuntimeSessionId
fn clone(&self) -> RuntimeSessionId
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RuntimeSessionId
Source§impl Debug for RuntimeSessionId
impl Debug for RuntimeSessionId
impl Eq for RuntimeSessionId
Source§impl Hash for RuntimeSessionId
impl Hash for RuntimeSessionId
Source§impl PartialEq for RuntimeSessionId
impl PartialEq for RuntimeSessionId
impl StructuralPartialEq for RuntimeSessionId
Auto Trait Implementations§
impl Freeze for RuntimeSessionId
impl RefUnwindSafe for RuntimeSessionId
impl Send for RuntimeSessionId
impl Sync for RuntimeSessionId
impl Unpin for RuntimeSessionId
impl UnsafeUnpin for RuntimeSessionId
impl UnwindSafe for RuntimeSessionId
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.