pub struct EntropyFixture { /* private fields */ }Expand description
Handle used to derive deterministic high-entropy byte fixtures.
Implementations§
Source§impl EntropyFixture
impl EntropyFixture
Sourcepub fn bytes(&self, len: usize) -> Vec<u8> ⓘ
pub fn bytes(&self, len: usize) -> Vec<u8> ⓘ
Returns a deterministic byte buffer of the requested length.
Sourcepub fn bytes_with_variant(
&self,
len: usize,
variant: impl AsRef<str>,
) -> Vec<u8> ⓘ
pub fn bytes_with_variant( &self, len: usize, variant: impl AsRef<str>, ) -> Vec<u8> ⓘ
Returns a deterministic byte buffer for an explicit variant.
Sourcepub fn fill_bytes(&self, dest: &mut [u8])
pub fn fill_bytes(&self, dest: &mut [u8])
Fill an existing buffer with deterministic entropy.
Sourcepub fn fill_bytes_with_variant(&self, dest: &mut [u8], variant: impl AsRef<str>)
pub fn fill_bytes_with_variant(&self, dest: &mut [u8], variant: impl AsRef<str>)
Fill an existing buffer with deterministic entropy for an explicit variant.
Trait Implementations§
Source§impl Clone for EntropyFixture
impl Clone for EntropyFixture
Source§fn clone(&self) -> EntropyFixture
fn clone(&self) -> EntropyFixture
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for EntropyFixture
impl !UnwindSafe for EntropyFixture
impl Freeze for EntropyFixture
impl Send for EntropyFixture
impl Sync for EntropyFixture
impl Unpin for EntropyFixture
impl UnsafeUnpin for EntropyFixture
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