pub struct QueueClient { /* private fields */ }Expand description
A client that connects to an existing queue owner via Unix socket and enqueues prompts for processing.
Implementations§
Source§impl QueueClient
impl QueueClient
Sourcepub async fn connect(session_key: &str) -> Result<Self>
pub async fn connect(session_key: &str) -> Result<Self>
Connect to the queue owner’s Unix socket for the given session key.
Sourcepub async fn prompt(
&mut self,
messages: Vec<String>,
renderer: &mut dyn OutputRenderer,
_permission_mode: &PermissionMode,
) -> Result<PromptResult>
pub async fn prompt( &mut self, messages: Vec<String>, renderer: &mut dyn OutputRenderer, _permission_mode: &PermissionMode, ) -> Result<PromptResult>
Send a prompt to the queue owner and stream response events back
through the renderer. Returns the final PromptResult when the owner
finishes processing.
Sourcepub async fn enqueue_only(&mut self, messages: Vec<String>) -> Result<usize>
pub async fn enqueue_only(&mut self, messages: Vec<String>) -> Result<usize>
Send a prompt and wait only for the Queued acknowledgement, returning
the queue position. This is used by --no-wait mode so the CLI can exit
immediately after confirming the prompt was accepted.
Sourcepub async fn set_mode(&mut self, mode: &str) -> Result<()>
pub async fn set_mode(&mut self, mode: &str) -> Result<()>
Send a set-mode request to the queue owner.
Auto Trait Implementations§
impl !Freeze for QueueClient
impl RefUnwindSafe for QueueClient
impl Send for QueueClient
impl Sync for QueueClient
impl Unpin for QueueClient
impl UnsafeUnpin for QueueClient
impl UnwindSafe for QueueClient
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