Struct ClientSessionMemoryCache
pub struct ClientSessionMemoryCache { /* private fields */ }Available on crate feature
tls only.Expand description
An implementer of ClientSessionStore that stores everything
in memory.
It enforces a limit on the number of entries to bound memory usage.
Implementations§
§impl ClientSessionMemoryCache
impl ClientSessionMemoryCache
pub fn new(size: usize) -> ClientSessionMemoryCache
Available on crate feature std only.
pub fn new(size: usize) -> ClientSessionMemoryCache
std only.Make a new ClientSessionMemoryCache. size is the
maximum number of stored sessions.
Trait Implementations§
§impl ClientSessionStore for ClientSessionMemoryCache
impl ClientSessionStore for ClientSessionMemoryCache
§fn set_kx_hint(&self, server_name: ServerName<'static>, group: NamedGroup)
fn set_kx_hint(&self, server_name: ServerName<'static>, group: NamedGroup)
Remember what
NamedGroup the given server chose.§fn kx_hint(&self, server_name: &ServerName<'_>) -> Option<NamedGroup>
fn kx_hint(&self, server_name: &ServerName<'_>) -> Option<NamedGroup>
This should return the value most recently passed to
set_kx_hint
for the given server_name. Read more§fn set_tls12_session(
&self,
_server_name: ServerName<'static>,
_value: Tls12ClientSessionValue,
)
fn set_tls12_session( &self, _server_name: ServerName<'static>, _value: Tls12ClientSessionValue, )
Remember a TLS1.2 session. Read more
§fn tls12_session(
&self,
_server_name: &ServerName<'_>,
) -> Option<Tls12ClientSessionValue>
fn tls12_session( &self, _server_name: &ServerName<'_>, ) -> Option<Tls12ClientSessionValue>
Get the most recently saved TLS1.2 session for
server_name provided to set_tls12_session.§fn remove_tls12_session(&self, _server_name: &ServerName<'static>)
fn remove_tls12_session(&self, _server_name: &ServerName<'static>)
Remove and forget any saved TLS1.2 session for
server_name.§fn insert_tls13_ticket(
&self,
server_name: ServerName<'static>,
value: Tls13ClientSessionValue,
)
fn insert_tls13_ticket( &self, server_name: ServerName<'static>, value: Tls13ClientSessionValue, )
Remember a TLS1.3 ticket that might be retrieved later from
take_tls13_ticket, allowing
resumption of this session. Read more§fn take_tls13_ticket(
&self,
server_name: &ServerName<'static>,
) -> Option<Tls13ClientSessionValue>
fn take_tls13_ticket( &self, server_name: &ServerName<'static>, ) -> Option<Tls13ClientSessionValue>
Return a TLS1.3 ticket previously provided to
add_tls13_ticket. Read moreAuto Trait Implementations§
impl !Freeze for ClientSessionMemoryCache
impl RefUnwindSafe for ClientSessionMemoryCache
impl Send for ClientSessionMemoryCache
impl Sync for ClientSessionMemoryCache
impl Unpin for ClientSessionMemoryCache
impl UnwindSafe for ClientSessionMemoryCache
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more