simulon 0.0.8

A simulation engine for distributed algorithms
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::state::with_node;

/// Emit an event from the node. This is part of the metric API and allows you to collect
/// information about when the nodes reach a certain point in the simulation, hence using
/// the same key is not supported.
///
/// # Panics
///
/// If the event has already been emitted on the same node.
pub fn emit(key: impl Into<String>) {
    with_node(|n| n.emit(key.into()));
}