pub struct ReplicateExecutor { /* private fields */ }Expand description
Controller that dispatches the current executable once per declared replicate.
The initial process becomes the controller. Each child receives one reserved
environment variable and re-enters the same API as a replicate worker. The
caller runs scientific work only when Self::dispatch_current_executable
returns Some.
Implementations§
Source§impl ReplicateExecutor
impl ReplicateExecutor
Sourcepub fn new(settings: ReplicateSettings, output_root: impl Into<PathBuf>) -> Self
pub fn new(settings: ReplicateSettings, output_root: impl Into<PathBuf>) -> Self
Creates a dispatcher for validated settings and an application-resolved output root.
Sourcepub fn dispatch_current_executable(
&self,
) -> Result<Option<ReplicateContext>, ReplicateExecutionError>
pub fn dispatch_current_executable( &self, ) -> Result<Option<ReplicateContext>, ReplicateExecutionError>
Dispatches the current executable or enters one dispatched replicate.
The controller returns Ok(None) after every required child process has
completed successfully. A child returns Ok(Some(context)) immediately;
the application must perform exactly one study run using that context.
Original command-line arguments and inherited stdio are preserved.
Trait Implementations§
Source§impl Clone for ReplicateExecutor
impl Clone for ReplicateExecutor
Source§fn clone(&self) -> ReplicateExecutor
fn clone(&self) -> ReplicateExecutor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ReplicateExecutor
impl RefUnwindSafe for ReplicateExecutor
impl Send for ReplicateExecutor
impl Sync for ReplicateExecutor
impl Unpin for ReplicateExecutor
impl UnsafeUnpin for ReplicateExecutor
impl UnwindSafe for ReplicateExecutor
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,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more