docs: handshake documentation

This commit is contained in:
Jindřich Moravec 2023-12-31 18:45:50 +01:00
parent eb8410718d
commit c61b6021db
5 changed files with 28 additions and 3 deletions

View file

@ -11,7 +11,7 @@ pub struct HandshakeResponse {
impl HandshakeResponse {
pub fn new(name: &str, pid: i32, key: i32) -> Self {
Self {
version: format!("16.0 ({name})", name = name),
version: format!("16.0 ({name})"),
process_id: pid,
secret_key: key,
}
@ -37,6 +37,7 @@ impl TryFrom<&[BackendMessage]> for HandshakeResponse {
process_id = Some(data.process);
secret_key = Some(data.secret);
}
// Different messages are ignored during the handshake
_ => {}
}
}