pub struct MclEnvBuilder { /* private fields */ }Expand description
This structure is used to setup the MCL environment with the given parameters
§Examples
use mcl_rs::MclEnvBuilder;
let env = MclEnvBuilder::new()
.num_workers(10)
.bind_workers()
.initialize();Implementations§
Source§impl MclEnvBuilder
impl MclEnvBuilder
Sourcepub fn new() -> MclEnvBuilder
pub fn new() -> MclEnvBuilder
Creates and returns a new MclEnvBuilder with the default values
§Examples
use mcl_rs::MclEnvBuilder;
let env = MclEnvBuilder::new()
.initialize();Sourcepub fn num_workers(self, workers: usize) -> MclEnvBuilder
pub fn num_workers(self, workers: usize) -> MclEnvBuilder
Set the num_workers to pass to the mcl initialization function
§Examples
use mcl_rs::MclEnvBuilder;
let env = MclEnvBuilder::new()
.num_workers(1);Sourcepub fn bind_workers(self) -> MclEnvBuilder
pub fn bind_workers(self) -> MclEnvBuilder
Bind worker threads to their own core
§Examples
use mcl_rs::MclEnvBuilder;
let env = MclEnvBuilder::new()
.bind_workers();Sourcepub fn initialize(self) -> Mcl
pub fn initialize(self) -> Mcl
Auto Trait Implementations§
impl Freeze for MclEnvBuilder
impl RefUnwindSafe for MclEnvBuilder
impl Send for MclEnvBuilder
impl Sync for MclEnvBuilder
impl Unpin for MclEnvBuilder
impl UnwindSafe for MclEnvBuilder
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