pub struct ControlUnit {
pub node_id: u32,
pub strategy: RouterStrategy,
}Expand description
A Control Unit selects the next node(s) to execute based on the current execution state and policy constraints.
Fields§
§node_id: u32The node ID this control unit is attached to.
strategy: RouterStrategyStrategy for selecting the next node.
Implementations§
Source§impl ControlUnit
impl ControlUnit
Sourcepub fn new(node_id: u32, strategy: RouterStrategy) -> Self
pub fn new(node_id: u32, strategy: RouterStrategy) -> Self
Creates a new ControlUnit.
Sourcepub fn select_next(
&self,
pipeline: &DagPipeline,
channel_has_data: &dyn Fn(&str) -> bool,
) -> Vec<u32>
pub fn select_next( &self, pipeline: &DagPipeline, channel_has_data: &dyn Fn(&str) -> bool, ) -> Vec<u32>
Select the next node(s) to execute given the current pipeline state and channel data.
Auto Trait Implementations§
impl Freeze for ControlUnit
impl RefUnwindSafe for ControlUnit
impl Send for ControlUnit
impl Sync for ControlUnit
impl Unpin for ControlUnit
impl UnsafeUnpin for ControlUnit
impl UnwindSafe for ControlUnit
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
Mutably borrows from an owned value. Read more