pub struct Send {
pub node: String,
pub state: Value,
}Expand description
A Send instruction for dynamic fan-out to multiple nodes.
In LangGraph, Send allows conditional edges to dispatch work to
multiple nodes in parallel, each receiving a different state payload.
This is useful for map-reduce patterns where a single node’s output
needs to be processed by multiple downstream nodes concurrently.
This is currently a placeholder type for future fan-out support.
The type is defined and exported so that user code can start
referencing it, but the actual parallel dispatch is not yet
implemented in CompiledGraph.
§Example (future API)
ⓘ
use synaptic_graph::Send;
// In a conditional edge router, return multiple Send instructions
// to fan out to different nodes with different state payloads:
let sends = vec![
Send::new("process_chunk", serde_json::json!({"chunk": "part1"})),
Send::new("process_chunk", serde_json::json!({"chunk": "part2"})),
];Fields§
§node: StringThe target node to send work to.
state: ValueThe state payload to pass to the target node (serialized as JSON).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Send
impl RefUnwindSafe for Send
impl Send for Send
impl Sync for Send
impl Unpin for Send
impl UnsafeUnpin for Send
impl UnwindSafe for Send
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