binaryninja::workflow::activity

Struct Eligibility

source
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

source

pub fn without_setting() -> Self

Creates a new instance without an automatically generated boolean control setting. The activity is eligible to run by default.

source

pub fn auto() -> Self

Creates a new instance with an automatically generated boolean control setting and corresponding predicate. The setting is enabled by default.

source

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.

source

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.

source

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.

source

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.

source

pub fn predicate(self, predicate: impl Into<Predicate>) -> Self

Sets the predicate that must be satisfied for the activity to be eligible to run.

source

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.

source

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

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Eligibility

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Eligibility

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for Eligibility

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,