Struct SshClient

Source
pub struct SshClient { /* private fields */ }

Trait Implementations§

Source§

impl Handler for SshClient

Source§

type Error = Error

Source§

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>>

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

Convert a bool to Self::FutureBool. This is used to produce the default handlers.
Source§

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

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

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

Called when the server sends EOF to a channel.
Source§

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

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

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 auth_banner(self, banner: &str, session: Session) -> Self::FutureUnit

Called when the server sends us an authentication banner. This is usually meant to be shown to the user, see RFC4252 for more details. Read more
Source§

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

Called when the server signals success.
Source§

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

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

Called when a new channel is created.
Source§

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

The remote process exited upon receiving a signal.
Source§

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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,