pub enum HandshakeRole {
Initiator(Box<Initiator>),
Responder(Box<Responder>),
}Expand description
Represents the role in the Noise handshake process, either as an initiator or a responder.
The Noise protocol requires two roles during the handshake process:
- Initiator: The party that starts the handshake by sending the initial message.
- Responder: The party that waits for the initiator’s message and responds to it.
This enum distinguishes between these two roles, allowing the codec to handle the handshake process accordingly.
Variants§
Initiator(Box<Initiator>)
The initiator role in the Noise handshake process.
The initiator starts the handshake by sending the initial message. This variant stores an
Initiator object, which contains the necessary state and cryptographic materials for the
initiator’s part in the Noise handshake.
Responder(Box<Responder>)
The responder role in the Noise handshake process.
The responder waits for the initiator’s handshake message and then responds. This variant
stores a Responder object, which contains the necessary state and cryptographic materials
for the responder’s part in the Noise handshake.
Trait Implementations§
Source§impl Clone for HandshakeRole
impl Clone for HandshakeRole
Source§fn clone(&self) -> HandshakeRole
fn clone(&self) -> HandshakeRole
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more