Struct thrussh::client::Session

source ·
pub struct Session { /* private fields */ }

Implementations§

source§

impl Session

source

pub fn channel_open_session(&mut self) -> Result<ChannelId, Error>

source

pub fn channel_open_x11( &mut self, originator_address: &str, originator_port: u32 ) -> Result<ChannelId, Error>

source

pub fn channel_open_direct_tcpip( &mut self, host_to_connect: &str, port_to_connect: u32, originator_address: &str, originator_port: u32 ) -> Result<ChannelId, Error>

source

pub fn request_pty( &mut self, channel: ChannelId, want_reply: bool, term: &str, col_width: u32, row_height: u32, pix_width: u32, pix_height: u32, terminal_modes: &[(Pty, u32)] )

source

pub fn request_x11( &mut self, channel: ChannelId, want_reply: bool, single_connection: bool, x11_authentication_protocol: &str, x11_authentication_cookie: &str, x11_screen_number: u32 )

source

pub fn set_env( &mut self, channel: ChannelId, want_reply: bool, variable_name: &str, variable_value: &str )

source

pub fn request_shell(&mut self, want_reply: bool, channel: ChannelId)

source

pub fn exec(&mut self, channel: ChannelId, want_reply: bool, command: &str)

source

pub fn signal(&mut self, channel: ChannelId, signal: Sig)

source

pub fn request_subsystem( &mut self, want_reply: bool, channel: ChannelId, name: &str )

source

pub fn window_change( &mut self, channel: ChannelId, col_width: u32, row_height: u32, pix_width: u32, pix_height: u32 )

source

pub fn tcpip_forward(&mut self, want_reply: bool, address: &str, port: u32)

source

pub fn cancel_tcpip_forward( &mut self, want_reply: bool, address: &str, port: u32 )

source

pub fn data(&mut self, channel: ChannelId, data: CryptoVec)

source

pub fn eof(&mut self, channel: ChannelId)

source

pub fn extended_data(&mut self, channel: ChannelId, ext: u32, data: CryptoVec)

source

pub fn disconnect( &mut self, reason: Disconnect, description: &str, language_tag: &str )

source

pub fn has_pending_data(&self, channel: ChannelId) -> bool

source

pub fn sender_window_size(&self, channel: ChannelId) -> usize

source§

impl Session

source

pub fn send_channel_msg(&self, channel: ChannelId, msg: ChannelMsg) -> bool

Send a ChannelMsg from the background handler to the client.

Trait Implementations§

source§

impl Drop for Session

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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, U> Into<U> for Twhere 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> Same<T> for T

§

type Output = T

Should always be Self
source§

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

§

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 Twhere U: TryFrom<T>,

§

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

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

§

fn vzip(self) -> V