pub struct Node<T: State> {
pub name: String,
pub function: NodeFunction<T>,
pub mcps: Vec<String>,
pub config: HashMap<String, Value>,
/* private fields */
}Expand description
A compiled node ready for execution.
This is created internally by the runtime when configuration is loaded.
Fields§
§name: StringNode name (identifier)
function: NodeFunction<T>The actual handler function to execute
mcps: Vec<String>MCP tools available to this node
config: HashMap<String, Value>Custom configuration
Implementations§
Source§impl<T: State> Node<T>
impl<T: State> Node<T>
Sourcepub fn new(
name: impl Into<String>,
function: NodeFunction<T>,
mcps: Vec<String>,
config: HashMap<String, Value>,
) -> Self
pub fn new( name: impl Into<String>, function: NodeFunction<T>, mcps: Vec<String>, config: HashMap<String, Value>, ) -> Self
Create a new compiled node.
Sourcepub fn new_placeholder(
name: impl Into<String>,
function: NodeFunction<T>,
mcps: Vec<String>,
config: HashMap<String, Value>,
) -> Self
pub fn new_placeholder( name: impl Into<String>, function: NodeFunction<T>, mcps: Vec<String>, config: HashMap<String, Value>, ) -> Self
Create a placeholder node (identity function that will be replaced via register_node).
Sourcepub fn new_planner(
name: impl Into<String>,
function: NodeFunction<T>,
mcps: Vec<String>,
config: HashMap<String, Value>,
) -> Self
pub fn new_planner( name: impl Into<String>, function: NodeFunction<T>, mcps: Vec<String>, config: HashMap<String, Value>, ) -> Self
Create a planner node (LLM-driven dynamic next-node selection).
Auto Trait Implementations§
impl<T> Freeze for Node<T>
impl<T> !RefUnwindSafe for Node<T>
impl<T> Send for Node<T>
impl<T> Sync for Node<T>
impl<T> Unpin for Node<T>
impl<T> UnsafeUnpin for Node<T>
impl<T> !UnwindSafe for Node<T>
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