Struct binaryninja::workflow::Workflow
source · pub struct Workflow { /* private fields */ }
Implementations§
source§impl Workflow
impl Workflow
sourcepub fn new<S: BnStrCompatible>(name: S) -> Self
pub fn new<S: BnStrCompatible>(name: S) -> Self
Create a new unregistered Workflow with no activities.
To get a copy of an existing registered Workflow use Workflow::new_from_copy.
sourcepub fn new_from_copy<S: BnStrCompatible + Clone>(name: S) -> Workflow
pub fn new_from_copy<S: BnStrCompatible + Clone>(name: S) -> Workflow
sourcepub fn new_from_copy_with_root<S: BnStrCompatible + Clone, A: IntoActivityName>(
name: S,
root_activity: A
) -> Workflow
pub fn new_from_copy_with_root<S: BnStrCompatible + Clone, A: IntoActivityName>( name: S, root_activity: A ) -> Workflow
pub fn instance<S: BnStrCompatible>(name: S) -> Workflow
pub fn name(&self) -> BnString
sourcepub fn register(&self) -> Result<(), ()>
pub fn register(&self) -> Result<(), ()>
Register this Workflow, making it immutable and available for use.
sourcepub fn register_with_config<S: BnStrCompatible>(
&self,
config: S
) -> Result<(), ()>
pub fn register_with_config<S: BnStrCompatible>( &self, config: S ) -> Result<(), ()>
Register this Workflow, making it immutable and available for use.
configuration
- a JSON representation of the workflow configuration
sourcepub fn register_activity_with_subactivities<I>(
&self,
activity: &Activity,
subactivities: I
) -> Result<Activity, ()>
pub fn register_activity_with_subactivities<I>( &self, activity: &Activity, subactivities: I ) -> Result<Activity, ()>
sourcepub fn contains<A: IntoActivityName>(&self, activity: A) -> bool
pub fn contains<A: IntoActivityName>(&self, activity: A) -> bool
Determine if an Activity exists in this Workflow.
sourcepub fn configuration<A: IntoActivityName>(&self, activity: A) -> BnString
pub fn configuration<A: IntoActivityName>(&self, activity: A) -> BnString
Retrieve the configuration as an adjacency list in JSON for the
Workflow, or if specified just for the given activity
.
activity
- if specified, return the configuration for the activity
sourcepub fn registered(&self) -> bool
pub fn registered(&self) -> bool
pub fn size(&self) -> usize
sourcepub fn activity<A: BnStrCompatible>(&self, name: A) -> Option<Activity>
pub fn activity<A: BnStrCompatible>(&self, name: A) -> Option<Activity>
Retrieve the Activity object for the specified name
.
sourcepub fn activity_roots<A: IntoActivityName>(
&self,
activity: A
) -> Array<BnString>
pub fn activity_roots<A: IntoActivityName>( &self, activity: A ) -> Array<BnString>
Retrieve the list of activity roots for the Workflow, or if
specified just for the given activity
.
activity
- if specified, return the roots for theactivity
sourcepub fn subactivities<A: IntoActivityName>(
&self,
activity: A,
immediate: bool
) -> Array<BnString>
pub fn subactivities<A: IntoActivityName>( &self, activity: A, immediate: bool ) -> Array<BnString>
Retrieve the list of all activities, or optionally a filtered list.
activity
- if specified, return the direct children and optionally the descendants of theactivity
(includesactivity
)immediate
- whether to include only direct children ofactivity
or all descendants
sourcepub fn assign_subactivities<A, I>(&self, activity: A, activities: I) -> bool
pub fn assign_subactivities<A, I>(&self, activity: A, activities: I) -> bool
Assign the list of activities
as the new set of children for the specified activity
.
activity
- the Activity node to assign childrenactivities
- the list of Activities to assign
sourcepub fn insert<A, I>(&self, activity: A, activities: I) -> bool
pub fn insert<A, I>(&self, activity: A, activities: I) -> bool
Insert the list of activities
before the specified activity
and at the same level.
activity
- the Activity node for which to insertactivities
beforeactivities
- the list of Activities to insert
sourcepub fn remove<A: IntoActivityName>(&self, activity: A) -> bool
pub fn remove<A: IntoActivityName>(&self, activity: A) -> bool
Remove the specified activity
sourcepub fn replace<A: IntoActivityName, N: IntoActivityName>(
&self,
activity: A,
new_activity: N
) -> bool
pub fn replace<A: IntoActivityName, N: IntoActivityName>( &self, activity: A, new_activity: N ) -> bool
Replace the specified activity
.
activity
- the Activity to replacenew_activity
- the replacement Activity
sourcepub fn graph<A: IntoActivityName>(
&self,
activity: A,
sequential: Option<bool>
) -> Option<FlowGraph>
pub fn graph<A: IntoActivityName>( &self, activity: A, sequential: Option<bool> ) -> Option<FlowGraph>
Generate a FlowGraph object for the current Workflow and optionally show it in the UI.
activity
- if specified, generate the Flowgraph usingactivity
as the rootsequential
- whether to generate a Composite or Sequential style graph
sourcepub fn show_metrics(&self)
pub fn show_metrics(&self)
Not yet implemented.
sourcepub fn show_topology(&self)
pub fn show_topology(&self)
Show the Workflow topology in the UI.
sourcepub fn show_trace(&self)
pub fn show_trace(&self)
Not yet implemented.