Struct randomx_rust_wrapper::dataset::Dataset
source · pub struct Dataset { /* private fields */ }Implementations§
source§impl Dataset
impl Dataset
sourcepub fn new(global_nonce: &[u8], flags: RandomXFlags) -> RResult<Self>
pub fn new(global_nonce: &[u8], flags: RandomXFlags) -> RResult<Self>
Create a new database with provided global nonce and flags. Only RANDOMX_FLAG_LARGE_PAGES is supported (can be set or unset), it forces memory allocation in large pages.
sourcepub fn from_cache(cache: &Cache, large_pages_enabled: bool) -> RResult<Self>
pub fn from_cache(cache: &Cache, large_pages_enabled: bool) -> RResult<Self>
Creates a new database with the provided cache, large_pages_enabled forces it to allocate memory in large pages.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Dataset
impl !Send for Dataset
impl !Sync for Dataset
impl Unpin for Dataset
impl UnwindSafe for Dataset
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