Struct fluence::MountedBinaryResult [−][src]
pub struct MountedBinaryResult { pub ret_code: i32, pub error: String, pub stdout: Vec<u8>, pub stderr: Vec<u8>, }
Expand description
Describes result of calling a CLI service.
Fields
ret_code: i32
Return process exit code or host execution error code, where SUCCESS_CODE means success.
error: String
Contains the string representation of an error, if ret_code != SUCCESS_CODE.
stdout: Vec<u8>
The data that the process wrote to stdout.
stderr: Vec<u8>
The data that the process wrote to stderr.
Implementations
impl MountedBinaryResult
[src]
impl MountedBinaryResult
[src]pub fn from_error(ret_code: i32, error: impl Into<String>) -> Self
[src]
pub fn from_error(ret_code: i32, error: impl Into<String>) -> Self
[src]Create a new failure MountedBinaryResult from the provided ret_code.
pub fn is_success(&self) -> bool
[src]
pub fn is_success(&self) -> bool
[src]Return true, if this Result represents a success result, otherwise false.
pub fn into_std(self) -> Option<Result<String, String>>
[src]
pub fn into_std(self) -> Option<Result<String, String>>
[src]This function tries to transform a result to the string representation. Internally, It checks ret_code and returns either Some(Ok(stdout)) if it was SUCCESS_CODE or Some(Err(error)) otherwise. None is returned if stdout or stderr contains non valid UTF8 string.
pub fn as_std(&self) -> Option<Result<String, String>>
[src]
pub fn as_std(&self) -> Option<Result<String, String>>
[src]This function tries to represent a result as a string. Internally, It checks ret_code and returns either Some(Ok(stdout)) if it was SUCCESS_CODE or Some(Err(error)) otherwise. None is returned if stdout or stderr contains non valid UTF8 string.
pub fn stringify(&self) -> Option<MountedBinaryStringResult>
[src]
Trait Implementations
impl Clone for MountedBinaryResult
[src]
impl Clone for MountedBinaryResult
[src]fn clone(&self) -> MountedBinaryResult
[src]
fn clone(&self) -> MountedBinaryResult
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for MountedBinaryResult
[src]
impl Debug for MountedBinaryResult
[src]impl Default for MountedBinaryResult
[src]
impl Default for MountedBinaryResult
[src]fn default() -> MountedBinaryResult
[src]
fn default() -> MountedBinaryResult
[src]Returns the “default value” for a type. Read more
impl<'de> Deserialize<'de> for MountedBinaryResult
[src]
impl<'de> Deserialize<'de> for MountedBinaryResult
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl PartialEq<MountedBinaryResult> for MountedBinaryResult
[src]
impl PartialEq<MountedBinaryResult> for MountedBinaryResult
[src]fn eq(&self, other: &MountedBinaryResult) -> bool
[src]
fn eq(&self, other: &MountedBinaryResult) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &MountedBinaryResult) -> bool
[src]
fn ne(&self, other: &MountedBinaryResult) -> bool
[src]This method tests for !=
.
impl Serialize for MountedBinaryResult
[src]
impl Serialize for MountedBinaryResult
[src]impl Eq for MountedBinaryResult
[src]
impl StructuralEq for MountedBinaryResult
[src]
impl StructuralPartialEq for MountedBinaryResult
[src]
Auto Trait Implementations
impl RefUnwindSafe for MountedBinaryResult
impl Send for MountedBinaryResult
impl Sync for MountedBinaryResult
impl Unpin for MountedBinaryResult
impl UnwindSafe for MountedBinaryResult
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,