pub struct NewModuleArgs {
pub name: String,
pub path: Option<PathBuf>,
pub shape: ModuleShape,
}Expand description
whisker new-module CLI arguments.
Fields§
§name: StringThe cargo crate name. Convention: kebab-case, prefixed with
whisker- (e.g. whisker-camera, whisker-blur-view). Must
be a valid cargo package name — letters / digits / - / _,
must start with a letter.
path: Option<PathBuf>Optional parent directory. Defaults to the current working
directory. The new crate lands at <parent>/<name>/.
shape: ModuleShapeModule shape. view-bearing (the default) generates a
#[whisker::module_component] shim + a DSL module with a
View(...) block and a WhiskerUI<View> subclass.
function-only generates a #[whisker::platform_module]
proxy + a DSL module with module-level Functions and no
View(...) — for modules that only expose function calls
(e.g. whisker-local-store-style key-value stores).
Trait Implementations§
Source§impl Args for NewModuleArgs
impl Args for NewModuleArgs
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
Append to
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl Debug for NewModuleArgs
impl Debug for NewModuleArgs
Source§impl FromArgMatches for NewModuleArgs
impl FromArgMatches for NewModuleArgs
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.Auto Trait Implementations§
impl Freeze for NewModuleArgs
impl RefUnwindSafe for NewModuleArgs
impl Send for NewModuleArgs
impl Sync for NewModuleArgs
impl Unpin for NewModuleArgs
impl UnsafeUnpin for NewModuleArgs
impl UnwindSafe for NewModuleArgs
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more