Enum distant_protocol::RequestKind
source · pub enum RequestKind {
Show 24 variants
FileRead,
FileReadText,
FileWrite,
FileWriteText,
FileAppend,
FileAppendText,
DirRead,
DirCreate,
Remove,
Copy,
Rename,
Watch,
Unwatch,
Exists,
Metadata,
SetPermissions,
Search,
CancelSearch,
ProcSpawn,
ProcKill,
ProcStdin,
ProcResizePty,
SystemInfo,
Version,
}Expand description
Auto-generated discriminant enum variants
Variants§
FileRead
Reads a file from the specified path on the remote machine
FileReadText
Reads a file from the specified path on the remote machine and treats the contents as text
FileWrite
Writes a file, creating it if it does not exist, and overwriting any existing content on the remote machine
FileWriteText
Writes a file using text instead of bytes, creating it if it does not exist, and overwriting any existing content on the remote machine
FileAppend
Appends to a file, creating it if it does not exist, on the remote machine
FileAppendText
Appends text to a file, creating it if it does not exist, on the remote machine
DirRead
Reads a directory from the specified path on the remote machine
DirCreate
Creates a directory on the remote machine
Remove
Removes a file or directory on the remote machine
Copy
Copies a file or directory on the remote machine
Rename
Moves/renames a file or directory on the remote machine
Watch
Watches a path for changes
Unwatch
Unwatches a path for changes, meaning no additional changes will be reported
Exists
Checks whether the given path exists
Metadata
Retrieves filesystem metadata for the specified path on the remote machine
SetPermissions
Sets permissions on a file, directory, or symlink on the remote machine
Search
Searches filesystem using the provided query
CancelSearch
Cancels an active search being run against the filesystem
ProcSpawn
Spawns a new process on the remote machine
ProcKill
Kills a process running on the remote machine
ProcStdin
Sends additional data to stdin of running process
ProcResizePty
Resize pty of remote process
SystemInfo
Retrieve information about the server and the system it is on
Version
Retrieve information about the server’s protocol version
Implementations§
source§impl RequestKind
impl RequestKind
pub fn is_file_read(&self) -> bool
pub fn is_file_read_text(&self) -> bool
pub fn is_file_write(&self) -> bool
pub fn is_file_write_text(&self) -> bool
pub fn is_file_append(&self) -> bool
pub fn is_file_append_text(&self) -> bool
pub fn is_dir_read(&self) -> bool
pub fn is_dir_create(&self) -> bool
pub fn is_remove(&self) -> bool
pub fn is_copy(&self) -> bool
pub fn is_rename(&self) -> bool
pub fn is_watch(&self) -> bool
pub fn is_unwatch(&self) -> bool
pub fn is_exists(&self) -> bool
pub fn is_metadata(&self) -> bool
pub fn is_set_permissions(&self) -> bool
pub fn is_search(&self) -> bool
pub fn is_cancel_search(&self) -> bool
pub fn is_proc_spawn(&self) -> bool
pub fn is_proc_kill(&self) -> bool
pub fn is_proc_stdin(&self) -> bool
pub fn is_proc_resize_pty(&self) -> bool
pub fn is_system_info(&self) -> bool
pub fn is_version(&self) -> bool
Trait Implementations§
source§impl AsRef<str> for RequestKind
impl AsRef<str> for RequestKind
source§impl Clone for RequestKind
impl Clone for RequestKind
source§fn clone(&self) -> RequestKind
fn clone(&self) -> RequestKind
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for RequestKind
impl Debug for RequestKind
source§impl<'de> Deserialize<'de> for RequestKind
impl<'de> Deserialize<'de> for RequestKind
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
source§impl Display for RequestKind
impl Display for RequestKind
source§impl EnumMessage for RequestKind
impl EnumMessage for RequestKind
fn get_message(&self) -> Option<&'static str>
fn get_detailed_message(&self) -> Option<&'static str>
source§fn get_documentation(&self) -> Option<&'static str>
fn get_documentation(&self) -> Option<&'static str>
fn get_serializations(&self) -> &'static [&'static str]
source§impl<'_enum> From<&'_enum Request> for RequestKind
impl<'_enum> From<&'_enum Request> for RequestKind
source§fn from(val: &'_enum Request) -> RequestKind
fn from(val: &'_enum Request) -> RequestKind
source§impl From<Request> for RequestKind
impl From<Request> for RequestKind
source§fn from(val: Request) -> RequestKind
fn from(val: Request) -> RequestKind
source§impl From<RequestKind> for Capability
impl From<RequestKind> for Capability
source§fn from(kind: CapabilityKind) -> Self
fn from(kind: CapabilityKind) -> Self
Creates a new capability using the kind’s default message
source§impl FromStr for RequestKind
impl FromStr for RequestKind
source§impl Hash for RequestKind
impl Hash for RequestKind
source§impl IntoEnumIterator for RequestKind
impl IntoEnumIterator for RequestKind
type Iterator = RequestKindIter
fn iter() -> RequestKindIter ⓘ
source§impl Ord for RequestKind
impl Ord for RequestKind
source§fn cmp(&self, other: &RequestKind) -> Ordering
fn cmp(&self, other: &RequestKind) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<RequestKind> for RequestKind
impl PartialEq<RequestKind> for RequestKind
source§fn eq(&self, other: &RequestKind) -> bool
fn eq(&self, other: &RequestKind) -> bool
self and other values to be equal, and is used
by ==.source§impl PartialOrd<RequestKind> for RequestKind
impl PartialOrd<RequestKind> for RequestKind
source§fn partial_cmp(&self, other: &RequestKind) -> Option<Ordering>
fn partial_cmp(&self, other: &RequestKind) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read more