Skip to content

Commit

Permalink
Remove mention of function
Browse files Browse the repository at this point in the history
  • Loading branch information
mxinden committed Feb 24, 2023
1 parent a7be506 commit 12e61b6
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions docs/coding-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,22 +308,6 @@ response and a previous request. For example, if a user requests two new connect
peer, they should be able to match each new connection to the corresponding previous connection
request without having to guess.

When providing a **method** where the response to that method is delivered asynchronously through an
event, either synchronously return a request ID which is later on contained in the asynchronous
response event, or synchronously return a `Future` that eventually resolves into the response.

``` rust
fn my_method() -> Id {
// ...
}
```

``` rust
fn my_method() -> impl Future<Output = Response> {
// ...
}
```

When accepting a **command** that eventually results in a response through an event require that
command to contain a unique ID, which is later on contained in the asynchronous response event. One
such example is the `Swarm` accepting a `NetworkBehaviourAction::Dial` from the `NetworkBehaviour`.
Expand Down

0 comments on commit 12e61b6

Please sign in to comment.