Trait hyper_static_server::rustls::StoresClientSessions[]

pub trait StoresClientSessions: Send + Sync {
    pub fn put(&self, key: Vec<u8, Global>, value: Vec<u8, Global>) -> bool;
pub fn get(&self, key: &[u8]) -> Option<Vec<u8, Global>>; }

A trait for the ability to store client session data. The keys and values are opaque.

Both the keys and values should be treated as highly sensitive data, containing enough key material to break all security of the corresponding session.

put is a mutating operation; this isn't expressed in the type system to allow implementations freedom in how to achieve interior mutability. Mutex is a common choice.

Required methods

pub fn put(&self, key: Vec<u8, Global>, value: Vec<u8, Global>) -> bool

Stores a new value for key. Returns true if the value was stored.

pub fn get(&self, key: &[u8]) -> Option<Vec<u8, Global>>

Returns the latest value for key. Returns None if there's no such value.

Loading content...

Implementors

impl StoresClientSessions for ClientSessionMemoryCache

impl StoresClientSessions for NoClientSessionStorage

Loading content...