pub struct RandomXCache { /* private fields */ }
Expand description
The Cache is used for light verification and Dataset construction.
Implementations§
Source§impl RandomXCache
impl RandomXCache
Sourcepub fn new(flags: RandomXFlag, key: &[u8]) -> Result<RandomXCache, RandomXError>
pub fn new(flags: RandomXFlag, key: &[u8]) -> Result<RandomXCache, RandomXError>
Creates and alllcates memory for a new cache object, and initializes it with the key value.
flags
is any combination of the following two flags:
- FLAG_LARGE_PAGES
- FLAG_JIT
and (optionally) one of the following flags (depending on instruction set supported):
- FLAG_ARGON2_SSSE3
- FLAG_ARGON2_AVX2
key
is a sequence of u8 used to initialize SuperScalarHash.
Trait Implementations§
Source§impl Clone for RandomXCache
impl Clone for RandomXCache
Source§fn clone(&self) -> RandomXCache
fn clone(&self) -> RandomXCache
Returns a copy 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 moreAuto Trait Implementations§
impl Freeze for RandomXCache
impl RefUnwindSafe for RandomXCache
impl Send for RandomXCache
impl Sync for RandomXCache
impl Unpin for RandomXCache
impl UnwindSafe for RandomXCache
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,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes