Struct randomx_rust_wrapper::vm::RandomXVM
source · pub struct RandomXVM<'state, T: 'state> { /* private fields */ }Implementations§
source§impl RandomXVM<'_, Cache>
impl RandomXVM<'_, Cache>
pub fn light(flags: RandomXFlags, cache: &Cache) -> RResult<Self>
sourcepub fn set_new_cache(&mut self, cache: &Cache)
pub fn set_new_cache(&mut self, cache: &Cache)
(from RandomX doc) Reinitializes a virtual machine with a new Cache. This function should be called anytime the Cache is reinitialized with a new key. Does nothing if called with a Cache containing the same key value as already set.
source§impl RandomXVM<'_, Dataset>
impl RandomXVM<'_, Dataset>
pub fn fast(flags: RandomXFlags, dataset: &Dataset) -> RResult<Self>
sourcepub fn set_new_dataset(&mut self, dataset: &Dataset)
pub fn set_new_dataset(&mut self, dataset: &Dataset)
Reinitializes a virtual machine with a new Dataset.
source§impl<T> RandomXVM<'_, T>
impl<T> RandomXVM<'_, T>
pub fn calculate_hash(&self, local_nonce: &[u8]) -> ResultHash
pub fn calculuate_hash_first(&self, local_nonce: &[u8])
pub fn calculuate_hash_next(&self, local_nonce: &[u8]) -> ResultHash
pub fn calculuate_hash_last(&self) -> ResultHash
Trait Implementations§
Auto Trait Implementations§
impl<'state, T> RefUnwindSafe for RandomXVM<'state, T>where
T: RefUnwindSafe,
impl<'state, T> !Send for RandomXVM<'state, T>
impl<'state, T> !Sync for RandomXVM<'state, T>
impl<'state, T> Unpin for RandomXVM<'state, T>
impl<'state, T> UnwindSafe for RandomXVM<'state, T>where
T: RefUnwindSafe,
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