pub struct IicpClient { /* private fields */ }Expand description
IICP client — discover → select → submit (ADR-016 §1).
Implementations§
Source§impl IicpClient
impl IicpClient
Sourcepub fn new(config: ClientConfig) -> Result<Self>
pub fn new(config: ClientConfig) -> Result<Self>
Construct a client. Enforces SDK-04 (timeout_ms ≤ 120 000).
Sourcepub async fn discover(
&self,
intent: &str,
opts: Option<DiscoverOptions>,
traceparent: Option<&str>,
) -> Result<NodeList>
pub async fn discover( &self, intent: &str, opts: Option<DiscoverOptions>, traceparent: Option<&str>, ) -> Result<NodeList>
Discover nodes for intent (SDK-01). Accepts an optional traceparent for propagation.
Sourcepub async fn submit(&self, request: TaskRequest) -> Result<TaskResponse>
pub async fn submit(&self, request: TaskRequest) -> Result<TaskResponse>
Discover → select best node → submit task (SDK-01/02). Retries up to MAX_RETRIES on transient errors (SDK-05). Generates one W3C traceparent shared across discover + POST (SDK-06).
Sourcepub async fn chat(
&self,
messages: Vec<ChatMessage>,
opts: Option<ChatOptions>,
) -> Result<ChatResponse>
pub async fn chat( &self, messages: Vec<ChatMessage>, opts: Option<ChatOptions>, ) -> Result<ChatResponse>
Discover → select best LLM node → submit chat task (SDK-02).
Auto Trait Implementations§
impl Freeze for IicpClient
impl !RefUnwindSafe for IicpClient
impl Send for IicpClient
impl Sync for IicpClient
impl Unpin for IicpClient
impl UnsafeUnpin for IicpClient
impl !UnwindSafe for IicpClient
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