pub enum ResponseData {
Show 14 variants Ok, Error(Error), Blob { data: Vec<u8>, }, Text { data: String, }, DirEntries { entries: Vec<DirEntry>, errors: Vec<Error>, }, Changed(Change), Exists { value: bool, }, Metadata(Metadata), ProcSpawned { id: usize, }, ProcStdout { id: usize, data: Vec<u8>, }, ProcStderr { id: usize, data: Vec<u8>, }, ProcDone { id: usize, success: bool, code: Option<i32>, }, ProcEntries { entries: Vec<RunningProcess>, }, SystemInfo(SystemInfo),
}
Expand description

Represents the payload of a successful response

Variants

Ok

General okay with no extra data, returned in cases like creating or removing a directory, copying a file, or renaming a file

Error(Error)

General-purpose failure that occurred from some request

Blob

Fields

data: Vec<u8>

Binary data associated with the response

Response containing some arbitrary, binary data

Text

Fields

data: String

Text data associated with the response

Response containing some arbitrary, text data

DirEntries

Fields

entries: Vec<DirEntry>

Entries contained within the requested directory

errors: Vec<Error>

Errors encountered while scanning for entries

Response to reading a directory

Changed(Change)

Response to a filesystem change for some watched file, directory, or symlink

Exists

Fields

value: bool

Response to checking if a path exists

Metadata(Metadata)

Represents metadata about some filesystem object (file, directory, symlink) on remote machine

ProcSpawned

Fields

id: usize

Arbitrary id associated with running process

Response to starting a new process

ProcStdout

Fields

id: usize

Arbitrary id associated with running process

data: Vec<u8>

Data read from a process’ stdout pipe

Actively-transmitted stdout as part of running process

ProcStderr

Fields

id: usize

Arbitrary id associated with running process

data: Vec<u8>

Data read from a process’ stderr pipe

Actively-transmitted stderr as part of running process

ProcDone

Fields

id: usize

Arbitrary id associated with running process

success: bool

Whether or not termination was successful

code: Option<i32>

Exit code associated with termination, will be missing if terminated by signal

Response to a process finishing

ProcEntries

Fields

entries: Vec<RunningProcess>

List of managed processes

Response to retrieving a list of managed processes

SystemInfo(SystemInfo)

Response to retrieving information about the server and the system it is on

Implementations

Trait Implementations

Converts this type into a shared reference of the (usually inferred) input type.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.