Skip to main content

ModeArgs

Struct ModeArgs 

Source
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: PathBuf

Path to the Rust crate containing the WASM application

§port: u16

Port for the development server

§www_dir: String

Directory 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: bool

Create a development build. Enable debug info, and disable optimizations

§release: bool

Create a release build. Enable optimizations and disable debug info

§profiling: bool

Create a profiling build. Enable optimizations and debug info

§no_gitignore: bool

Remove 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

Source

pub fn get_crate_path(&self) -> &PathBuf

Source

pub fn get_mut_crate_path(&mut self) -> &mut PathBuf

Source

pub fn set_crate_path(&mut self, val: PathBuf) -> &mut Self

Source

pub fn get_port(&self) -> u16

Source

pub fn get_mut_port(&mut self) -> &mut u16

Source

pub fn set_port(&mut self, val: u16) -> &mut Self

Source

pub fn get_www_dir(&self) -> &String

Source

pub fn get_mut_www_dir(&mut self) -> &mut String

Source

pub fn set_www_dir(&mut self, val: String) -> &mut Self

Source

pub fn get_index_html(&self) -> PathBuf

Source

pub fn try_get_index_html(&self) -> &Option<PathBuf>

Source

pub fn get_mut_index_html(&mut self) -> &mut Option<PathBuf>

Source

pub fn set_index_html(&mut self, val: Option<PathBuf>) -> &mut Self

Source

pub fn get_dev(&self) -> bool

Source

pub fn get_mut_dev(&mut self) -> &mut bool

Source

pub fn set_dev(&mut self, val: bool) -> &mut Self

Source

pub fn get_release(&self) -> bool

Source

pub fn get_mut_release(&mut self) -> &mut bool

Source

pub fn set_release(&mut self, val: bool) -> &mut Self

Source

pub fn get_profiling(&self) -> bool

Source

pub fn get_mut_profiling(&mut self) -> &mut bool

Source

pub fn set_profiling(&mut self, val: bool) -> &mut Self

Source

pub fn get_no_gitignore(&self) -> bool

Source

pub fn get_mut_no_gitignore(&mut self) -> &mut bool

Source

pub fn set_no_gitignore(&mut self, val: bool) -> &mut Self

Source

pub fn get_wasm_pack_args(&self) -> &Vec<String>

Source

pub fn get_mut_wasm_pack_args(&mut self) -> &mut Vec<String>

Source

pub fn set_wasm_pack_args(&mut self, val: Vec<String>) -> &mut Self

Trait Implementations§

Source§

impl Args for ModeArgs

Source§

fn group_id() -> Option<Id>

Report the ArgGroup::id for this set of arguments
Source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

impl Clone for ModeArgs

Source§

fn clone(&self) -> ModeArgs

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl CommandFactory for ModeArgs

Source§

fn command<'b>() -> Command

Build a Command that can instantiate Self. Read more
Source§

fn command_for_update<'b>() -> Command

Build a Command that can update self. Read more
Source§

impl Debug for ModeArgs

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for ModeArgs

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

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>

Assign values from ArgMatches to self.
Source§

impl Parser for ModeArgs

Source§

fn parse() -> Self

Parse from std::env::args_os(), exit on error.
Source§

fn try_parse() -> Result<Self, Error>

Parse from std::env::args_os(), return Err on error.
Source§

fn parse_from<I, T>(itr: I) -> Self
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, exit on error.
Source§

fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, return Err on error.
Source§

fn update_from<I, T>(&mut self, itr: I)
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, exit on error. Read more
Source§

fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, return Err on error.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AnySend for T
where T: Any + Send,

Source§

impl<T> AnySendClone for T
where T: Any + Send + Clone,

Source§

impl<T> AnySendSync for T
where T: Any + Send + Sync,

Source§

impl<T> AnySendSyncClone for T
where T: Any + Send + Sync + Clone,

Source§

impl<T> AnySync for T
where T: Any + Sync,

Source§

impl<T> AnySyncClone for T
where T: Any + Sync + Clone,

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V