pub enum RandomGeneration {
Disabled,
Enabled,
EnabledWithSeed(u64),
}Expand description
This specifies if e. g. a test is allowed to generate new random numbers in addition to (maybe) predefined ones.
This is independent of predefined (fixed) random numbers and only influences if the test is stopped if it requests more random numbers then provided or if the request is satisfied.
Variants§
Disabled
(default) disable all random number generation capabilities.
Enabled
enable generation of new random numbers
EnabledWithSeed(u64)
enable generation of new random numbers and use the specified seed for reproducible results (as long as the implementation doesn’t change)
See rand::SeedableRng::seed_from_u64
for the function that will likely be used with this value
Trait Implementations§
Source§impl Clone for RandomGeneration
impl Clone for RandomGeneration
Source§fn clone(&self) -> RandomGeneration
fn clone(&self) -> RandomGeneration
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RandomGeneration
impl Debug for RandomGeneration
Source§impl Default for RandomGeneration
impl Default for RandomGeneration
Source§fn default() -> RandomGeneration
fn default() -> RandomGeneration
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RandomGeneration
impl<'de> Deserialize<'de> for RandomGeneration
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 RandomGeneration
impl PartialEq for RandomGeneration
Source§fn eq(&self, other: &RandomGeneration) -> bool
fn eq(&self, other: &RandomGeneration) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for RandomGeneration
impl Serialize for RandomGeneration
impl StructuralPartialEq for RandomGeneration
Auto Trait Implementations§
impl Freeze for RandomGeneration
impl RefUnwindSafe for RandomGeneration
impl Send for RandomGeneration
impl Sync for RandomGeneration
impl Unpin for RandomGeneration
impl UnsafeUnpin for RandomGeneration
impl UnwindSafe for RandomGeneration
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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