Skip to main content

EnclaveArgs

Trait EnclaveArgs 

Source
pub trait EnclaveArgs: Serialize + DeserializeOwned {
    const NAME: &'static str;

    // Provided methods
    fn to_command(&self, bin_path: &Path) -> Command { ... }
    fn append_args(&self, cmd: &mut Command) { ... }
    fn from_json_str(json_str: &str) -> Result<Self, Error> { ... }
    fn to_json_string(&self) -> String { ... }
}
Expand description

A trait for the arguments to an enclave command.

Required Associated Constants§

Source

const NAME: &'static str

The name of the command, e.g. “run”, “provision”, “mega”

Provided Methods§

Source

fn to_command(&self, bin_path: &Path) -> Command

Construct a std::process::Command from the contained args. Requires the path to the binary.

Source

fn append_args(&self, cmd: &mut Command)

Serialize and append the contained args to an existing std::process::Command.

Source

fn from_json_str(json_str: &str) -> Result<Self, Error>

Source

fn to_json_string(&self) -> String

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl EnclaveArgs for MegaArgs

Source§

const NAME: &'static str = "mega"