[−][src]Struct over_there_core::ConnectedClient
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]
&'_ mut self
) -> Result<CapabilitiesArgs, AskError>
Requests the capabilities from the server
pub async fn ask_create_dir<'_>(
&'_ mut self,
path: String,
include_components: bool
) -> Result<DirCreatedArgs, FileAskError>
[src]
&'_ mut self,
path: String,
include_components: bool
) -> Result<DirCreatedArgs, FileAskError>
Requests to create a new directory
pub async fn ask_rename_dir<'_>(
&'_ mut self,
from: String,
to: String
) -> Result<DirRenamedArgs, FileAskError>
[src]
&'_ mut self,
from: String,
to: String
) -> Result<DirRenamedArgs, FileAskError>
Requests to rename an existing directory
pub async fn ask_remove_dir<'_>(
&'_ mut self,
path: String,
non_empty: bool
) -> Result<DirRemovedArgs, FileAskError>
[src]
&'_ mut self,
path: String,
non_empty: bool
) -> Result<DirRemovedArgs, FileAskError>
Requests to remove an existing directory
pub async fn ask_list_root_dir_contents<'_>(
&'_ mut self
) -> Result<DirContentsListArgs, FileAskError>
[src]
&'_ mut self
) -> Result<DirContentsListArgs, FileAskError>
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]
&'_ mut self,
path: String
) -> Result<DirContentsListArgs, FileAskError>
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]
&'_ mut self,
path: String
) -> Result<FileOpenedArgs, FileAskError>
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]
&'_ mut self,
path: String,
create: bool,
write: bool,
read: bool
) -> Result<FileOpenedArgs, FileAskError>
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]
&'_ mut self,
file: &'_ RemoteFile
) -> Result<FileClosedArgs, FileAskError>
Requests to close an open file
pub async fn ask_rename_file<'_, '_>(
&'_ mut self,
file: &'_ mut RemoteFile,
to: String
) -> Result<FileRenamedArgs, FileAskError>
[src]
&'_ mut self,
file: &'_ mut RemoteFile,
to: String
) -> Result<FileRenamedArgs, FileAskError>
Requests to rename an open file
pub async fn ask_rename_unopened_file<'_>(
&'_ mut self,
from: String,
to: String
) -> Result<UnopenedFileRenamedArgs, FileAskError>
[src]
&'_ mut self,
from: String,
to: String
) -> Result<UnopenedFileRenamedArgs, FileAskError>
Requests to rename a non-open file
pub async fn ask_remove_file<'_, '_>(
&'_ mut self,
file: &'_ mut RemoteFile
) -> Result<FileRemovedArgs, FileAskError>
[src]
&'_ mut self,
file: &'_ mut RemoteFile
) -> Result<FileRemovedArgs, FileAskError>
Requests to remove an open file
pub async fn ask_remove_unopened_file<'_>(
&'_ mut self,
path: String
) -> Result<UnopenedFileRemovedArgs, FileAskError>
[src]
&'_ mut self,
path: String
) -> Result<UnopenedFileRemovedArgs, FileAskError>
Requests to remove a non-open file
pub async fn ask_read_file<'_, '_>(
&'_ mut self,
file: &'_ RemoteFile
) -> Result<FileContentsArgs, FileAskError>
[src]
&'_ mut self,
file: &'_ RemoteFile
) -> Result<FileContentsArgs, FileAskError>
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]
&'_ mut self,
file: &'_ mut RemoteFile,
contents: &'_ [u8]
) -> Result<FileWrittenArgs, FileAskError>
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]
&'_ mut self,
command: String,
args: Vec<String>
) -> Result<ProcStartedArgs, ExecAskError>
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]
&'_ mut self,
command: String,
args: Vec<String>,
current_dir: String
) -> Result<ProcStartedArgs, ExecAskError>
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]
&'_ mut self,
command: String,
args: Vec<String>,
stdin: bool,
stdout: bool,
stderr: bool,
current_dir: Option<String>
) -> Result<ProcStartedArgs, ExecAskError>
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]
&'_ mut self,
proc: &'_ RemoteProc,
input: &'_ [u8]
) -> Result<StdinWrittenArgs, ExecAskError>
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]
&'_ mut self,
proc: &'_ RemoteProc
) -> Result<StdoutContentsArgs, ExecAskError>
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]
&'_ mut self,
proc: &'_ RemoteProc
) -> Result<StderrContentsArgs, ExecAskError>
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]
&'_ mut self,
proc: &'_ RemoteProc
) -> Result<ProcStatusArgs, ExecAskError>
Requests to kill a remote process on the server
pub async fn ask_proc_kill<'_, '_>(
&'_ mut self,
proc: &'_ RemoteProc
) -> Result<ProcStatusArgs, ExecAskError>
[src]
&'_ mut self,
proc: &'_ RemoteProc
) -> Result<ProcStatusArgs, ExecAskError>
Requests to kill a remote process on the server
pub async fn ask_internal_debug<'_>(
&'_ mut self
) -> Result<InternalDebugArgs, AskError>
[src]
&'_ mut self
) -> Result<InternalDebugArgs, AskError>
Requests internal state of server
Auto Trait Implementations
impl !RefUnwindSafe for ConnectedClient
impl Send for ConnectedClient
impl Sync for ConnectedClient
impl Unpin for ConnectedClient
impl !UnwindSafe for ConnectedClient
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,