pub struct Eligibility {
pub auto: Option<Auto>,
pub run_once: Option<bool>,
pub run_once_per_session: Option<bool>,
pub continuation: Option<bool>,
pub predicates: Vec<Predicate>,
pub logical_operator: Option<PredicateLogicalOperator>,
}Expand description
The conditions that determine when an activity should execute.
Fields§
§auto: Option<Auto>An object that automatically generates a boolean control setting and corresponding predicate.
run_once: Option<bool>Indicates whether the activity should run only once across all file/analysis sessions. Once the activity runs, its state is saved persistently, and it will not run again unless explicitly reset. This is useful for activities that only need to be performed exactly once, such as initial setup tasks.
run_once_per_session: Option<bool>Indicates whether the activity should run only once per session. Its state is not persisted, so it will run again in a new session. This is useful for activities that should be performed once per analysis session, such as initialization steps specific to a particular execution context.
continuation: Option<bool>Indicates if a subflow is eligible for re-execution based on its eligibility logic.
predicates: Vec<Predicate>Objects that define the condition that must be met for the activity to be eligible to run.
logical_operator: Option<PredicateLogicalOperator>Logical operator that defines how multiple predicates are combined.
Implementations§
Source§impl Eligibility
impl Eligibility
Sourcepub fn without_setting() -> Self
pub fn without_setting() -> Self
Creates a new instance without an automatically generated boolean control setting. The activity is eligible to run by default.
Sourcepub fn auto() -> Self
pub fn auto() -> Self
Creates a new instance with an automatically generated boolean control setting and corresponding predicate. The setting is enabled by default.
Sourcepub fn auto_with_default(value: bool) -> Self
pub fn auto_with_default(value: bool) -> Self
Creates a new instance with an automatically generated boolean control setting and corresponding predicate.
The setting has the value value by default.
Sourcepub fn run_once(self, value: bool) -> Self
pub fn run_once(self, value: bool) -> Self
Sets the run_once field, indicating whether the activity should run only once across all file/analysis sessions.
Sourcepub fn run_once_per_session(self, value: bool) -> Self
pub fn run_once_per_session(self, value: bool) -> Self
Sets the run_once_per_session field, indicating whether the activity should run only once per session.
Sourcepub fn continuation(self, value: bool) -> Self
pub fn continuation(self, value: bool) -> Self
Sets the continuation field, indicating whether a subflow is eligible for re-execution based on its eligibility logic.
Sourcepub fn predicate(self, predicate: impl Into<Predicate>) -> Self
pub fn predicate(self, predicate: impl Into<Predicate>) -> Self
Sets the predicate that must be satisfied for the activity to be eligible to run.
Sourcepub fn matching_any_predicate(self, predicates: &[Predicate]) -> Self
pub fn matching_any_predicate(self, predicates: &[Predicate]) -> Self
Sets the predicates that must be satisfied for the activity to be eligible to run. If multiple predicates are provided, they are combined using a logical OR.
Sourcepub fn matching_all_predicates(self, predicates: &[Predicate]) -> Self
pub fn matching_all_predicates(self, predicates: &[Predicate]) -> Self
Sets the predicates that must be satisfied for the activity to be eligible to run. If multiple predicates are provided, they are combined using a logical AND.
Trait Implementations§
Source§impl Debug for Eligibility
impl Debug for Eligibility
Source§impl Default for Eligibility
impl Default for Eligibility
Source§impl<'de> Deserialize<'de> for Eligibility
impl<'de> Deserialize<'de> for Eligibility
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Eligibility
impl RefUnwindSafe for Eligibility
impl Send for Eligibility
impl Sync for Eligibility
impl Unpin for Eligibility
impl UnwindSafe for Eligibility
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
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