Skip to content

Commit

Permalink
Clarify docs on Simulation::from_async_fn
Browse files Browse the repository at this point in the history
Signed-off-by: Denis Varlakov <[email protected]>
  • Loading branch information
survived committed Nov 27, 2024
1 parent 1d12c78 commit 687132f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions round-based/src/simulation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,10 @@ where
/// Constructs a simulation with `n` parties from async function that defines the protocol
///
/// Each party has index `0 <= i < n` and instantiated via provided `init` function
///
/// Async function will be converted into a [state machine](crate::state_machine). Because of that,
/// it cannot await on any futures that aren't provided by `MpcParty` (that is given as an argument
/// to this function).
pub fn from_async_fn<F>(
n: u16,
mut init: impl FnMut(u16, crate::state_machine::MpcParty<M>) -> F,
Expand Down

0 comments on commit 687132f

Please sign in to comment.