pub struct GenerateModuleArgs {
pub name: String,
pub project_root: Option<PathBuf>,
pub force: bool,
pub auto_register: bool,
}Expand description
Decoded form of the g module subcommand.
Fields§
§name: StringModule name (e.g. posts). Must be a valid Rust identifier:
lowercase ASCII letters / digits / _, starting with a letter.
Hyphens are rejected — Rust modules use underscores.
project_root: Option<PathBuf>Override the project root. Defaults to walking up from cwd.
force: boolAllow overwriting mod.rs / handlers.rs if the module
directory already exists.
auto_register: boolTry to auto-insert .module(modules::<name>::define()) into
src/main.rs. When the patterns aren’t found, the caller falls
back to printing a manual hint.
Auto Trait Implementations§
impl Freeze for GenerateModuleArgs
impl RefUnwindSafe for GenerateModuleArgs
impl Send for GenerateModuleArgs
impl Sync for GenerateModuleArgs
impl Unpin for GenerateModuleArgs
impl UnsafeUnpin for GenerateModuleArgs
impl UnwindSafe for GenerateModuleArgs
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