agentcat_api/lib.rs
1//! Generated HTTP client for the [AgentCat](https://agentcat.com) API.
2//!
3//! **Status: placeholder.** This crate reserves the `agentcat-api` name for the
4//! generated Rust API client, which will ship as `1.0.0`. It has no
5//! functionality yet — do not depend on it.
6//!
7//! You probably want [`agentcat-sdk`](https://crates.io/crates/agentcat-sdk)
8//! instead: this is the low-level generated transport it is built on, not the
9//! supported integration surface.
10#![forbid(unsafe_code)]
11#![deny(missing_docs)]
12
13use std::error::Error;
14use std::fmt;
15
16/// Returned by every entry point until the generated client ships.
17#[derive(Debug, Clone, Copy, PartialEq, Eq)]
18pub struct NotYetImplemented;
19
20impl fmt::Display for NotYetImplemented {
21 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
22 f.write_str(
23 "the AgentCat Rust API client is not released yet; this crate \
24 reserves the name for the generated client (see https://agentcat.com)",
25 )
26 }
27}
28
29impl Error for NotYetImplemented {}
30
31/// Placeholder for the generated API client.
32#[derive(Debug, Clone, Copy, Default)]
33pub struct Client;
34
35impl Client {
36 /// Placeholder for the client constructor.
37 ///
38 /// # Errors
39 ///
40 /// Always returns [`NotYetImplemented`] in this release.
41 pub fn new() -> Result<Self, NotYetImplemented> {
42 Err(NotYetImplemented)
43 }
44}
45
46#[cfg(test)]
47mod tests {
48 use super::*;
49
50 #[test]
51 fn client_reports_not_yet_implemented() {
52 assert_eq!(Client::new().err(), Some(NotYetImplemented));
53 }
54}