pub enum GraphEdge {
Fixed {
source: String,
target: String,
},
Conditional {
source: String,
router_name: String,
targets: HashMap<String, String>,
default_target: Option<String>,
},
FanOut {
source: String,
targets: Vec<String>,
},
FanIn {
sources: Vec<String>,
target: String,
},
}Expand description
Graph Edge enum
Represents a transition in the graph. Can be:
- Fixed: Always transitions to a specific node
- Conditional: Routes based on state via a routing function
Variants§
Fixed
Conditional
Fields
FanOut
FanOut edge: one source → multiple targets (parallel execution)
FanIn
FanIn edge: multiple sources → one target (join point)
Implementations§
Source§impl GraphEdge
impl GraphEdge
pub fn fixed(source: impl Into<String>, target: impl Into<String>) -> Self
pub fn conditional<R, T>( source: impl Into<String>, router_name: impl Into<String>, targets: HashMap<R, T>, default: Option<T>, ) -> Self
pub fn fan_out(source: impl Into<String>, targets: Vec<String>) -> Self
pub fn fan_in(sources: Vec<String>, target: impl Into<String>) -> Self
pub fn source(&self) -> &str
pub fn fixed_target(&self) -> Option<&str>
pub fn fan_out_targets(&self) -> Option<&Vec<String>>
pub fn fan_in_sources(&self) -> Option<&Vec<String>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GraphEdge
impl RefUnwindSafe for GraphEdge
impl Send for GraphEdge
impl Sync for GraphEdge
impl Unpin for GraphEdge
impl UnsafeUnpin for GraphEdge
impl UnwindSafe for GraphEdge
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