Enum distant_protocol::Response
source · pub enum Response {
Show 17 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),
SearchStarted {
id: SearchId,
},
SearchResults {
id: SearchId,
matches: Vec<SearchQueryMatch>,
},
SearchDone {
id: SearchId,
},
ProcSpawned {
id: ProcessId,
},
ProcStdout {
id: ProcessId,
data: Vec<u8>,
},
ProcStderr {
id: ProcessId,
data: Vec<u8>,
},
ProcDone {
id: ProcessId,
success: bool,
code: Option<i32>,
},
SystemInfo(SystemInfo),
Version(Version),
}
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
Response containing some arbitrary, binary data
Text
Response containing some arbitrary, text data
DirEntries
Fields
Response to reading a directory
Changed(Change)
Response to a filesystem change for some watched file, directory, or symlink
Exists
Response to checking if a path exists
Metadata(Metadata)
Represents metadata about some filesystem object (file, directory, symlink) on remote machine
SearchStarted
Represents a search being started
SearchResults
Fields
matches: Vec<SearchQueryMatch>
Collection of matches from performing a query
Represents some subset of results for a search query (may not be all of them)
SearchDone
Represents a search being completed
ProcSpawned
Response to starting a new process
ProcStdout
Fields
Actively-transmitted stdout as part of running process
ProcStderr
Fields
Actively-transmitted stderr as part of running process
ProcDone
Fields
Response to a process finishing
SystemInfo(SystemInfo)
Response to retrieving information about the server and the system it is on
Version(Version)
Response to retrieving information about the server’s version