pub struct ClassifyAndAct {
pub classifier: WorkflowNode,
pub branches: Vec<(String, WorkflowNode)>,
}Expand description
A classifier followed by labeled branches, exactly one of which runs.
This is conditional, so it is not a static DAG: the SDK runs the classifier, reads
its label, then routes to the single branch to spawn. The
kernel-side part is the routing table — no I/O.
Fields§
§classifier: WorkflowNode§branches: Vec<(String, WorkflowNode)>(label, action) branches; route matches a classifier label to its action.
Implementations§
Source§impl ClassifyAndAct
impl ClassifyAndAct
Sourcepub fn route(&self, label: &str) -> Option<&WorkflowNode>
pub fn route(&self, label: &str) -> Option<&WorkflowNode>
Return the branch action for a classifier label, if one matches.
Trait Implementations§
Source§impl Clone for ClassifyAndAct
impl Clone for ClassifyAndAct
Source§fn clone(&self) -> ClassifyAndAct
fn clone(&self) -> ClassifyAndAct
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ClassifyAndAct
impl RefUnwindSafe for ClassifyAndAct
impl Send for ClassifyAndAct
impl Sync for ClassifyAndAct
impl Unpin for ClassifyAndAct
impl UnsafeUnpin for ClassifyAndAct
impl UnwindSafe for ClassifyAndAct
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