Trait DistantChannelExt

Source
pub trait DistantChannelExt {
Show 25 methods // Required methods fn append_file( &mut self, path: impl Into<PathBuf>, data: impl Into<Vec<u8>>, ) -> AsyncReturn<'_, ()>; fn append_file_text( &mut self, path: impl Into<PathBuf>, data: impl Into<String>, ) -> AsyncReturn<'_, ()>; fn copy( &mut self, src: impl Into<PathBuf>, dst: impl Into<PathBuf>, ) -> AsyncReturn<'_, ()>; fn create_dir( &mut self, path: impl Into<PathBuf>, all: bool, ) -> AsyncReturn<'_, ()>; fn exists(&mut self, path: impl Into<PathBuf>) -> AsyncReturn<'_, bool>; fn is_compatible(&mut self) -> AsyncReturn<'_, bool>; fn metadata( &mut self, path: impl Into<PathBuf>, canonicalize: bool, resolve_file_type: bool, ) -> AsyncReturn<'_, Metadata>; fn set_permissions( &mut self, path: impl Into<PathBuf>, permissions: Permissions, options: SetPermissionsOptions, ) -> AsyncReturn<'_, ()>; fn search( &mut self, query: impl Into<SearchQuery>, ) -> AsyncReturn<'_, Searcher>; fn cancel_search(&mut self, id: SearchId) -> AsyncReturn<'_, ()>; fn read_dir( &mut self, path: impl Into<PathBuf>, depth: usize, absolute: bool, canonicalize: bool, include_root: bool, ) -> AsyncReturn<'_, (Vec<DirEntry>, Vec<Failure>)>; fn read_file( &mut self, path: impl Into<PathBuf>, ) -> AsyncReturn<'_, Vec<u8>>; fn read_file_text( &mut self, path: impl Into<PathBuf>, ) -> AsyncReturn<'_, String>; fn remove( &mut self, path: impl Into<PathBuf>, force: bool, ) -> AsyncReturn<'_, ()>; fn rename( &mut self, src: impl Into<PathBuf>, dst: impl Into<PathBuf>, ) -> AsyncReturn<'_, ()>; fn watch( &mut self, path: impl Into<PathBuf>, recursive: bool, only: impl Into<ChangeKindSet>, except: impl Into<ChangeKindSet>, ) -> AsyncReturn<'_, Watcher>; fn unwatch(&mut self, path: impl Into<PathBuf>) -> AsyncReturn<'_, ()>; fn spawn( &mut self, cmd: impl Into<String>, environment: Environment, current_dir: Option<PathBuf>, pty: Option<PtySize>, ) -> AsyncReturn<'_, RemoteProcess>; fn spawn_lsp( &mut self, cmd: impl Into<String>, environment: Environment, current_dir: Option<PathBuf>, pty: Option<PtySize>, ) -> AsyncReturn<'_, RemoteLspProcess>; fn output( &mut self, cmd: impl Into<String>, environment: Environment, current_dir: Option<PathBuf>, pty: Option<PtySize>, ) -> AsyncReturn<'_, RemoteOutput>; fn system_info(&mut self) -> AsyncReturn<'_, SystemInfo>; fn version(&mut self) -> AsyncReturn<'_, Version>; fn protocol_version(&self) -> Version; fn write_file( &mut self, path: impl Into<PathBuf>, data: impl Into<Vec<u8>>, ) -> AsyncReturn<'_, ()>; fn write_file_text( &mut self, path: impl Into<PathBuf>, data: impl Into<String>, ) -> AsyncReturn<'_, ()>;
}
Expand description

Provides convenience functions on top of a Channel

Required Methods§

Source

fn append_file( &mut self, path: impl Into<PathBuf>, data: impl Into<Vec<u8>>, ) -> AsyncReturn<'_, ()>

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

Source

fn append_file_text( &mut self, path: impl Into<PathBuf>, data: impl Into<String>, ) -> AsyncReturn<'_, ()>

Appends to a remote file using the data from a string

Source

fn copy( &mut self, src: impl Into<PathBuf>, dst: impl Into<PathBuf>, ) -> AsyncReturn<'_, ()>

Copies a remote file or directory from src to dst

Source

fn create_dir( &mut self, path: impl Into<PathBuf>, all: bool, ) -> AsyncReturn<'_, ()>

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

Source

fn exists(&mut self, path: impl Into<PathBuf>) -> AsyncReturn<'_, bool>

Checks whether the path exists on the remote machine

Source

fn is_compatible(&mut self) -> AsyncReturn<'_, bool>

Checks whether this client is compatible with the remote server

Source

fn metadata( &mut self, path: impl Into<PathBuf>, canonicalize: bool, resolve_file_type: bool, ) -> AsyncReturn<'_, Metadata>

Retrieves metadata about a path on a remote machine

Source

fn set_permissions( &mut self, path: impl Into<PathBuf>, permissions: Permissions, options: SetPermissionsOptions, ) -> AsyncReturn<'_, ()>

Sets permissions for a path on a remote machine

Source

fn search(&mut self, query: impl Into<SearchQuery>) -> AsyncReturn<'_, Searcher>

Perform a search

Cancel an active search query

Source

fn read_dir( &mut self, path: impl Into<PathBuf>, depth: usize, absolute: bool, canonicalize: bool, include_root: bool, ) -> AsyncReturn<'_, (Vec<DirEntry>, Vec<Failure>)>

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

Source

fn read_file(&mut self, path: impl Into<PathBuf>) -> AsyncReturn<'_, Vec<u8>>

Reads a remote file as a collection of bytes

Source

fn read_file_text( &mut self, path: impl Into<PathBuf>, ) -> AsyncReturn<'_, String>

Returns a remote file as a string

Source

fn remove( &mut self, path: impl Into<PathBuf>, force: bool, ) -> AsyncReturn<'_, ()>

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

Source

fn rename( &mut self, src: impl Into<PathBuf>, dst: impl Into<PathBuf>, ) -> AsyncReturn<'_, ()>

Renames a remote file or directory from src to dst

Source

fn watch( &mut self, path: impl Into<PathBuf>, recursive: bool, only: impl Into<ChangeKindSet>, except: impl Into<ChangeKindSet>, ) -> AsyncReturn<'_, Watcher>

Watches a remote file or directory

Source

fn unwatch(&mut self, path: impl Into<PathBuf>) -> AsyncReturn<'_, ()>

Unwatches a remote file or directory

Source

fn spawn( &mut self, cmd: impl Into<String>, environment: Environment, current_dir: Option<PathBuf>, pty: Option<PtySize>, ) -> AsyncReturn<'_, RemoteProcess>

Spawns a process on the remote machine

Source

fn spawn_lsp( &mut self, cmd: impl Into<String>, environment: Environment, current_dir: Option<PathBuf>, pty: Option<PtySize>, ) -> AsyncReturn<'_, RemoteLspProcess>

Spawns an LSP process on the remote machine

Source

fn output( &mut self, cmd: impl Into<String>, environment: Environment, current_dir: Option<PathBuf>, pty: Option<PtySize>, ) -> AsyncReturn<'_, RemoteOutput>

Spawns a process on the remote machine and wait for it to complete

Source

fn system_info(&mut self) -> AsyncReturn<'_, SystemInfo>

Retrieves information about the remote system

Source

fn version(&mut self) -> AsyncReturn<'_, Version>

Retrieves server version information

Source

fn protocol_version(&self) -> Version

Returns version of protocol that the client uses

Source

fn write_file( &mut self, path: impl Into<PathBuf>, data: impl Into<Vec<u8>>, ) -> AsyncReturn<'_, ()>

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

Source

fn write_file_text( &mut self, path: impl Into<PathBuf>, data: impl Into<String>, ) -> AsyncReturn<'_, ()>

Writes a remote file with the data from a string

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl DistantChannelExt for Channel<Msg<Request>, Msg<Response>>

Source§

fn append_file( &mut self, path: impl Into<PathBuf>, data: impl Into<Vec<u8>>, ) -> AsyncReturn<'_, ()>

Source§

fn append_file_text( &mut self, path: impl Into<PathBuf>, data: impl Into<String>, ) -> AsyncReturn<'_, ()>

Source§

fn copy( &mut self, src: impl Into<PathBuf>, dst: impl Into<PathBuf>, ) -> AsyncReturn<'_, ()>

Source§

fn create_dir( &mut self, path: impl Into<PathBuf>, all: bool, ) -> AsyncReturn<'_, ()>

Source§

fn exists(&mut self, path: impl Into<PathBuf>) -> AsyncReturn<'_, bool>

Source§

fn is_compatible(&mut self) -> AsyncReturn<'_, bool>

Source§

fn metadata( &mut self, path: impl Into<PathBuf>, canonicalize: bool, resolve_file_type: bool, ) -> AsyncReturn<'_, Metadata>

Source§

fn set_permissions( &mut self, path: impl Into<PathBuf>, permissions: Permissions, options: SetPermissionsOptions, ) -> AsyncReturn<'_, ()>

Source§

fn search(&mut self, query: impl Into<SearchQuery>) -> AsyncReturn<'_, Searcher>

Source§

fn read_dir( &mut self, path: impl Into<PathBuf>, depth: usize, absolute: bool, canonicalize: bool, include_root: bool, ) -> AsyncReturn<'_, (Vec<DirEntry>, Vec<Failure>)>

Source§

fn read_file(&mut self, path: impl Into<PathBuf>) -> AsyncReturn<'_, Vec<u8>>

Source§

fn read_file_text( &mut self, path: impl Into<PathBuf>, ) -> AsyncReturn<'_, String>

Source§

fn remove( &mut self, path: impl Into<PathBuf>, force: bool, ) -> AsyncReturn<'_, ()>

Source§

fn rename( &mut self, src: impl Into<PathBuf>, dst: impl Into<PathBuf>, ) -> AsyncReturn<'_, ()>

Source§

fn watch( &mut self, path: impl Into<PathBuf>, recursive: bool, only: impl Into<ChangeKindSet>, except: impl Into<ChangeKindSet>, ) -> AsyncReturn<'_, Watcher>

Source§

fn unwatch(&mut self, path: impl Into<PathBuf>) -> AsyncReturn<'_, ()>

Source§

fn spawn( &mut self, cmd: impl Into<String>, environment: Environment, current_dir: Option<PathBuf>, pty: Option<PtySize>, ) -> AsyncReturn<'_, RemoteProcess>

Source§

fn spawn_lsp( &mut self, cmd: impl Into<String>, environment: Environment, current_dir: Option<PathBuf>, pty: Option<PtySize>, ) -> AsyncReturn<'_, RemoteLspProcess>

Source§

fn output( &mut self, cmd: impl Into<String>, environment: Environment, current_dir: Option<PathBuf>, pty: Option<PtySize>, ) -> AsyncReturn<'_, RemoteOutput>

Source§

fn system_info(&mut self) -> AsyncReturn<'_, SystemInfo>

Source§

fn version(&mut self) -> AsyncReturn<'_, Version>

Source§

fn protocol_version(&self) -> Version

Source§

fn write_file( &mut self, path: impl Into<PathBuf>, data: impl Into<Vec<u8>>, ) -> AsyncReturn<'_, ()>

Source§

fn write_file_text( &mut self, path: impl Into<PathBuf>, data: impl Into<String>, ) -> AsyncReturn<'_, ()>

Implementors§