pub struct StateKey(/* private fields */);Expand description
The key a server seals requestState under.
Thirty-two bytes, the HMAC-SHA256 block-size recommendation’s lower bound, supplied by the caller rather than generated here: this layer may not draw from a random source itself. The transports fill one from the OS CSPRNG when the server was built without one.
Implementations§
Source§impl StateKey
impl StateKey
Sourcepub const fn from_bytes(bytes: [u8; 32]) -> Self
pub const fn from_bytes(bytes: [u8; 32]) -> Self
A key from raw bytes.
For a deployment running several replicas behind one endpoint, every replica must be given the same key, or a retry routed to a different replica will find its state refused as tampered.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StateKey
impl RefUnwindSafe for StateKey
impl Send for StateKey
impl Sync for StateKey
impl Unpin for StateKey
impl UnsafeUnpin for StateKey
impl UnwindSafe for StateKey
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