pub enum DummyConfig {
Constant {
value: u64,
},
Uniform {
low: u64,
high: u64,
},
Normal {
mean: f64,
std_dev: f64,
},
Poisson {
lambda: f64,
},
}
Expand description
Dummy worker config options.
Dummy worker can submit the new block at any time. This controls the pace that how much time the worker must wait before submitting a new block.
Variants§
Constant
Waits for a constant delay.
Uniform
Waits for a time which is uniformly sampled from a range.
Fields
Normal
Picks the wait time from a normal distribution.
Poisson
Picks the wait time from a poisson distribution.
Trait Implementations§
Source§impl Clone for DummyConfig
impl Clone for DummyConfig
Source§fn clone(&self) -> DummyConfig
fn clone(&self) -> DummyConfig
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DummyConfig
impl Debug for DummyConfig
Source§impl<'de> Deserialize<'de> for DummyConfig
impl<'de> Deserialize<'de> for DummyConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for DummyConfig
impl PartialEq for DummyConfig
Source§impl Serialize for DummyConfig
impl Serialize for DummyConfig
impl StructuralPartialEq for DummyConfig
Auto Trait Implementations§
impl Freeze for DummyConfig
impl RefUnwindSafe for DummyConfig
impl Send for DummyConfig
impl Sync for DummyConfig
impl Unpin for DummyConfig
impl UnwindSafe for DummyConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more