Struct distant_core::Session[][src]

pub struct Session { /* fields omitted */ }
Expand description

Represents a session with a remote server that can be used to send requests & receive responses

Implementations

Connect to a remote TCP server using the provided information

Connect to a remote TCP server, timing out after duration has passed

Connect to a proxy unix socket

Connect to a proxy unix socket, timing out after duration has passed

Initializes a session using the provided transport

Waits for the session to terminate, which results when the receiving end of the network connection is closed (or the session is shutdown)

Abort the session’s current connection by forcing its response task to shutdown

Clones the underlying channel for requests and returns the cloned instance

Methods from Deref<Target = SessionChannel>

Returns true if no more requests can be transferred

Sends a request and returns a mailbox that can receive one or more responses, failing if unable to send a request or if the session’s receiving line to the remote server has already been severed

Sends a request and waits for a response, failing if unable to send a request or if the session’s receiving line to the remote server has already been severed

Sends a request and waits for a response, timing out after duration has passed

Sends a request without waiting for a response; this method is able to be used even if the session’s receiving line to the remote server has been severed

Sends a request without waiting for a response, timing out after duration has passed

Trait Implementations

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Performs the conversion.

Appends to a remote file using the data from a collection of bytes

Appends to a remote file using the data from a string

Copies a remote file or directory from src to dst

Creates a remote directory, optionally creating all parent components if specified

Checks if a path exists on a remote machine

Retrieves metadata about a path on a remote machine

Reads entries from a directory, returning a tuple of directory entries and failures

Reads a remote file as a collection of bytes

Returns a remote file as a string

Removes a remote file or directory, supporting removal of non-empty directories if force is true

Renames a remote file or directory from src to dst

Spawns a process on the remote machine

Writes a remote file with the data from a collection of bytes

Writes a remote file with the data from a string

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.