pub struct RapNotifier<H: HttpClient> { /* private fields */ }Expand description
Sends best-effort notifications to all configured RAP tool servers.
Implementations§
Source§impl<H: HttpClient> RapNotifier<H>
impl<H: HttpClient> RapNotifier<H>
Sourcepub fn new(server_urls: Vec<String>, client: H) -> Self
pub fn new(server_urls: Vec<String>, client: H) -> Self
Create a notifier for the given server URLs.
Sourcepub async fn notify_thread_closed(&self, thread_id: &ThreadId<str>)
pub async fn notify_thread_closed(&self, thread_id: &ThreadId<str>)
Best-effort notification that a thread has been closed.
Sourcepub async fn notify_tool_cancelled(
&self,
thread_id: &ThreadId<str>,
tool_call_id: &ToolCallId<str>,
)
pub async fn notify_tool_cancelled( &self, thread_id: &ThreadId<str>, tool_call_id: &ToolCallId<str>, )
Best-effort notification that a tool call has been cancelled.
Sourcepub async fn request_migration(
&self,
session_id: &ThreadId<str>,
servers_needing_migration: &[(String, String)],
destination_urls: &HashMap<String, String>,
) -> Result<(), Vec<String>>
pub async fn request_migration( &self, session_id: &ThreadId<str>, servers_needing_migration: &[(String, String)], destination_urls: &HashMap<String, String>, ) -> Result<(), Vec<String>>
Request RAP servers to migrate their state to destination servers.
servers_needing_migration is a list of (config_id, source_url) pairs.
destination_urls maps config ID → destination server URL.
Trait Implementations§
Source§impl<H: Clone + HttpClient> Clone for RapNotifier<H>
impl<H: Clone + HttpClient> Clone for RapNotifier<H>
Auto Trait Implementations§
impl<H> Freeze for RapNotifier<H>where
H: Freeze,
impl<H> RefUnwindSafe for RapNotifier<H>where
H: RefUnwindSafe,
impl<H> Send for RapNotifier<H>
impl<H> Sync for RapNotifier<H>
impl<H> Unpin for RapNotifier<H>where
H: Unpin,
impl<H> UnsafeUnpin for RapNotifier<H>where
H: UnsafeUnpin,
impl<H> UnwindSafe for RapNotifier<H>where
H: UnwindSafe,
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