Enum distant_core::data::DistantResponseData
source · [−]pub enum DistantResponseData {
Show 13 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: ProcessId,
},
ProcStdout {
id: ProcessId,
data: Vec<u8>,
},
ProcStderr {
id: ProcessId,
data: Vec<u8>,
},
ProcDone {
id: ProcessId,
success: bool,
code: Option<i32>,
},
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: ProcessIdArbitrary id associated with running process
Response to starting a new process
ProcStdout
Fields
id: ProcessIdArbitrary id associated with running process
Actively-transmitted stdout as part of running process
ProcStderr
Fields
id: ProcessIdArbitrary id associated with running process
Actively-transmitted stderr as part of running process
ProcDone
Fields
id: ProcessIdArbitrary id associated with running process
success: boolWhether or not termination was successful
Response to a process finishing
SystemInfo(SystemInfo)
Response to retrieving information about the server and the system it is on
Implementations
sourceimpl DistantResponseData
impl DistantResponseData
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_system_info(&self) -> bool
Trait Implementations
sourceimpl AsRef<str> for DistantResponseData
impl AsRef<str> for DistantResponseData
sourceimpl Clone for DistantResponseData
impl Clone for DistantResponseData
sourcefn clone(&self) -> DistantResponseData
fn clone(&self) -> DistantResponseData
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 DistantResponseData
impl Debug for DistantResponseData
sourceimpl<'de> Deserialize<'de> for DistantResponseData
impl<'de> Deserialize<'de> for DistantResponseData
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 DistantResponseData
impl From<Error> for DistantResponseData
sourceimpl PartialEq<DistantResponseData> for DistantResponseData
impl PartialEq<DistantResponseData> for DistantResponseData
sourcefn eq(&self, other: &DistantResponseData) -> bool
fn eq(&self, other: &DistantResponseData) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &DistantResponseData) -> bool
fn ne(&self, other: &DistantResponseData) -> bool
This method tests for !=.
sourceimpl Serialize for DistantResponseData
impl Serialize for DistantResponseData
impl Eq for DistantResponseData
impl StructuralEq for DistantResponseData
impl StructuralPartialEq for DistantResponseData
Auto Trait Implementations
impl RefUnwindSafe for DistantResponseData
impl Send for DistantResponseData
impl Sync for DistantResponseData
impl Unpin for DistantResponseData
impl UnwindSafe for DistantResponseData
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> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more