pub enum SeedSource {
GetRandom,
Std,
MemoryAddress,
User,
Fixed,
}Expand description
Defines which source the seed was created from.
Variants§
GetRandom
The crate getrandom was used to create the seed from a high quality randomness source
of the operating system.
Std
The standard library was used to get a low quality randomness seed from three sources:
- Hash of the current time instance.
- Hashed thread ID.
- Memory Address.
MemoryAddress
Use a static memory address as a low randomness seed. If Address Space Layout Randomization (ASLR) is supported by the operating system, this should be a pretty “random” value.
User
Seed was provided by the user.
Fixed
Fixed value by the implementation.
Trait Implementations§
Source§impl Clone for SeedSource
impl Clone for SeedSource
Source§fn clone(&self) -> SeedSource
fn clone(&self) -> SeedSource
Returns a duplicate 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 SeedSource
impl Debug for SeedSource
Source§impl Hash for SeedSource
impl Hash for SeedSource
Source§impl PartialEq for SeedSource
impl PartialEq for SeedSource
impl Copy for SeedSource
impl Eq for SeedSource
impl StructuralPartialEq for SeedSource
Auto Trait Implementations§
impl Freeze for SeedSource
impl RefUnwindSafe for SeedSource
impl Send for SeedSource
impl Sync for SeedSource
impl Unpin for SeedSource
impl UnwindSafe for SeedSource
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