pub struct Seed(/* private fields */);Expand description
Seed bytes derived from user input for deterministic fixtures.
Implementations§
Source§impl Seed
impl Seed
Sourcepub fn from_text(text: &str) -> Self
pub fn from_text(text: &str) -> Self
Derive a seed from plain text.
This hashes the provided text verbatim with BLAKE3. Unlike
Seed::from_env_value, it does not trim whitespace or interpret
64-character strings as hex.
Sourcepub fn fill_bytes(&self, dest: &mut [u8])
pub fn fill_bytes(&self, dest: &mut [u8])
Fill the destination buffer with deterministic bytes derived from this seed.
This keeps RNG implementation details private while allowing callers to derive stable byte sequences from seed material.
Sourcepub fn from_env_value(value: &str) -> Result<Self, String>
pub fn from_env_value(value: &str) -> Result<Self, String>
Derive a seed from a user-provided string.
Accepted formats:
- 64-char hex (with optional
0xprefix) - any other string (hashed with BLAKE3)
Trait Implementations§
impl Copy for Seed
impl Eq for Seed
impl StructuralPartialEq for Seed
Auto Trait Implementations§
impl Freeze for Seed
impl RefUnwindSafe for Seed
impl Send for Seed
impl Sync for Seed
impl Unpin for Seed
impl UnsafeUnpin for Seed
impl UnwindSafe for Seed
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