|
@@ -13,7 +13,7 @@ use tokio::time::Duration;
|
|
|
/// The set of Distributions we currently support for message sizes (in padding blocks).
|
|
|
/// To modify the code to add support for more, one approach is to first add them here,
|
|
|
/// then fix all the compiler errors and warnings that arise as a result.
|
|
|
-#[derive(Debug)]
|
|
|
+#[derive(Clone, Debug)]
|
|
|
pub enum MessageDistribution {
|
|
|
// Poisson is only defined for floats for technical reasons.
|
|
|
// https://rust-random.github.io/book/guide-dist.html#integers
|
|
@@ -40,7 +40,7 @@ impl Distribution<u32> for MessageDistribution {
|
|
|
/// The set of Distributions we currently support for timings.
|
|
|
/// To modify the code to add support for more, one approach is to first add them here,
|
|
|
/// then fix all the compiler errors and warnings that arise as a result.
|
|
|
-#[derive(Debug)]
|
|
|
+#[derive(Clone, Debug)]
|
|
|
pub enum TimingDistribution {
|
|
|
Normal(Normal<f64>),
|
|
|
LogNormal(LogNormal<f64>),
|
|
@@ -65,7 +65,7 @@ impl Distribution<f64> for TimingDistribution {
|
|
|
}
|
|
|
|
|
|
/// The set of distributions necessary to represent the actions of the state machine.
|
|
|
-#[derive(Debug)]
|
|
|
+#[derive(Clone, Debug)]
|
|
|
pub struct Distributions {
|
|
|
pub m: MessageDistribution,
|
|
|
pub i: TimingDistribution,
|