pub struct Key<K> { /* private fields */ }Implementations§
Source§impl<K: OneRttKey> Key<K>
impl<K: OneRttKey> Key<K>
pub fn new(key: K) -> Self
Sourcepub fn needs_update(&self, limits: &Limits) -> bool
pub fn needs_update(&self, limits: &Limits) -> bool
If the key is within the update window, an update should be initiated.
pub fn derive_next_key(&self) -> K
pub fn encrypted_packets(&self) -> u64
pub fn on_packet_encryption(&mut self)
pub fn on_packet_decryption(&mut self)
pub fn key_mut(&mut self) -> &mut K
Auto Trait Implementations§
impl<K> Freeze for Key<K>where
K: Freeze,
impl<K> RefUnwindSafe for Key<K>where
K: RefUnwindSafe,
impl<K> Send for Key<K>where
K: Send,
impl<K> Sync for Key<K>where
K: Sync,
impl<K> Unpin for Key<K>where
K: Unpin,
impl<K> UnwindSafe for Key<K>where
K: UnwindSafe,
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