We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Simulation::from_async_fn
1 parent 1d12c78 commit 687132fCopy full SHA for 687132f
round-based/src/simulation/mod.rs
@@ -235,6 +235,10 @@ where
235
/// Constructs a simulation with `n` parties from async function that defines the protocol
236
///
237
/// Each party has index `0 <= i < n` and instantiated via provided `init` function
238
+ ///
239
+ /// Async function will be converted into a [state machine](crate::state_machine). Because of that,
240
+ /// it cannot await on any futures that aren't provided by `MpcParty` (that is given as an argument
241
+ /// to this function).
242
pub fn from_async_fn<F>(
243
n: u16,
244
mut init: impl FnMut(u16, crate::state_machine::MpcParty<M>) -> F,
0 commit comments