pub struct RunCommand {
pub run: RunCommon,
pub invoke: Option<String>,
pub preloads: Vec<(String, PathBuf)>,
pub argv0: Option<String>,
pub module_and_args: Vec<OsString>,
}
Expand description
Runs a WebAssembly module
Fields§
§run: RunCommon
§invoke: Option<String>
The name of the function to run
preloads: Vec<(String, PathBuf)>
Load the given WebAssembly module before the main module
argv0: Option<String>
Override the value of argv[0]
, typically the name of the executable of
the application being run.
This can be useful to pass in situations where a CLI tool is being
executed that dispatches its functionality on the value of argv[0]
without needing to rename the original wasm binary.
module_and_args: Vec<OsString>
The WebAssembly module to run and arguments to pass to it.
Arguments passed to the wasm module will be configured as WASI CLI
arguments unless the --invoke
CLI argument is passed in which case
arguments will be interpreted as arguments to the function specified.
Implementations§
Trait Implementations§
Source§impl Args for RunCommand
impl Args for RunCommand
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§impl CommandFactory for RunCommand
impl CommandFactory for RunCommand
Source§impl FromArgMatches for RunCommand
impl FromArgMatches for RunCommand
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches
to self
.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches
to self
.Source§impl Parser for RunCommand
impl Parser for RunCommand
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Parse from iterator, exit on error
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Parse from iterator, return Err on error.
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Update from iterator, exit on error
Source§impl PartialEq for RunCommand
impl PartialEq for RunCommand
impl StructuralPartialEq for RunCommand
Auto Trait Implementations§
impl Freeze for RunCommand
impl RefUnwindSafe for RunCommand
impl Send for RunCommand
impl Sync for RunCommand
impl Unpin for RunCommand
impl UnwindSafe for RunCommand
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self
file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self
file descriptor. Read more