pub enum Role {
Initiator,
Responder,
}Expand description
Which end of a session a device is.
Both ends derive the same key, but each tags its outgoing messages with a different direction byte in the nonce, so the two directions never share a nonce under the one key and a message a device sends can never be opened as one it expected to receive.
Variants§
Initiator
The device that opens the session. Its public key is ordered first when the key is derived, and it tags the messages it sends as the initiator direction.
Responder
The device that answers. Its public key is ordered second, and it tags the messages it sends as the responder direction.
Trait Implementations§
impl Copy for Role
impl Eq for Role
impl StructuralPartialEq for Role
Auto Trait Implementations§
impl Freeze for Role
impl RefUnwindSafe for Role
impl Send for Role
impl Sync for Role
impl Unpin for Role
impl UnsafeUnpin for Role
impl UnwindSafe for Role
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