pub fn transition(
from: HandshakeState,
to: HandshakeState,
) -> Result<HandshakeState, CryptoError>Expand description
Advance from to to only when to is the immediate successor.
Forbidden: skip, reverse, stay, Idle → Traffic, or any → Traffic before Finished.
Skip-to-traffic / 0-RTT attempts map to CryptoError::Downgrade. Reverse maps to
CryptoError::Unauthorized. Other illegal steps map to CryptoError::Malformed.