aboutsummaryrefslogtreecommitdiff
path: root/doc/args
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-07-23 08:08:33 +0800
committer魏曹先生 <1992414357@qq.com>2026-07-23 14:01:45 +0800
commit68a652ed2f51d366bb8033497e6dfe545895410e (patch)
treed463833846248410733e196a0939c59cd67ca8a2 /doc/args
feat: scaffold crate structure and implement core macros
Add the project skeleton, LICENSE files, README, Makefile, doc examples, and the initial implementation of `#[func]`, `invoke!`, and `select!` procedural macros.
Diffstat (limited to 'doc/args')
-rw-r--r--doc/args/func.md4
-rw-r--r--doc/args/invoke.md8
-rw-r--r--doc/args/select_arm.md7
3 files changed, 19 insertions, 0 deletions
diff --git a/doc/args/func.md b/doc/args/func.md
new file mode 100644
index 0000000..7d718a2
--- /dev/null
+++ b/doc/args/func.md
@@ -0,0 +1,4 @@
+Arguments parsed from the `#[func]` attribute.
+
+If the attribute is empty (`#[func]`), defaults to feature name `"async"`.
+When a string literal is provided (`#[func("tokio_rt")]`), that value is used.
diff --git a/doc/args/invoke.md b/doc/args/invoke.md
new file mode 100644
index 0000000..74a1823
--- /dev/null
+++ b/doc/args/invoke.md
@@ -0,0 +1,8 @@
+Arguments parsed by the `invoke!` macro.
+
+Two forms:
+
+| Variant | Form | Behavior |
+| ---------- | ------------------------- | ---------------------------------- |
+| `Default` | `invoke!(expr)` | Feature name defaults to `"async"` |
+| `Explicit` | `invoke!("feat" => expr)` | Uses the given feature name |
diff --git a/doc/args/select_arm.md b/doc/args/select_arm.md
new file mode 100644
index 0000000..c371d22
--- /dev/null
+++ b/doc/args/select_arm.md
@@ -0,0 +1,7 @@
+A single arm inside the `select!` macro.
+
+| Variant | Example | Meaning |
+| ---------- | ----------------- | ----------------------------------------------------- |
+| `Explicit` | `"async" => expr` | Arm guarded by `feature = "async"` |
+| `Not` | `! => expr` | Arm guarded by `not(feature = <other_arm's_feature>)` |
+| `Implicit` | `expr` | Feature determined by `.await` detection |