[][src]Struct thrussh::client::Handle

pub struct Handle<H: Handler> { /* fields omitted */ }

Handle to a session, used to send messages to a client outside of the request/response cycle.

Implementations

impl<H: Handler> Handle<H>[src]

pub async fn authenticate_password<U: Into<String>, P: Into<String>>(
    &mut self,
    user: U,
    password: P
) -> Result<bool, Error>
[src]

pub async fn authenticate_publickey<U: Into<String>>(
    &mut self,
    user: U,
    key: Arc<KeyPair>
) -> Result<bool, Error>
[src]

pub async fn authenticate_future<U: Into<String>, S: Signer>(
    &mut self,
    user: U,
    key: PublicKey,
    future: S
) -> Result<(S, bool), S::Error>
[src]

pub async fn channel_open_session(&mut self) -> Result<Channel, Error>[src]

Request a session channel (the most basic type of channel). This function returns Some(..) immediately if the connection is authenticated, but the channel only becomes usable when it's confirmed by the server, as indicated by the confirmed field of the corresponding Channel.

pub async fn channel_open_x11<A: Into<String>>(
    &mut self,
    originator_address: A,
    originator_port: u32
) -> Result<Channel, Error>
[src]

Request an X11 channel, on which the X11 protocol may be tunneled.

pub async fn channel_open_direct_tcpip<A: Into<String>, B: Into<String>>(
    &mut self,
    host_to_connect: A,
    port_to_connect: u32,
    originator_address: B,
    originator_port: u32
) -> Result<Channel, Error>
[src]

Open a TCP/IP forwarding channel. This is usually done when a connection comes to a locally forwarded TCP/IP port. See RFC4254. The TCP/IP packets can then be tunneled through the channel using .data().

pub async fn disconnect(
    &mut self,
    reason: Disconnect,
    description: &str,
    language_tag: &str
) -> Result<(), Error>
[src]

Sends a disconnect message.

Trait Implementations

impl<H: Handler> Drop for Handle<H>[src]

impl<H: Handler> Future for Handle<H>[src]

type Output = Result<(), H::Error>

The type of value produced on completion.

Auto Trait Implementations

impl<H> !RefUnwindSafe for Handle<H>[src]

impl<H> Send for Handle<H> where
    <H as Handler>::Error: Send
[src]

impl<H> Sync for Handle<H> where
    <H as Handler>::Error: Send
[src]

impl<H> Unpin for Handle<H>[src]

impl<H> !UnwindSafe for Handle<H>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> FutureExt for T where
    T: Future + ?Sized
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<F> IntoFuture for F where
    F: Future
[src]

type Output = <F as Future>::Output

🔬 This is a nightly-only experimental API. (into_future)

The output that the future will produce on completion.

type Future = F

🔬 This is a nightly-only experimental API. (into_future)

Which kind of future are we turning this into?

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<F, T, E> TryFuture for F where
    F: Future<Output = Result<T, E>> + ?Sized
[src]

type Ok = T

The type of successful values yielded by this future

type Error = E

The type of failures yielded by this future

impl<Fut> TryFutureExt for Fut where
    Fut: TryFuture + ?Sized
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.