pub struct ExecutionMask(/* private fields */);Expand description
Execution options (ExecMask_*), the mask behind the Execution page of
the Station Options dialog.
Each checkbox on that page is one bit here, so the mask is how a headless host configures debugging and tracing without a sequence editor.
Tracing has two independent controls, and confusing them is the usual mistake:
- Whether tracing happens,
Self::TRACING_ENABLEDplus theTRACE_INTO_*bits that widen its reach. - How fast it runs, not in this mask at all. That is the Speed
slider, which is
StationOptions::ui_message_delay: milliseconds between trace postings. See that method for the scale.
use rs_teststand::ExecutionMask;
// Headless: keep tracing, drop everything that can stop an execution.
let unattended = ExecutionMask::DEFAULT.difference(
ExecutionMask::BREAKPOINTS_ENABLED
| ExecutionMask::BREAK_ON_RUN_TIME_ERROR
| ExecutionMask::BREAK_WHILE_TERMINATING
| ExecutionMask::ALLOW_BREAK_WHILE_IN_CODE_MODULES,
);
assert!(!unattended.contains(ExecutionMask::BREAKPOINTS_ENABLED));Implementations§
Source§impl ExecutionMask
impl ExecutionMask
Sourcepub const BREAKPOINTS_ENABLED: Self
pub const BREAKPOINTS_ENABLED: Self
Breakpoints are honoured (ExecMask_BreakpointsEnabled).
A breakpoint suspends the execution until an operator resumes it, so this bit is the first to clear on an unattended station.
Sourcepub const BREAK_WHILE_TERMINATING: Self
pub const BREAK_WHILE_TERMINATING: Self
Breakpoints are still honoured while terminating
(ExecMask_BreakWhileTerminating).
Sourcepub const BREAK_ON_RUN_TIME_ERROR: Self
pub const BREAK_ON_RUN_TIME_ERROR: Self
A run-time error breaks into the debugger
(ExecMask_BreakOnRunTimeError).
Clear this on an unattended station and let
StationOptions::set_rte_option
decide what happens instead.
Sourcepub const TRACING_ENABLED: Self
pub const TRACING_ENABLED: Self
Tracing is on (ExecMask_TracingEnabled).
Sourcepub const TRACE_INTO_SETUP_CLEANUP: Self
pub const TRACE_INTO_SETUP_CLEANUP: Self
Trace into Setup and Cleanup step groups
(ExecMask_TraceIntoSetupCleanup).
Sourcepub const TRACE_INTO_PRE_POST_CALLBACKS: Self
pub const TRACE_INTO_PRE_POST_CALLBACKS: Self
Trace into pre- and post-step callbacks
(ExecMask_TraceIntoPrePostCallbacks).
Sourcepub const TRACE_INTO_POST_ACTION_CALLBACKS: Self
pub const TRACE_INTO_POST_ACTION_CALLBACKS: Self
Trace into post-action callbacks
(ExecMask_TraceIntoPostActionCallbacks).
Sourcepub const TRACE_INTO_SEPARATE_EXECUTION_CALLBACKS: Self
pub const TRACE_INTO_SEPARATE_EXECUTION_CALLBACKS: Self
Trace into separate-execution callbacks
(ExecMask_TraceIntoSeparateExecutionCallbacks).
Sourcepub const TRACE_INTO_ENTRY_POINTS: Self
pub const TRACE_INTO_ENTRY_POINTS: Self
Trace into entry points (ExecMask_TraceIntoEntryPoints).
Sourcepub const TRACE_INTO_SEQUENCE_CALLS_MARKED_AS_TRACE_OFF: Self
pub const TRACE_INTO_SEQUENCE_CALLS_MARKED_AS_TRACE_OFF: Self
Trace into sequence calls whose tracing is switched off
(ExecMask_TraceIntoSequenceCallsMarkedAsTraceOff).
Sourcepub const TRACE_WHILE_TERMINATING: Self
pub const TRACE_WHILE_TERMINATING: Self
Keep tracing while an execution terminates
(ExecMask_TraceWhileTerminating).
Sourcepub const TRACE_ALL_THREADS: Self
pub const TRACE_ALL_THREADS: Self
Trace every thread (ExecMask_TraceAllThreads).
The most expensive tracing bit on a parallel station: every thread posts trace messages, and each posting is paced by the Speed setting.
Sourcepub const INTERACTIVE_RECORD_RESULTS: Self
pub const INTERACTIVE_RECORD_RESULTS: Self
Interactive executions record results
(ExecMask_InteractiveRecordResults).
Sourcepub const INTERACTIVE_RUN_SETUP_CLEANUP: Self
pub const INTERACTIVE_RUN_SETUP_CLEANUP: Self
Interactive executions run Setup and Cleanup
(ExecMask_InteractiveRunSetupCleanup).
Sourcepub const INTERACTIVE_EVALUATE_PRECONDITIONS: Self
pub const INTERACTIVE_EVALUATE_PRECONDITIONS: Self
Interactive executions evaluate preconditions
(ExecMask_InteractiveEvaluatePreconditions).
Sourcepub const ALLOW_BREAK_WHILE_IN_CODE_MODULES: Self
pub const ALLOW_BREAK_WHILE_IN_CODE_MODULES: Self
Allow breaking while inside a code module
(ExecMask_AllowBreakWhileInCodeModules).
Source§impl ExecutionMask
impl ExecutionMask
Sourcepub const fn bits(&self) -> i32
pub const fn bits(&self) -> i32
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
Sourcepub const fn from_bits(bits: i32) -> Option<Self>
pub const fn from_bits(bits: i32) -> Option<Self>
Convert from a bits value.
This method will return None if any unknown bits are set.
Sourcepub const fn from_bits_truncate(bits: i32) -> Self
pub const fn from_bits_truncate(bits: i32) -> Self
Convert from a bits value, unsetting any unknown bits.
Sourcepub const fn from_bits_retain(bits: i32) -> Self
pub const fn from_bits_retain(bits: i32) -> Self
Convert from a bits value exactly.
Sourcepub fn from_name(name: &str) -> Option<Self>
pub fn from_name(name: &str) -> Option<Self>
Get a flags value with the bits of a flag with the given name set.
This method will return None if name is empty or doesn’t
correspond to any named flag.
Sourcepub const fn intersects(&self, other: Self) -> bool
pub const fn intersects(&self, other: Self) -> bool
Whether any set bits in other are also set in self.
Sourcepub const fn contains(&self, other: Self) -> bool
pub const fn contains(&self, other: Self) -> bool
Whether all set bits in other are also set in self.
Sourcepub fn remove(&mut self, other: Self)
pub fn remove(&mut self, other: Self)
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
remove won’t truncate other, but the ! operator will.
Sourcepub fn toggle(&mut self, other: Self)
pub fn toggle(&mut self, other: Self)
The bitwise exclusive-or (^) of the bits in self and other.
Sourcepub fn set(&mut self, other: Self, value: bool)
pub fn set(&mut self, other: Self, value: bool)
Call insert when value is true or remove when value is false.
Sourcepub const fn intersection(self, other: Self) -> Self
pub const fn intersection(self, other: Self) -> Self
The bitwise and (&) of the bits in self and other.
Sourcepub const fn union(self, other: Self) -> Self
pub const fn union(self, other: Self) -> Self
The bitwise or (|) of the bits in self and other.
Sourcepub const fn difference(self, other: Self) -> Self
pub const fn difference(self, other: Self) -> Self
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Sourcepub const fn symmetric_difference(self, other: Self) -> Self
pub const fn symmetric_difference(self, other: Self) -> Self
The bitwise exclusive-or (^) of the bits in self and other.
Sourcepub const fn complement(self) -> Self
pub const fn complement(self) -> Self
The bitwise negation (!) of the bits in self, truncating the result.
Source§impl ExecutionMask
impl ExecutionMask
Sourcepub const fn iter(&self) -> Iter<ExecutionMask>
pub const fn iter(&self) -> Iter<ExecutionMask>
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
Sourcepub const fn iter_names(&self) -> IterNames<ExecutionMask>
pub const fn iter_names(&self) -> IterNames<ExecutionMask>
Yield a set of contained named flags values.
This method is like iter, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementations§
Source§impl Binary for ExecutionMask
impl Binary for ExecutionMask
Source§impl BitAnd for ExecutionMask
impl BitAnd for ExecutionMask
Source§impl BitAndAssign for ExecutionMask
impl BitAndAssign for ExecutionMask
Source§fn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
The bitwise and (&) of the bits in self and other.
Source§impl BitOr for ExecutionMask
impl BitOr for ExecutionMask
Source§fn bitor(self, other: ExecutionMask) -> Self
fn bitor(self, other: ExecutionMask) -> Self
The bitwise or (|) of the bits in self and other.
Source§type Output = ExecutionMask
type Output = ExecutionMask
| operator.Source§impl BitOrAssign for ExecutionMask
impl BitOrAssign for ExecutionMask
Source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
The bitwise or (|) of the bits in self and other.
Source§impl BitXor for ExecutionMask
impl BitXor for ExecutionMask
Source§impl BitXorAssign for ExecutionMask
impl BitXorAssign for ExecutionMask
Source§fn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
The bitwise exclusive-or (^) of the bits in self and other.
Source§impl Clone for ExecutionMask
impl Clone for ExecutionMask
Source§fn clone(&self) -> ExecutionMask
fn clone(&self) -> ExecutionMask
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ExecutionMask
Source§impl Debug for ExecutionMask
impl Debug for ExecutionMask
Source§impl Default for ExecutionMask
impl Default for ExecutionMask
Source§fn default() -> ExecutionMask
fn default() -> ExecutionMask
impl Eq for ExecutionMask
Source§impl Extend<ExecutionMask> for ExecutionMask
impl Extend<ExecutionMask> for ExecutionMask
Source§fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
The bitwise or (|) of the bits in each flags value.
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl Flags for ExecutionMask
impl Flags for ExecutionMask
Source§const FLAGS: &'static [Flag<ExecutionMask>]
const FLAGS: &'static [Flag<ExecutionMask>]
Source§fn from_bits_retain(bits: i32) -> ExecutionMask
fn from_bits_retain(bits: i32) -> ExecutionMask
Source§fn all_named() -> ExecutionMask
fn all_named() -> ExecutionMask
Source§fn known_bits(&self) -> Self::Bits
fn known_bits(&self) -> Self::Bits
Source§fn unknown_bits(&self) -> Self::Bits
fn unknown_bits(&self) -> Self::Bits
Source§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true if any unknown bits are set.Source§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
Source§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
Source§fn iter_names(&self) -> IterNames<Self>
fn iter_names(&self) -> IterNames<Self>
Source§fn iter_defined_names() -> IterDefinedNames<Self>
fn iter_defined_names() -> IterDefinedNames<Self>
Self::FLAGS.Source§fn iter_equal_names(&self) -> IterEqualNames<Self>
fn iter_equal_names(&self) -> IterEqualNames<Self>
Source§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.Source§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.Source§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|) of the bits in self and other.Source§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^) of the bits in self and other.Source§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&) of the bits in self and other.Source§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
Source§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^) of the bits in self and other.Source§fn complement(self) -> Self
fn complement(self) -> Self
!) of the bits in self, truncating the result.Source§impl FromIterator<ExecutionMask> for ExecutionMask
impl FromIterator<ExecutionMask> for ExecutionMask
Source§fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
The bitwise or (|) of the bits in each flags value.
Source§impl Hash for ExecutionMask
impl Hash for ExecutionMask
Source§impl IntoIterator for ExecutionMask
impl IntoIterator for ExecutionMask
Source§impl LowerHex for ExecutionMask
impl LowerHex for ExecutionMask
Source§impl Not for ExecutionMask
impl Not for ExecutionMask
Source§impl Octal for ExecutionMask
impl Octal for ExecutionMask
Source§impl PartialEq for ExecutionMask
impl PartialEq for ExecutionMask
Source§impl PublicFlags for ExecutionMask
impl PublicFlags for ExecutionMask
impl StructuralPartialEq for ExecutionMask
Source§impl Sub for ExecutionMask
impl Sub for ExecutionMask
Source§fn sub(self, other: Self) -> Self
fn sub(self, other: Self) -> Self
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Source§type Output = ExecutionMask
type Output = ExecutionMask
- operator.Source§impl SubAssign for ExecutionMask
impl SubAssign for ExecutionMask
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.