Enum distant_core::data::ResponseData
source · [−]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
Response containing some arbitrary, binary data
Text
Fields
data: StringText data associated with the response
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
Fields
value: boolResponse to checking if a path exists
Metadata(Metadata)
Represents metadata about some filesystem object (file, directory, symlink) on remote machine
ProcSpawned
Fields
id: usizeArbitrary id associated with running process
Response to starting a new process
ProcStdout
Fields
id: usizeArbitrary id associated with running process
Actively-transmitted stdout as part of running process
ProcStderr
Fields
id: usizeArbitrary id associated with running process
Actively-transmitted stderr as part of running process
ProcDone
Fields
id: usizeArbitrary id associated with running process
success: boolWhether or not termination was successful
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
sourceimpl ResponseData
impl ResponseData
pub fn is_ok(&self) -> bool
pub fn is_error(&self) -> bool
pub fn is_blob(&self) -> bool
pub fn is_text(&self) -> bool
pub fn is_dir_entries(&self) -> bool
pub fn is_changed(&self) -> bool
pub fn is_exists(&self) -> bool
pub fn is_metadata(&self) -> bool
pub fn is_proc_spawned(&self) -> bool
pub fn is_proc_stdout(&self) -> bool
pub fn is_proc_stderr(&self) -> bool
pub fn is_proc_done(&self) -> bool
pub fn is_proc_entries(&self) -> bool
pub fn is_system_info(&self) -> bool
Trait Implementations
sourceimpl AsRef<str> for ResponseData
impl AsRef<str> for ResponseData
sourceimpl Clone for ResponseData
impl Clone for ResponseData
sourcefn clone(&self) -> ResponseData
fn clone(&self) -> ResponseData
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for ResponseData
impl Debug for ResponseData
sourceimpl<'de> Deserialize<'de> for ResponseData
impl<'de> Deserialize<'de> for ResponseData
sourcefn 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
sourceimpl From<Error> for ResponseData
impl From<Error> for ResponseData
sourceimpl From<Error> for ResponseData
impl From<Error> for ResponseData
sourceimpl From<Error> for ResponseData
impl From<Error> for ResponseData
sourceimpl From<JoinError> for ResponseData
impl From<JoinError> for ResponseData
sourceimpl PartialEq<ResponseData> for ResponseData
impl PartialEq<ResponseData> for ResponseData
sourcefn eq(&self, other: &ResponseData) -> bool
fn eq(&self, other: &ResponseData) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &ResponseData) -> bool
fn ne(&self, other: &ResponseData) -> bool
This method tests for !=.
sourceimpl Serialize for ResponseData
impl Serialize for ResponseData
impl Eq for ResponseData
impl StructuralEq for ResponseData
impl StructuralPartialEq for ResponseData
Auto Trait Implementations
impl RefUnwindSafe for ResponseData
impl Send for ResponseData
impl Sync for ResponseData
impl Unpin for ResponseData
impl UnwindSafe for ResponseData
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more