Struct randomx_rs::RandomXVM[][src]

pub struct RandomXVM { /* fields omitted */ }
Expand description

VM structure

Implementations

Creates a new VM and initializes it, error on failure.

flags is any combination of the following 5 flags:

  • FLAG_LARGE_PAGES
  • FLAG_HARD_AES
  • FLAG_FULL_MEM
  • FLAG_JIT
  • FLAG_SECURE

Or

  • FLAG_DEFAULT

cache is a cache object, optional if FLAG_FULL_MEM is set.

dataset is a dataset object, optional if FLAG_FULL_MEM is not set.

Re-initializes the VM with a new cache that was initialised without RandomXFlag::FLAG_FULL_MEM.

Re-initializes the VM with a new dataset that was initialised with RandomXFlag::FLAG_FULL_MEM.

Calculates a RandomX hash value and returns it, error on failure.

input is a sequence of u8 to be hashed.

Calculates hashes from a set of inputs.

input is an array of a sequence of u8 to be hashed.

Trait Implementations

Formats the value using the given formatter. Read more

De-allocates memory for the VM object.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.