pub enum KeyCache {
Disabled,
Shared(Arc<Mutex<LruCache<PublicKey, ()>>>),
}Expand description
A cache for public keys.
This is used solely to make parsing public keys from byte slices more efficient for the very common case where a large number of identical keys are being parsed, like in the relay server.
The cache stores only successful parse results.
Variants§
Disabled
The key cache is disabled.
The key cache is enabled with a fixed capacity. It is shared between multiple threads.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KeyCache
impl RefUnwindSafe for KeyCache
impl Send for KeyCache
impl Sync for KeyCache
impl Unpin for KeyCache
impl UnsafeUnpin for KeyCache
impl UnwindSafe for KeyCache
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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