pub struct RunOptions {
pub sequential: bool,
pub continue_with_errors: bool,
pub max_diagnostics: Option<usize>,
}Expand description
How a run executes: on one thread or on several, whether the error gate may stop it, and how many diagnostics it keeps.
The error gate stops a run that has recorded an Error diagnostic, from
parsing or from the stages, before the first batch that holds a stage with
effects outside the store (Effect::Io;
Plan::first_io_batch), unless
continue_with_errors is set. A run
that the error gate stopped ends with the outcome
RunOutcome::HaltedAtGate (Run::outcome). Apart from the error gate,
these options do not change what is computed.
Pass the same options to every Run::step; Run::execute passes them
to each step it takes.
Fields§
§sequential: boolRuns all the work on one thread, even when the Cargo feature parallel
of flm-core is compiled in.
The result is the same either way. The sequential path is always
compiled, and it is the only one when flm-core is built without its
default Cargo features.
continue_with_errors: boolRuns the stages with effects outside the store even when the run has recorded Error diagnostics, instead of stopping at the error gate.
max_diagnostics: Option<usize>The number of diagnostics that the run keeps of those it produces
(the parse diagnostics have their own limit, set when parsing with
ParseOptions). None keeps the parser
toolkit’s default limit
(Diagnostics::DEFAULT_LIMIT).
Diagnostics past the limit are counted but not kept;
DiagnosticsView::any_recorded, DiagnosticsView::has_errors and
DiagnosticsView::error_count count them. The run reads this value
from the options of the first step only.
Implementations§
Source§impl RunOptions
impl RunOptions
Sourcepub fn new() -> RunOptions
pub fn new() -> RunOptions
Creates the default options: parallel when flm-core is built with the
Cargo feature parallel, stopping at the error gate, and the parser
toolkit’s default diagnostic limit.
Sourcepub fn sequential() -> RunOptions
pub fn sequential() -> RunOptions
Creates the default options, except that all the work runs on one thread.
Trait Implementations§
Source§impl Clone for RunOptions
impl Clone for RunOptions
Source§impl Debug for RunOptions
impl Debug for RunOptions
Source§impl Default for RunOptions
impl Default for RunOptions
impl Eq for RunOptions
Source§impl PartialEq for RunOptions
impl PartialEq for RunOptions
impl StructuralPartialEq for RunOptions
Auto Trait Implementations§
impl Forget for RunOptions
impl Freeze for RunOptions
impl Move for RunOptions
impl RefUnwindSafe for RunOptions
impl Send for RunOptions
impl Sync for RunOptions
impl Unpin for RunOptions
impl UnsafeUnpin for RunOptions
impl UnwindSafe for RunOptions
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
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> ⓘ
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