#![forbid(unsafe_code)]
#![deny(missing_docs)]
use std::error::Error;
use std::fmt;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct NotYetImplemented;
impl fmt::Display for NotYetImplemented {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(
"the AgentCat Rust API client is not released yet; this crate \
reserves the name for the generated client (see https://agentcat.com)",
)
}
}
impl Error for NotYetImplemented {}
#[derive(Debug, Clone, Copy, Default)]
pub struct Client;
impl Client {
pub fn new() -> Result<Self, NotYetImplemented> {
Err(NotYetImplemented)
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn client_reports_not_yet_implemented() {
assert_eq!(Client::new().err(), Some(NotYetImplemented));
}
}