Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2c0e75a

Browse files
authored
feat(rust/async-dyn-dispatch): Snippets for async Rust functions (rafamadriz#471)
* adding snippets for rust async functions and dynamic dispatch with Box<dyn T>* remove box-dyn snippet---------Co-authored-by: Renan Vieira <2496686+renanvieira@users.noreply.github.com>
1 parent6821579 commit2c0e75a

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

‎snippets/rust/rust.json‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,5 +397,23 @@
397397
"prefix":"while",
398398
"body": ["while ${1:condition} {"," ${2:todo!();}","}"],
399399
"description":"while … { … }"
400+
},
401+
"pafn": {
402+
"prefix":"pafn",
403+
"body": [
404+
"pub async fn ${1:name}(${2:arg}: ${3:Type}) -> ${4:RetType} {",
405+
" ${5:todo!();}",
406+
"}"
407+
],
408+
"description":"pub async fn …(…) { … }"
409+
},
410+
"afn": {
411+
"prefix":"afn",
412+
"body": [
413+
"async fn ${1:name}(${2:arg}: ${3:Type}) -> ${4:RetType} {",
414+
" ${5:todo!();}",
415+
"}"
416+
],
417+
"description":"async fn …(…) { … }"
400418
}
401419
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp