Enum distant_core::data::RequestData [−][src]
pub enum RequestData {
Show 18 variants
FileRead {
path: PathBuf,
},
FileReadText {
path: PathBuf,
},
FileWrite {
path: PathBuf,
data: ByteVec,
},
FileWriteText {
path: PathBuf,
text: String,
},
FileAppend {
path: PathBuf,
data: ByteVec,
},
FileAppendText {
path: PathBuf,
text: String,
},
DirRead {
path: PathBuf,
depth: usize,
absolute: bool,
canonicalize: bool,
include_root: bool,
},
DirCreate {
path: PathBuf,
all: bool,
},
Remove {
path: PathBuf,
force: bool,
},
Copy {
src: PathBuf,
dst: PathBuf,
},
Rename {
src: PathBuf,
dst: PathBuf,
},
Exists {
path: PathBuf,
},
Metadata {
path: PathBuf,
canonicalize: bool,
resolve_file_type: bool,
},
ProcRun {
cmd: String,
args: Vec<String>,
},
ProcKill {
id: usize,
},
ProcStdin {
id: usize,
data: String,
},
ProcList {},
SystemInfo {},
}
Expand description
Represents the payload of a request to be performed on the remote machine
Variants
Reads a file from the specified path on the remote machine
Fields of FileRead
path: PathBuf
The path to the file on the remote machine
Reads a file from the specified path on the remote machine and treats the contents as text
Fields of FileReadText
path: PathBuf
The path to the file on the remote machine
Writes a file, creating it if it does not exist, and overwriting any existing content on the remote machine
Fields of FileWrite
Writes a file using text instead of bytes, creating it if it does not exist, and overwriting any existing content on the remote machine
Fields of FileWriteText
Appends to a file, creating it if it does not exist, on the remote machine
Fields of FileAppend
Appends text to a file, creating it if it does not exist, on the remote machine
Fields of FileAppendText
Reads a directory from the specified path on the remote machine
Fields of DirRead
path: PathBuf
The path to the directory on the remote machine
depth: usize
Maximum depth to traverse with 0 indicating there is no maximum depth and 1 indicating the most immediate children within the directory
absolute: bool
Whether or not to return absolute or relative paths
canonicalize: bool
Whether or not to canonicalize the resulting paths, meaning returning the canonical, absolute form of a path with all intermediate components normalized and symbolic links resolved
Note that the flag absolute must be true to have absolute paths returned, even if canonicalize is flagged as true
include_root: bool
Whether or not to include the root directory in the retrieved entries
If included, the root directory will also be a canonicalized, absolute path and will not follow any of the other flags
Creates a directory on the remote machine
Fields of DirCreate
Removes a file or directory on the remote machine
Fields of Remove
Copies a file or directory on the remote machine
Fields of Copy
Moves/renames a file or directory on the remote machine
Fields of Rename
Checks whether the given path exists
Fields of Exists
path: PathBuf
The path to the file or directory on the remote machine
Retrieves filesystem metadata for the specified path on the remote machine
Fields of Metadata
path: PathBuf
The path to the file, directory, or symlink on the remote machine
canonicalize: bool
Whether or not to include a canonicalized version of the path, meaning returning the canonical, absolute form of a path with all intermediate components normalized and symbolic links resolved
resolve_file_type: bool
Whether or not to follow symlinks to determine absolute file type (dir/file)
Runs a process on the remote machine
Kills a process running on the remote machine
Fields of ProcKill
id: usize
Id of the actively-running process
Sends additional data to stdin of running process
Fields of ProcStdin
Retrieve a list of all processes being managed by the remote server
Fields of ProcList
Retrieve information about the server and the system it is on
Fields of SystemInfo
Implementations
Trait Implementations
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>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for RequestData
impl Send for RequestData
impl Sync for RequestData
impl Unpin for RequestData
impl UnwindSafe for RequestData
Blanket Implementations
Mutably borrows from an owned value. Read more