pub struct Notifier { /* private fields */ }Expand description
Client-side handle for sending notifies to a running agent completion (or any other streaming endpoint) over the same WS that carries the chunk stream.
Multiple in-flight notifies are supported; each gets a unique id and parks its own oneshot. Calls are independent and can run concurrently from multiple tasks.
Implementations§
Source§impl Notifier
impl Notifier
Sourcepub async fn notify(
&self,
params: AgentCompletionNotifyParams,
) -> Result<(), HttpError>
pub async fn notify( &self, params: AgentCompletionNotifyParams, ) -> Result<(), HttpError>
Push a user message at a running agent completion identified
by params.response_id. The message surfaces to the model
on its next natural inspection point.
Returns Ok(()) if the server accepted the notify. Returns
the server-supplied code + message if the server replied
with an Error variant (e.g. unknown response_id, MCP
channel down). Returns super::HttpError::NotifyChannelClosed
if the WS was torn down before the reply arrived.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Notifier
impl !RefUnwindSafe for Notifier
impl Send for Notifier
impl Sync for Notifier
impl Unpin for Notifier
impl UnsafeUnpin for Notifier
impl !UnwindSafe for Notifier
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more