1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
use std::{borrow::Cow, path::Path};
#[derive(Clone, Debug, PartialEq)]
pub struct JumpHostAuthParams<'auth> {
pub user_name: Cow<'auth, str>,
pub private_key: Cow<'auth, Path>,
pub passphrase: Option<Cow<'auth, str>>,
}
impl<'auth> JumpHostAuthParams<'auth> {
pub fn new(user_name: Cow<'auth, str>, private_key: Cow<'auth, Path>) -> Self {
Self {
user_name,
private_key,
passphrase: None,
}
}
pub fn with_passphrase(mut self, passphrase: Cow<'auth, str>) -> Self {
self.passphrase = Some(passphrase);
self
}
}