pub struct LobeNode { /* private fields */ }Expand description
Wraps a Lobe into a NodeFn<CognitiveState> for the cognitive graph.
Handles activation checking, budget enforcement, and output mapping. When the lobe is inactive, returns an empty update (zero cost).
§Example
ⓘ
let lobe: Arc<dyn Lobe> = Arc::new(MyCriticLobe::new(provider));
let node = LobeNode::new(lobe);
// Register as a node in the cognitive StateGraph
graph.add_node(node.name(), node);Implementations§
Trait Implementations§
Source§impl NodeFn<CognitiveState> for LobeNode
impl NodeFn<CognitiveState> for LobeNode
Source§fn call(
&self,
state: &CognitiveState,
ctx: &NodeContext,
) -> NodeFuture<CognitiveStateUpdate>
fn call( &self, state: &CognitiveState, ctx: &NodeContext, ) -> NodeFuture<CognitiveStateUpdate>
Execute the node with a state snapshot and execution context. Read more
Auto Trait Implementations§
impl Freeze for LobeNode
impl !RefUnwindSafe for LobeNode
impl Send for LobeNode
impl Sync for LobeNode
impl Unpin for LobeNode
impl UnsafeUnpin for LobeNode
impl !UnwindSafe for LobeNode
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