@@ -22,22 +22,22 @@ use stream::{SftpReadStream, SftpWriteStream};
2222// -- Ssh key storage
2323
2424/// This trait must be implemented in order to use ssh keys for authentication for sftp/scp.
25- pub trait SshKeyStorage {
25+ pub trait SshKeyStorage : Send + Sync {
2626 /// Return RSA key path from host and username
2727 fn resolve ( & self , host : & str , username : & str ) -> Option < PathBuf > ;
2828}
2929
3030// -- key method
3131
3232/// Ssh key method.
33- /// Defined by `MethodType` (see ssh2 docs) and the list of supported algorithms.
33+ /// Defined by [ `MethodType`] (see ssh2 docs) and the list of supported algorithms.
3434pub struct KeyMethod {
3535 pub ( crate ) method_type : MethodType ,
3636 algos : Vec < String > ,
3737}
3838
3939impl KeyMethod {
40- /// Instantiates a new `KeyMethod`
40+ /// Instantiates a new [ `KeyMethod`]
4141 pub fn new ( method_type : MethodType , algos : & [ String ] ) -> Self {
4242 Self {
4343 method_type,
@@ -77,7 +77,7 @@ impl From<&[u8]> for SshAgentIdentity {
7777impl SshAgentIdentity {
7878 /// Check if the provided public key matches the identity
7979 ///
80- /// If ` All` is provided, this method will always return `true`
80+ /// If [`SshAgentIdentity:: All`] is provided, this method will always return `true`
8181 pub ( crate ) fn pubkey_matches ( & self , blob : & [ u8 ] ) -> bool {
8282 match self {
8383 SshAgentIdentity :: All => true ,
@@ -94,7 +94,7 @@ impl SshAgentIdentity {
9494/// You may specify some options that can be in conflict (e.g. `port` and `Port` parameter in ssh configuration).
9595/// In these cases, the resolution is performed in this order (from highest, to lower priority):
9696///
97- /// 1. SshOpts attribute (e.g. `port` or `username`)
97+ /// 1. [` SshOpts`] attribute (e.g. `port` or `username`)
9898/// 2. Ssh configuration
9999///
100100/// This applies also to ciphers and key exchange methods.
@@ -123,7 +123,7 @@ pub struct SshOpts {
123123}
124124
125125impl SshOpts {
126- /// Initialize SshOpts.
126+ /// Initialize [` SshOpts`] .
127127 /// You must define the host you want to connect to.
128128 /// Host may be resolved by ssh configuration, if specified.
129129 ///
0 commit comments