Struct randomx_rs::RandomXCache
source · 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 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