pub struct GraphEdge {
pub from: String,
pub to: String,
pub condition: Option<EdgeCondition>,
pub metadata: HashMap<String, String>,
}Expand description
An edge in the StateGraph — connects two nodes with optional routing condition.
Edges can be:
- Unconditional: always followed after the source node completes
- Conditional: followed only if the condition evaluates to true
- Cyclic: the target node can be an ancestor (forming a loop)
Fields§
§from: StringThe source node ID.
to: StringThe target node ID.
condition: Option<EdgeCondition>The condition for following this edge (None = unconditional).
metadata: HashMap<String, String>Edge metadata.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GraphEdge
impl<'de> Deserialize<'de> for GraphEdge
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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