pub struct MessageSender { /* private fields */ }Expand description
A clonable handle for pushing messages into a ChannelMessageProvider.
Obtained from message_channel. Messages sent through this handle are
delivered as follow-up messages by default. Use send_steering
to inject steering messages instead.
Implementations§
Source§impl MessageSender
impl MessageSender
Sourcepub fn send_steering(&self, message: AgentMessage) -> bool
pub fn send_steering(&self, message: AgentMessage) -> bool
Push a steering message to the agent.
Steering messages are polled after each tool execution batch and can interrupt in-progress tool calls.
Returns false if the receiver has been dropped.
Sourcepub fn send_follow_up(&self, message: AgentMessage) -> bool
pub fn send_follow_up(&self, message: AgentMessage) -> bool
Push a follow-up message to the agent.
Follow-up messages are polled when the agent would otherwise stop, triggering another outer-loop iteration.
Returns false if the receiver has been dropped.
Sourcepub fn send(&self, message: AgentMessage) -> bool
pub fn send(&self, message: AgentMessage) -> bool
Alias for send_follow_up.
Trait Implementations§
Source§impl Clone for MessageSender
impl Clone for MessageSender
Source§fn clone(&self) -> MessageSender
fn clone(&self) -> MessageSender
Returns a duplicate of the value. Read more
1.0.0 · 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 Freeze for MessageSender
impl RefUnwindSafe for MessageSender
impl Send for MessageSender
impl Sync for MessageSender
impl Unpin for MessageSender
impl UnsafeUnpin for MessageSender
impl UnwindSafe for MessageSender
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