pub enum RandomSeed {
Int(BigInt),
Float(f64),
Str(String),
Bytes(Vec<u8>),
}Expand description
Explicit seeds for RandomStart::Seed, using CPython’s random.seed() semantics.
Variants§
Int(BigInt)
Any size; CPython seeds from the absolute value.
Float(f64)
Seeded from the float’s CPython hash().
Str(String)
Seeded from the SHA-512-extended text, as seed(str) does.
Bytes(Vec<u8>)
Seeded from the SHA-512-extended bytes, as seed(bytes) does.
Trait Implementations§
Source§impl Clone for RandomSeed
impl Clone for RandomSeed
Source§impl Debug for RandomSeed
impl Debug for RandomSeed
Source§impl<'de> Deserialize<'de> for RandomSeed
impl<'de> Deserialize<'de> for RandomSeed
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 RandomSeed
impl PartialEq for RandomSeed
Source§impl Serialize for RandomSeed
impl Serialize for RandomSeed
impl StructuralPartialEq for RandomSeed
Auto Trait Implementations§
impl Freeze for RandomSeed
impl RefUnwindSafe for RandomSeed
impl Send for RandomSeed
impl Sync for RandomSeed
impl Unpin for RandomSeed
impl UnsafeUnpin for RandomSeed
impl UnwindSafe for RandomSeed
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