#[repr(transparent)]pub struct SessionId(pub [u8; 16]);Expand description
Identifies one client session.
Session IDs are allocated by the server at session open (128 bits, drawn from a CSPRNG by the allocating service; this crate is dependency-frozen and deliberately does not mint them). The all-zero value is reserved.
Canonical text form: strict lowercase hexadecimal, 32 characters.
Tuple Fields§
§0: [u8; 16]Implementations§
Trait Implementations§
impl Copy for SessionId
Source§impl<'de> Deserialize<'de> for SessionId
impl<'de> Deserialize<'de> for SessionId
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SessionId
Source§impl FromStr for SessionId
impl FromStr for SessionId
Source§fn from_str(text: &str) -> Result<Self, Self::Err>
fn from_str(text: &str) -> Result<Self, Self::Err>
Parses the canonical 32-character hex form. Lenient by contract, like
the mongreldb-types identifiers: hyphens are ignored at any position
(so the hyphenated UUID form 8-4-4-4-12 parses) and uppercase hex
digits are accepted.
Source§type Err = SessionIdParseError
type Err = SessionIdParseError
The associated error which can be returned from parsing.
Source§impl Ord for SessionId
impl Ord for SessionId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for SessionId
impl PartialOrd 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