Struct tendermint_p2p::secret_connection::Handshake
source · pub struct Handshake<S> { /* private fields */ }
Expand description
Handshake is a process of establishing the SecretConnection
between two peers.
Specification
Implementations§
source§impl Handshake<AwaitingEphKey>
impl Handshake<AwaitingEphKey>
sourcepub fn new(
local_privkey: SigningKey,
protocol_version: Version,
) -> (Self, EphemeralPublic)
pub fn new( local_privkey: SigningKey, protocol_version: Version, ) -> (Self, EphemeralPublic)
Initiate a handshake.
sourcepub fn got_key(
&mut self,
remote_eph_pubkey: EphemeralPublic,
) -> Result<Handshake<AwaitingAuthSig>, Error>
pub fn got_key( &mut self, remote_eph_pubkey: EphemeralPublic, ) -> Result<Handshake<AwaitingAuthSig>, Error>
source§impl Handshake<AwaitingAuthSig>
impl Handshake<AwaitingAuthSig>
sourcepub fn got_signature(
&self,
auth_sig_msg: AuthSigMessage,
) -> Result<PublicKey, Error>
pub fn got_signature( &self, auth_sig_msg: AuthSigMessage, ) -> Result<PublicKey, Error>
Auto Trait Implementations§
impl<S> Freeze for Handshake<S>where
S: Freeze,
impl<S> RefUnwindSafe for Handshake<S>where
S: RefUnwindSafe,
impl<S> Send for Handshake<S>where
S: Send,
impl<S> Sync for Handshake<S>where
S: Sync,
impl<S> Unpin for Handshake<S>where
S: Unpin,
impl<S> UnwindSafe for Handshake<S>where
S: 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