pub enum ThreadTarget {
Callable(CallableHandle),
Harness {
callable: CallableHandle,
adapter: Arc<dyn HarnessInputAdapter>,
},
}Expand description
What a thread invokes when an inbound message arrives.
Callable works for AgentRef, Team,
WorkflowStep, plain FnCallable
— anything that already implements the trait.
Harness is special: HarnessRef::call
ignores its input, so binding a harness via raw Callable would
silently drop every inbound message. Instead, the orchestrator
applies the inbound through a user-supplied HarnessInputAdapter
(which mutates whatever state the harness reads on its next run)
and then optionally triggers harness.run().
Variants§
Callable(CallableHandle)
Harness
Implementations§
Source§impl ThreadTarget
impl ThreadTarget
pub fn callable(handle: CallableHandle) -> Self
pub fn harness( callable: CallableHandle, adapter: Arc<dyn HarnessInputAdapter>, ) -> Self
pub fn label(&self) -> &str
pub fn kind(&self) -> &'static str
Trait Implementations§
Source§impl Clone for ThreadTarget
impl Clone for ThreadTarget
Source§fn clone(&self) -> ThreadTarget
fn clone(&self) -> ThreadTarget
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ThreadTarget
impl !UnwindSafe for ThreadTarget
impl Freeze for ThreadTarget
impl Send for ThreadTarget
impl Sync for ThreadTarget
impl Unpin for ThreadTarget
impl UnsafeUnpin for ThreadTarget
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