diff options
Diffstat (limited to 'doc/args')
| -rw-r--r-- | doc/args/func.md | 4 | ||||
| -rw-r--r-- | doc/args/invoke.md | 8 | ||||
| -rw-r--r-- | doc/args/select_arm.md | 7 |
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 | |
