pub struct HandshakeAck {
pub success: bool,
pub server_version: String,
pub server_nonce: [u8; 32],
pub server_proof: [u8; 32],
pub reason: Option<String>,
}Expand description
Server response to a Handshake message.
Contains its own nonce and proof so the client can mutually authenticate the server (prevents impersonation).
Fields§
§success: boolWhether authentication succeeded.
server_version: StringServer version string (informational).
server_nonce: [u8; 32]32-byte server nonce for mutual authentication.
server_proof: [u8; 32]HMAC-SHA256(client_nonce || server_nonce || “pwr-auth-v1”, PSK).
reason: Option<String>Human-readable reason if success is false.
Trait Implementations§
Source§impl Clone for HandshakeAck
impl Clone for HandshakeAck
Source§fn clone(&self) -> HandshakeAck
fn clone(&self) -> HandshakeAck
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HandshakeAck
impl Debug for HandshakeAck
Source§impl<'de> Deserialize<'de> for HandshakeAck
impl<'de> Deserialize<'de> for HandshakeAck
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for HandshakeAck
impl RefUnwindSafe for HandshakeAck
impl Send for HandshakeAck
impl Sync for HandshakeAck
impl Unpin for HandshakeAck
impl UnsafeUnpin for HandshakeAck
impl UnwindSafe for HandshakeAck
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