pub struct ModeArgs {
pub crate_path: PathBuf,
pub port: u16,
pub www_dir: String,
pub index_html: Option<PathBuf>,
pub dev: bool,
pub release: bool,
pub profiling: bool,
pub no_gitignore: bool,
pub wasm_pack_args: Vec<String>,
}Expand description
euv-specific arguments combined with wasm-pack passthrough.
Only --crate-path, --port, --www-dir, --index-html, --no-gitignore, and --dev/--release/--profiling
belong to euv; everything in wasm_pack_args is forwarded to wasm-pack build as-is.
Fields§
§crate_path: PathBufPath to the Rust crate containing the WASM application
port: u16Port for the development server
www_dir: StringDirectory name for static assets and generated HTML (relative to crate-path)
index_html: Option<PathBuf>Path to a custom index.html template file.
When specified, uses this file instead of the built-in template.
The placeholders __IMPORT_PATH__ and __RELOAD_ROUTE__ will be replaced.
dev: boolCreate a development build. Enable debug info, and disable optimizations
release: boolCreate a release build. Enable optimizations and disable debug info
profiling: boolCreate a profiling build. Enable optimizations and debug info
no_gitignore: boolRemove the .gitignore file from the output directory after building
wasm_pack_args: Vec<String>Arguments transparently forwarded to wasm-pack build
Implementations§
Source§impl ModeArgs
impl ModeArgs
pub fn get_crate_path(&self) -> &PathBuf
pub fn get_mut_crate_path(&mut self) -> &mut PathBuf
pub fn set_crate_path(&mut self, val: PathBuf) -> &mut Self
pub fn get_port(&self) -> u16
pub fn get_mut_port(&mut self) -> &mut u16
pub fn set_port(&mut self, val: u16) -> &mut Self
pub fn get_www_dir(&self) -> &String
pub fn get_mut_www_dir(&mut self) -> &mut String
pub fn set_www_dir(&mut self, val: String) -> &mut Self
pub fn get_index_html(&self) -> PathBuf
pub fn try_get_index_html(&self) -> &Option<PathBuf>
pub fn get_mut_index_html(&mut self) -> &mut Option<PathBuf>
pub fn set_index_html(&mut self, val: Option<PathBuf>) -> &mut Self
pub fn get_dev(&self) -> bool
pub fn get_mut_dev(&mut self) -> &mut bool
pub fn set_dev(&mut self, val: bool) -> &mut Self
pub fn get_release(&self) -> bool
pub fn get_mut_release(&mut self) -> &mut bool
pub fn set_release(&mut self, val: bool) -> &mut Self
pub fn get_profiling(&self) -> bool
pub fn get_mut_profiling(&mut self) -> &mut bool
pub fn set_profiling(&mut self, val: bool) -> &mut Self
pub fn get_no_gitignore(&self) -> bool
pub fn get_mut_no_gitignore(&mut self) -> &mut bool
pub fn set_no_gitignore(&mut self, val: bool) -> &mut Self
pub fn get_wasm_pack_args(&self) -> &Vec<String>
pub fn get_mut_wasm_pack_args(&mut self) -> &mut Vec<String>
pub fn set_wasm_pack_args(&mut self, val: Vec<String>) -> &mut Self
Trait Implementations§
Source§impl Args for ModeArgs
impl Args for ModeArgs
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for ModeArgs
impl CommandFactory for ModeArgs
Source§impl FromArgMatches for ModeArgs
impl FromArgMatches for ModeArgs
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>
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>
ArgMatches to self.