[][src]Struct over_there_core::ConnectedClient

pub struct ConnectedClient {
    pub timeout: Duration,
    // some fields omitted
}

Represents a client after connecting to an endpoint

Fields

timeout: Duration

Represents maximum to wait on responses before timing out

Methods

impl ConnectedClient[src]

pub const DEFAULT_TIMEOUT: Duration[src]

Default timeout applied to a new client for any ask made

pub fn remote_addr(&self) -> SocketAddr[src]

pub async fn wait(self) -> Result<(), JoinError>[src]

pub async fn ask<'_>(&'_ mut self, msg: Msg) -> Result<Msg, AskError>[src]

Generic ask of the server that is expecting a response

pub async fn tell<'_>(&'_ mut self, msg: Msg) -> Result<(), TellError>[src]

Sends a msg to the server, not expecting a response

pub async fn ask_version<'_>(&'_ mut self) -> Result<VersionArgs, AskError>[src]

Requests the version from the server

pub async fn ask_capabilities<'_>(
    &'_ mut self
) -> Result<CapabilitiesArgs, AskError>
[src]

Requests the capabilities from the server

pub async fn ask_create_dir<'_>(
    &'_ mut self,
    path: String,
    include_components: bool
) -> Result<DirCreatedArgs, FileAskError>
[src]

Requests to create a new directory

pub async fn ask_rename_dir<'_>(
    &'_ mut self,
    from: String,
    to: String
) -> Result<DirRenamedArgs, FileAskError>
[src]

Requests to rename an existing directory

pub async fn ask_remove_dir<'_>(
    &'_ mut self,
    path: String,
    non_empty: bool
) -> Result<DirRemovedArgs, FileAskError>
[src]

Requests to remove an existing directory

pub async fn ask_list_root_dir_contents<'_>(
    &'_ mut self
) -> Result<DirContentsListArgs, FileAskError>
[src]

Requests to get a list of the root directory's contents on the server

pub async fn ask_list_dir_contents<'_>(
    &'_ mut self,
    path: String
) -> Result<DirContentsListArgs, FileAskError>
[src]

Requests to get a list of a directory's contents on the server

pub async fn ask_open_file<'_>(
    &'_ mut self,
    path: String
) -> Result<FileOpenedArgs, FileAskError>
[src]

Requests to open a file for reading/writing on the server, creating the file if it does not exist

pub async fn ask_open_file_with_options<'_>(
    &'_ mut self,
    path: String,
    create: bool,
    write: bool,
    read: bool
) -> Result<FileOpenedArgs, FileAskError>
[src]

Requests to open a file on the server, opening using the provided options

pub async fn ask_close_file<'_, '_>(
    &'_ mut self,
    file: &'_ RemoteFile
) -> Result<FileClosedArgs, FileAskError>
[src]

Requests to close an open file

pub async fn ask_rename_file<'_, '_>(
    &'_ mut self,
    file: &'_ mut RemoteFile,
    to: String
) -> Result<FileRenamedArgs, FileAskError>
[src]

Requests to rename an open file

pub async fn ask_rename_unopened_file<'_>(
    &'_ mut self,
    from: String,
    to: String
) -> Result<UnopenedFileRenamedArgs, FileAskError>
[src]

Requests to rename a non-open file

pub async fn ask_remove_file<'_, '_>(
    &'_ mut self,
    file: &'_ mut RemoteFile
) -> Result<FileRemovedArgs, FileAskError>
[src]

Requests to remove an open file

pub async fn ask_remove_unopened_file<'_>(
    &'_ mut self,
    path: String
) -> Result<UnopenedFileRemovedArgs, FileAskError>
[src]

Requests to remove a non-open file

pub async fn ask_read_file<'_, '_>(
    &'_ mut self,
    file: &'_ RemoteFile
) -> Result<FileContentsArgs, FileAskError>
[src]

Requests the full contents of a file on the server

pub async fn ask_write_file<'_, '_, '_>(
    &'_ mut self,
    file: &'_ mut RemoteFile,
    contents: &'_ [u8]
) -> Result<FileWrittenArgs, FileAskError>
[src]

Requests to write the contents of a file on the server

pub async fn ask_exec_proc<'_>(
    &'_ mut self,
    command: String,
    args: Vec<String>
) -> Result<ProcStartedArgs, ExecAskError>
[src]

Requests to execute a process on the server, providing support to send lines of text via stdin and reading back lines of text via stdout and stderr

pub async fn ask_exec_proc_with_current_dir<'_>(
    &'_ mut self,
    command: String,
    args: Vec<String>,
    current_dir: String
) -> Result<ProcStartedArgs, ExecAskError>
[src]

Requests to execute a process on the server, providing support to send lines of text via stdin and reading back lines of text via stdout and stderr

pub async fn ask_exec_proc_with_options<'_>(
    &'_ mut self,
    command: String,
    args: Vec<String>,
    stdin: bool,
    stdout: bool,
    stderr: bool,
    current_dir: Option<String>
) -> Result<ProcStartedArgs, ExecAskError>
[src]

Requests to execute a process on the server, indicating whether to ignore or use stdin, stdout, and stderr

pub async fn ask_write_stdin<'_, '_, '_>(
    &'_ mut self,
    proc: &'_ RemoteProc,
    input: &'_ [u8]
) -> Result<StdinWrittenArgs, ExecAskError>
[src]

Requests to send lines of text to stdin of a remote process on the server

pub async fn ask_get_stdout<'_, '_>(
    &'_ mut self,
    proc: &'_ RemoteProc
) -> Result<StdoutContentsArgs, ExecAskError>
[src]

Requests to get all stdout from a remote process on the server since the last ask was made

pub async fn ask_get_stderr<'_, '_>(
    &'_ mut self,
    proc: &'_ RemoteProc
) -> Result<StderrContentsArgs, ExecAskError>
[src]

Requests to get all stderr from a remote process on the server since the last ask was made

pub async fn ask_proc_status<'_, '_>(
    &'_ mut self,
    proc: &'_ RemoteProc
) -> Result<ProcStatusArgs, ExecAskError>
[src]

Requests to kill a remote process on the server

pub async fn ask_proc_kill<'_, '_>(
    &'_ mut self,
    proc: &'_ RemoteProc
) -> Result<ProcStatusArgs, ExecAskError>
[src]

Requests to kill a remote process on the server

pub async fn ask_internal_debug<'_>(
    &'_ mut self
) -> Result<InternalDebugArgs, AskError>
[src]

Requests internal state of server

Auto Trait Implementations

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, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

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

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