pub struct Handshake {
pub version: u32,
pub is_reattach: bool,
pub session_id: Option<String>,
pub session_token: Option<String>,
}Expand description
Handshake message for initial connection
Fields§
§version: u32Protocol version
is_reattach: boolWhether this is a new session or reattach
session_id: Option<String>Session ID (for reattach)
session_token: Option<String>Session token for authentication (required for reattach) This is a cryptographically random 64-character hex string
Implementations§
Source§impl Handshake
impl Handshake
Sourcepub const PROTOCOL_VERSION: u32 = 2
pub const PROTOCOL_VERSION: u32 = 2
Current protocol version - bumped to 2 for session token support
Sourcepub fn new_session() -> Self
pub fn new_session() -> Self
Create a new session handshake
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Handshake
impl<'de> Deserialize<'de> for Handshake
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 Handshake
impl RefUnwindSafe for Handshake
impl Send for Handshake
impl Sync for Handshake
impl Unpin for Handshake
impl UnsafeUnpin for Handshake
impl UnwindSafe for Handshake
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