...
This commit is contained in:
@@ -6,14 +6,10 @@ use mize::prelude::*;
|
||||
#[unsafe(no_mangle)]
|
||||
pub extern "C" fn part_cli() -> MizeResult<()> {
|
||||
|
||||
// Register methods of clap::Command with mize
|
||||
// Note: associated functions like `new` require arguments, so they're not included here
|
||||
// Use the block syntax to separate associated functions from methods:
|
||||
// include_native!("Command", clap::Command, {
|
||||
// associated: [some_associated_fn], // functions called as Type::fn()
|
||||
// methods: [arg, subcommand] // methods called as this.fn()
|
||||
// });
|
||||
include_native!("Command", clap::Command, []);
|
||||
include_native!("Command", clap::Command, {
|
||||
associated: [new(name: String)],
|
||||
//methods: [arg(arg: clap::Arg), subcommand(cmd: clap::Command)]
|
||||
});
|
||||
|
||||
opt("state")
|
||||
.fun(Box::new(|| {
|
||||
|
||||
Reference in New Issue
Block a user