Struct fluence::MountedBinaryResult [−][src]
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, Global>
The data that the process wrote to stdout.
stderr: Vec<u8, Global>
The data that the process wrote to stderr.
Implementations
impl Result
[src]
pub fn from_error(ret_code: i32, error: impl Into<String>) -> Result
[src]
Create a new failure MountedBinaryResult from the provided ret_code.
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]
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]
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<StringResult>
[src]
Trait Implementations
impl Clone for Result
[src]
impl Debug for Result
[src]
impl Default for Result
[src]
impl<'de> Deserialize<'de> for Result
[src]
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Result, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<Result, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl Eq for Result
[src]
impl PartialEq<Result> for Result
[src]
impl Serialize for Result
[src]
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
impl StructuralEq for Result
[src]
impl StructuralPartialEq for Result
[src]
Auto Trait Implementations
impl RefUnwindSafe for Result
impl Send for Result
impl Sync for Result
impl Unpin for Result
impl UnwindSafe for Result
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,