aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-07-23 09:57:07 +0800
committer魏曹先生 <1992414357@qq.com>2026-07-23 09:57:07 +0800
commit68026594524480bdcaf3dd4c42e349f310ef8f93 (patch)
tree91ed081b668e8d5aec7adc00e89eeb00c50b201d /src/lib.rs
parentccaa29e78adb9fc74400dc23cc26985d25dc4f3b (diff)
23
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 4e184db..4ba2226 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -22,9 +22,17 @@ pub(crate) use syn::Result as SynResult;
///
/// The above code will be expanded into the following:
///
+/// Sync:
+///
/// ```
#[doc = include_str!("../doc/usage/func_expand.rs")]
/// ```
+///
+/// Async:
+///
+/// ```
+#[doc = include_str!("../doc/usage/func_async_expand.rs")]
+/// ```
#[proc_macro_attribute]
pub fn func(attr: TokenStream, item: TokenStream) -> TokenStream {
func::func(attr, item)
@@ -42,9 +50,17 @@ pub fn func(attr: TokenStream, item: TokenStream) -> TokenStream {
///
/// The above code will be expanded into the following:
///
+/// Sync:
+///
/// ```
#[doc = include_str!("../doc/usage/invoke_expand.rs")]
/// ```
+///
+/// Async:
+///
+/// ```
+#[doc = include_str!("../doc/usage/invoke_async_expand.rs")]
+/// ```
#[proc_macro]
pub fn invoke(input: TokenStream) -> TokenStream {
invoke::invoke(input)
@@ -62,9 +78,17 @@ pub fn invoke(input: TokenStream) -> TokenStream {
///
/// The above code will be expanded into the following:
///
+/// Sync:
+///
/// ```
#[doc = include_str!("../doc/usage/select_expand.rs")]
/// ```
+///
+/// Async:
+///
+/// ```
+#[doc = include_str!("../doc/usage/select_async_expand.rs")]
+/// ```
#[proc_macro]
pub fn select(input: TokenStream) -> TokenStream {
select::select(input)