Struct marine_rs_sdk::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

Create a new failure MountedBinaryResult from the provided ret_code.

Return true, if this Result represents a success result, otherwise false.

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.

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.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.