Enum distant_core::data::ResponseData[][src]

pub enum ResponseData {
Show 13 variants Ok, Error(Error), Blob { data: Vec<u8>, }, Text { data: String, }, DirEntries { entries: Vec<DirEntry>, errors: Vec<Error>, }, Exists(bool), Metadata(Metadata), ProcStart { id: usize, }, ProcStdout { id: usize, data: String, }, ProcStderr { id: usize, data: String, }, 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

Tuple Fields of Error

0: Error
Blob

Response containing some arbitrary, binary data

Fields of Blob

data: Vec<u8>

Binary data associated with the response

Text

Response containing some arbitrary, text data

Fields of Text

data: String

Text data associated with the response

DirEntries

Response to reading a directory

Fields of DirEntries

entries: Vec<DirEntry>

Entries contained within the requested directory

errors: Vec<Error>

Errors encountered while scanning for entries

Exists(bool)

Response to checking if a path exists

Tuple Fields of Exists

0: bool
Metadata(Metadata)

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

Tuple Fields of Metadata

0: Metadata
ProcStart

Response to starting a new process

Fields of ProcStart

id: usize

Arbitrary id associated with running process

ProcStdout

Actively-transmitted stdout as part of running process

Fields of ProcStdout

id: usize

Arbitrary id associated with running process

data: String

Data read from a process’ stdout pipe

ProcStderr

Actively-transmitted stderr as part of running process

Fields of ProcStderr

id: usize

Arbitrary id associated with running process

data: String

Data read from a process’ stderr pipe

ProcDone

Response to a process finishing

Fields of ProcDone

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

ProcEntries

Response to retrieving a list of managed processes

Fields of ProcEntries

entries: Vec<RunningProcess>

List of managed processes

SystemInfo(SystemInfo)

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

Tuple Fields of SystemInfo

0: SystemInfo

Implementations

Trait Implementations

Performs the conversion.

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

Performs the conversion.

Performs the conversion.

Performs the conversion.

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

Performs the conversion.

Performs the conversion.

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)

recently added

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.