pub struct ParserSessionIdentity(/* private fields */);Expand description
Unpredictable identity of one supervised worker process session.
The supervisor derives this value from operating-system entropy before it launches the worker. Passing it to the trusted worker without grammar or source input and requiring it in READY plus every later request prevents stale process traffic from being replayed across sessions.
Implementations§
Source§impl ParserSessionIdentity
impl ParserSessionIdentity
Sourcepub const fn new(digest: ParserContentDigest) -> Self
pub const fn new(digest: ParserContentDigest) -> Self
Construct a session identity from a caller-authenticated digest.
Sourcepub fn for_entropy(entropy: &[u8]) -> Self
pub fn for_entropy(entropy: &[u8]) -> Self
Hash caller-provided session entropy into the canonical wire identity.
Sourcepub const fn digest(&self) -> &ParserContentDigest
pub const fn digest(&self) -> &ParserContentDigest
Borrow the canonical session digest.
Trait Implementations§
Source§impl Clone for ParserSessionIdentity
impl Clone for ParserSessionIdentity
Source§fn clone(&self) -> ParserSessionIdentity
fn clone(&self) -> ParserSessionIdentity
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParserSessionIdentity
impl Debug for ParserSessionIdentity
Source§impl<'de> Deserialize<'de> for ParserSessionIdentity
impl<'de> Deserialize<'de> for ParserSessionIdentity
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
Source§impl Hash for ParserSessionIdentity
impl Hash for ParserSessionIdentity
Source§impl PartialEq for ParserSessionIdentity
impl PartialEq for ParserSessionIdentity
Source§impl Serialize for ParserSessionIdentity
impl Serialize for ParserSessionIdentity
impl Eq for ParserSessionIdentity
impl StructuralPartialEq for ParserSessionIdentity
Auto Trait Implementations§
impl Freeze for ParserSessionIdentity
impl RefUnwindSafe for ParserSessionIdentity
impl Send for ParserSessionIdentity
impl Sync for ParserSessionIdentity
impl Unpin for ParserSessionIdentity
impl UnwindSafe for ParserSessionIdentity
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.