Struct randomx_rs::RandomXDataset
source · pub struct RandomXDataset { /* private fields */ }
Expand description
The Dataset is a read-only memory structure that is used during VM program execution.
Implementations§
source§impl RandomXDataset
impl RandomXDataset
sourcepub fn new(
flags: RandomXFlag,
cache: RandomXCache,
start: u32
) -> Result<RandomXDataset, RandomXError>
pub fn new( flags: RandomXFlag, cache: RandomXCache, start: u32 ) -> Result<RandomXDataset, RandomXError>
Creates a new dataset object, allocates memory to the dataset
object and initializes it.
flags
is one of the following:
- FLAG_DEFAULT
- FLAG_LARGE_PAGES
cache
is a cache object.
start
is the item number where initialization should start, recommended to pass in 0.
sourcepub fn count() -> Result<u32, RandomXError>
pub fn count() -> Result<u32, RandomXError>
Returns the number of items in the dataset
or an error on failure.
Trait Implementations§
source§impl Clone for RandomXDataset
impl Clone for RandomXDataset
source§fn clone(&self) -> RandomXDataset
fn clone(&self) -> RandomXDataset
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 RandomXDataset
impl !Send for RandomXDataset
impl !Sync for RandomXDataset
impl Unpin for RandomXDataset
impl UnwindSafe for RandomXDataset
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