Struct async_ssh2_lite::session::AsyncSession
source · [−]pub struct AsyncSession<S> { /* private fields */ }
Implementations
sourceimpl<S> AsyncSession<S> where
S: AsRawFd + 'static,
impl<S> AsyncSession<S> where
S: AsRawFd + 'static,
sourceimpl<S> AsyncSession<S>
impl<S> AsyncSession<S>
sourceimpl<S> AsyncSession<S> where
S: AsyncSessionStream + Send + Sync + 'static,
impl<S> AsyncSession<S> where
S: AsyncSessionStream + Send + Sync + 'static,
pub async fn handshake(&mut self) -> Result<(), Error>
pub async fn userauth_password(
&self,
username: &str,
password: &str
) -> Result<(), Error>
pub async fn userauth_keyboard_interactive<P: KeyboardInteractivePrompt + Send>(
&self,
username: &str,
prompter: &mut P
) -> Result<(), Error>
pub async fn userauth_agent(&self, username: &str) -> Result<(), Error>
pub async fn userauth_pubkey_file(
&self,
username: &str,
pubkey: Option<&Path>,
privatekey: &Path,
passphrase: Option<&str>
) -> Result<(), Error>
pub async fn userauth_pubkey_memory(
&self,
username: &str,
pubkeydata: Option<&str>,
privatekeydata: &str,
passphrase: Option<&str>
) -> Result<(), Error>
pub async fn userauth_hostbased_file(
&self,
username: &str,
publickey: &Path,
privatekey: &Path,
passphrase: Option<&str>,
hostname: &str,
local_username: Option<&str>
) -> Result<(), Error>
pub fn authenticated(&self) -> bool
pub async fn auth_methods<'a>(
&'a self,
username: &'a str
) -> Result<&str, Error>
pub async fn method_pref(
&self,
method_type: MethodType,
prefs: &str
) -> Result<(), Error>
pub fn methods(&self, method_type: MethodType) -> Option<&str>
pub async fn supported_algs(
&self,
method_type: MethodType
) -> Result<Vec<&'static str>, Error>
pub fn agent(&self) -> Result<AsyncAgent<S>, Error>
pub fn known_hosts(&self) -> Result<KnownHosts, Error>
pub async fn channel_session(&self) -> Result<AsyncChannel<S>, Error>
pub async fn channel_direct_tcpip(
&self,
host: &str,
port: u16,
src: Option<(&str, u16)>
) -> Result<AsyncChannel<S>, Error>
pub async fn channel_forward_listen(
&self,
remote_port: u16,
host: Option<&str>,
queue_maxsize: Option<u32>
) -> Result<(AsyncListener<S>, u16), Error>
pub async fn scp_recv(
&self,
path: &Path
) -> Result<(AsyncChannel<S>, ScpFileStat), Error>
pub async fn scp_send(
&self,
remote_path: &Path,
mode: i32,
size: u64,
times: Option<(u64, u64)>
) -> Result<AsyncChannel<S>, Error>
pub async fn sftp(&self) -> Result<AsyncSftp<S>, Error>
pub async fn channel_open(
&self,
channel_type: &str,
window_size: u32,
packet_size: u32,
message: Option<&str>
) -> Result<AsyncChannel<S>, Error>
pub fn host_key(&self) -> Option<(&[u8], HostKeyType)>
pub fn host_key_hash(&self, hash: HashType) -> Option<&[u8]>
pub async fn keepalive_send(&self) -> Result<u32, Error>
pub async fn disconnect(
&self,
reason: Option<DisconnectCode>,
description: &str,
lang: Option<&str>
) -> Result<(), Error>
pub fn block_directions(&self) -> BlockDirections
sourceimpl<S> AsyncSession<S> where
S: AsyncSessionStream + Send + Sync + 'static,
impl<S> AsyncSession<S> where
S: AsyncSessionStream + Send + Sync + 'static,
pub fn last_error(&self) -> Option<Ssh2Error>
pub async fn userauth_agent_with_try_next(
&self,
username: &str
) -> Result<(), Error>
pub async fn userauth_agent_with_try_next_with_callback<CB>(
&self,
username: &str,
cb: CB
) -> Result<(), Error> where
CB: FnMut(Vec<PublicKey>) -> Vec<PublicKey>,
Trait Implementations
sourceimpl<S> Clone for AsyncSession<S>
impl<S> Clone for AsyncSession<S>
Auto Trait Implementations
impl<S> !RefUnwindSafe for AsyncSession<S>
impl<S> Send for AsyncSession<S> where
S: Send + Sync,
impl<S> Sync for AsyncSession<S> where
S: Send + Sync,
impl<S> Unpin for AsyncSession<S>
impl<S> !UnwindSafe for AsyncSession<S>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more