Skip to content

Commit 1a23a01

Browse files
Centaurus99BobAnkh
authored andcommitted
feat(model): add send to trace config and model
1 parent 27991e0 commit 1a23a01

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ pub type LossPattern = Vec<f64>;
146146
///
147147
/// The next_bw function either returns **the next bandwidth and its duration**
148148
/// in the sequence, or **None** if the trace goes to end.
149-
pub trait BwTrace {
149+
pub trait BwTrace: Send {
150150
fn next_bw(&mut self) -> Option<(Bandwidth, Duration)>;
151151
}
152152

@@ -161,7 +161,7 @@ pub trait BwTrace {
161161
///
162162
/// The next_delay function either returns **the next delay and its duration**
163163
/// in the sequence, or **None** if the trace goes to end.
164-
pub trait DelayTrace {
164+
pub trait DelayTrace: Send {
165165
fn next_delay(&mut self) -> Option<(Delay, Duration)>;
166166
}
167167

@@ -173,7 +173,7 @@ pub trait DelayTrace {
173173
///
174174
/// The next_loss function either returns **the next loss_pattern and its duration**
175175
/// in the sequence, or **None** if the trace goes to end.
176-
pub trait LossTrace {
176+
pub trait LossTrace: Send {
177177
fn next_loss(&mut self) -> Option<(LossPattern, Duration)>;
178178
}
179179

src/model/bw.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const DEFAULT_RNG_SEED: u64 = 42;
6969
/// separate the configuration part into a simple struct for serialization/deserialization, and
7070
/// construct the model from the configuration.
7171
#[cfg_attr(feature = "serde", typetag::serde)]
72-
pub trait BwTraceConfig: DynClone {
72+
pub trait BwTraceConfig: DynClone + Send {
7373
fn into_model(self: Box<Self>) -> Box<dyn BwTrace>;
7474
}
7575

src/model/delay.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ use dyn_clone::DynClone;
6363
/// separate the configuration part into a simple struct for serialization/deserialization, and
6464
/// construct the model from the configuration.
6565
#[cfg_attr(feature = "serde", typetag::serde)]
66-
pub trait DelayTraceConfig: DynClone {
66+
pub trait DelayTraceConfig: DynClone + Send {
6767
fn into_model(self: Box<Self>) -> Box<dyn DelayTrace>;
6868
}
6969

src/model/loss.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ use dyn_clone::DynClone;
6363
/// separate the configuration part into a simple struct for serialization/deserialization, and
6464
/// construct the model from the configuration.
6565
#[cfg_attr(feature = "serde", typetag::serde)]
66-
pub trait LossTraceConfig: DynClone {
66+
pub trait LossTraceConfig: DynClone + Send {
6767
fn into_model(self: Box<Self>) -> Box<dyn LossTrace>;
6868
}
6969

0 commit comments

Comments
 (0)