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 Freeze for RandomXDataset
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
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