pub enum KeyChange {
Handshake {
keys: Keys,
},
OneRtt {
keys: Keys,
next: Secrets,
},
}展开描述
Key material 用于 use in QUIC packet spaces
QUIC uses 4 different sets of keys (并 progressive key updates 用于 long-running connections):
- Initial: these can be created from
Keys::initial() - 0-RTT keys: can be retrieved from
ConnectionCommon::zero_rtt_keys() - Handshake: these are returned from
ConnectionCommon::write_hs()afterClientHelloandServerHellomessages have been exchanged - 1-RTT keys: these are returned from
ConnectionCommon::write_hs()after the handshake is done
Once the 1-RTT keys have been exchanged, either side may initiate 一个 key update. Progressive
update keys can be obtained 从 the Secrets returned in KeyChange::OneRtt。 Note that
only packet keys are updated by key updates; header protection keys remain the same.
变体§
Handshake
Keys 用于 the handshake space
OneRtt
Keys 用于 1-RTT data
自动 Trait 实现§
impl Freeze for KeyChange
impl !RefUnwindSafe for KeyChange
impl Send for KeyChange
impl Sync for KeyChange
impl Unpin for KeyChange
impl UnsafeUnpin for KeyChange
impl !UnwindSafe for KeyChange
Blanket 实现§
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 从 an owned value. 更多信息