Struct distant_core::SessionChannel [−][src]
pub struct SessionChannel { /* fields omitted */ }
Expand description
Represents a sender of requests tied to a session, holding onto a weak reference of
mailboxes to relay responses, meaning that once the Session
is closed or dropped,
any sent request will no longer be able to receive responses
Implementations
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
pub async fn send_timeout(
&mut self,
req: Request,
duration: Duration
) -> Result<Response, TransportError>
pub async fn send_timeout(
&mut self,
req: Request,
duration: Duration
) -> Result<Response, TransportError>
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
pub async fn fire_timeout(
&mut self,
req: Request,
duration: Duration
) -> Result<(), TransportError>
pub async fn fire_timeout(
&mut self,
req: Request,
duration: Duration
) -> Result<(), TransportError>
Sends a request without waiting for a response, timing out after duration has passed
Trait Implementations
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 Read more
Renames a remote file or directory from src to dst
Spawns a process on the remote machine
Spawns an LSP process on the remote machine
fn system_info(
&mut self,
tenant: impl Into<String>
) -> Pin<Box<dyn Future<Output = Result<SystemInfo, SessionChannelExtError>> + Send + '_>>
fn system_info(
&mut self,
tenant: impl Into<String>
) -> Pin<Box<dyn Future<Output = Result<SystemInfo, SessionChannelExtError>> + Send + '_>>
Retrieves information about the remote system
Writes a remote file with the data from a collection of bytes
Auto Trait Implementations
impl !RefUnwindSafe for SessionChannel
impl Send for SessionChannel
impl Sync for SessionChannel
impl Unpin for SessionChannel
impl !UnwindSafe for SessionChannel
Blanket Implementations
Mutably borrows from an owned value. Read more