russh_sftp/protocol/
init.rs

1use std::collections::HashMap;
2
3use super::{impl_packet_for, Packet, VERSION};
4
5/// Implementation for `SSH_FXP_INIT`
6#[derive(Debug, Serialize, Deserialize)]
7pub struct Init {
8    pub version: u32,
9    pub extensions: HashMap<String, String>,
10}
11
12impl_packet_for!(Init);
13
14impl Init {
15    pub fn new() -> Self {
16        Self {
17            version: VERSION,
18            extensions: HashMap::new(),
19        }
20    }
21}
22
23impl Default for Init {
24    fn default() -> Self {
25        Self::new()
26    }
27}