pub struct ThreadRef { /* private fields */ }Expand description
Implementations§
Source§impl ThreadRef
impl ThreadRef
pub fn from_arc(inner: Arc<RwLock<Thread>>) -> Self
pub fn new(thread: Thread) -> Self
pub fn read(&self) -> RwLockReadGuard<'_, Thread>
pub fn write(&self) -> RwLockWriteGuard<'_, Thread>
pub fn id(&self) -> ThreadId
pub fn snapshot(&self) -> Thread
Sourcepub fn synthetic_inbound(&self, text: String) -> InboundMessage
pub fn synthetic_inbound(&self, text: String) -> InboundMessage
Synthesize an inbound from a free-text string for ad-hoc callers
(mainly the Callable impl). Provider-driven inbound goes
through the orchestrator instead.
Trait Implementations§
Source§impl Callable for ThreadRef
Callable adapter — lets a thread be embedded anywhere a
Callable is expected.
impl Callable for ThreadRef
Callable adapter — lets a thread be embedded anywhere a
Callable is expected.
For ThreadTarget::Callable targets, we forward {"user": text, …}
envelopes that AgentRef::call already understands. For
ThreadTarget::Harness targets we call the wrapped callable (which
is HarnessRef); see crate::ThreadTarget.
Auto Trait Implementations§
impl !RefUnwindSafe for ThreadRef
impl !UnwindSafe for ThreadRef
impl Freeze for ThreadRef
impl Send for ThreadRef
impl Sync for ThreadRef
impl Unpin for ThreadRef
impl UnsafeUnpin for ThreadRef
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