pub struct SshClient { /* private fields */ }
Trait Implementations§
Source§impl Handler for SshClient
impl Handler for SshClient
type Error = Error
Source§type FutureBool = Ready<Result<(SshClient, bool), Error>>
type FutureBool = Ready<Result<(SshClient, bool), Error>>
A future ultimately resolving into a boolean, which can be
returned by some parts of this handler.
Source§type FutureUnit = Pin<Box<dyn Future<Output = Result<(SshClient, Session), Error>> + Send>>
type FutureUnit = Pin<Box<dyn Future<Output = Result<(SshClient, Session), Error>> + Send>>
A future ultimately resolving into unit, which can be
returned by some parts of this handler.
Source§fn finished_bool(self, b: bool) -> Self::FutureBool
fn finished_bool(self, b: bool) -> Self::FutureBool
Convert a
bool
to Self::FutureBool
. This is used to
produce the default handlers.Source§fn finished(self, session: Session) -> Self::FutureUnit
fn finished(self, session: Session) -> Self::FutureUnit
Produce a
Self::FutureUnit
. This is used to produce the
default handlers.Source§fn check_server_key(self, server_public_key: &PublicKey) -> Self::FutureBool
fn check_server_key(self, server_public_key: &PublicKey) -> Self::FutureBool
Called to check the server’s public key. This is a very important
step to help prevent man-in-the-middle attacks. The default
implementation rejects all keys.
Source§fn adjust_window(&mut self, _channel: ChannelId, target: u32) -> u32
fn adjust_window(&mut self, _channel: ChannelId, target: u32) -> u32
Called when this client adjusts the network window. Return the
next target window and maximum packet size.
Source§fn channel_eof(self, _channel: ChannelId, session: Session) -> Self::FutureUnit
fn channel_eof(self, _channel: ChannelId, session: Session) -> Self::FutureUnit
Called when the server sends EOF to a channel.
Source§fn exit_status(
self,
channel: ChannelId,
exit_status: u32,
session: Session,
) -> Self::FutureUnit
fn exit_status( self, channel: ChannelId, exit_status: u32, session: Session, ) -> Self::FutureUnit
The remote process has exited, with the given exit status.
Source§fn extended_data(
self,
channel: ChannelId,
ext: u32,
data: &[u8],
session: Session,
) -> Self::FutureUnit
fn extended_data( self, channel: ChannelId, ext: u32, data: &[u8], session: Session, ) -> Self::FutureUnit
Called when the server sends us data. The
extended_code
parameter is a stream identifier, None
is usually the
standard output, and Some(1)
is the standard error. See
RFC4254.Source§fn data(
self,
channel: ChannelId,
data: &[u8],
session: Session,
) -> Self::FutureUnit
fn data( self, channel: ChannelId, data: &[u8], session: Session, ) -> Self::FutureUnit
Called when the server sends us data. The
extended_code
parameter is a stream identifier, None
is usually the
standard output, and Some(1)
is the standard error. See
RFC4254.Source§fn channel_open_confirmation(
self,
id: ChannelId,
max_packet_size: u32,
window_size: u32,
session: Session,
) -> Self::FutureUnit
fn channel_open_confirmation( self, id: ChannelId, max_packet_size: u32, window_size: u32, session: Session, ) -> Self::FutureUnit
Called when the server confirmed our request to open a
channel. A channel can only be written to after receiving this
message (this library panics otherwise).
Source§fn channel_success(
self,
channel: ChannelId,
session: Session,
) -> Self::FutureUnit
fn channel_success( self, channel: ChannelId, session: Session, ) -> Self::FutureUnit
Called when the server signals success.
Source§fn channel_close(self, channel: ChannelId, session: Session) -> Self::FutureUnit
fn channel_close(self, channel: ChannelId, session: Session) -> Self::FutureUnit
Called when the server closes a channel.
Source§fn channel_open_failure(
self,
channel: ChannelId,
reason: ChannelOpenFailure,
description: &str,
language: &str,
session: Session,
) -> Self::FutureUnit
fn channel_open_failure( self, channel: ChannelId, reason: ChannelOpenFailure, description: &str, language: &str, session: Session, ) -> Self::FutureUnit
Called when the server rejected our request to open a channel.
Source§fn channel_open_forwarded_tcpip(
self,
channel: ChannelId,
connected_address: &str,
connected_port: u32,
originator_address: &str,
originator_port: u32,
session: Session,
) -> Self::FutureUnit
fn channel_open_forwarded_tcpip( self, channel: ChannelId, connected_address: &str, connected_port: u32, originator_address: &str, originator_port: u32, session: Session, ) -> Self::FutureUnit
Called when a new channel is created.
Source§fn xon_xoff(
self,
channel: ChannelId,
client_can_do: bool,
session: Session,
) -> Self::FutureUnit
fn xon_xoff( self, channel: ChannelId, client_can_do: bool, session: Session, ) -> Self::FutureUnit
The server informs this client of whether the client may
perform control-S/control-Q flow control. See
RFC4254.
Source§fn exit_signal(
self,
channel: ChannelId,
signal_name: Sig,
core_dumped: bool,
error_message: &str,
lang_tag: &str,
session: Session,
) -> Self::FutureUnit
fn exit_signal( self, channel: ChannelId, signal_name: Sig, core_dumped: bool, error_message: &str, lang_tag: &str, session: Session, ) -> Self::FutureUnit
The remote process exited upon receiving a signal.
Source§fn window_adjusted(
self,
channel: ChannelId,
new_size: u32,
session: Session,
) -> Self::FutureUnit
fn window_adjusted( self, channel: ChannelId, new_size: u32, session: Session, ) -> Self::FutureUnit
Called when the network window is adjusted, meaning that we
can send more bytes. This is useful if this client wants to
send huge amounts of data, for instance if we have called
Session::data
before, and it returned less than the
full amount of data.Auto Trait Implementations§
impl Freeze for SshClient
impl !RefUnwindSafe for SshClient
impl Send for SshClient
impl Sync for SshClient
impl Unpin for SshClient
impl !UnwindSafe for SshClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more