trace_moe/
lib.rs

1//! Rust client for the trace.moe anime scene search API.
2//!
3//! - Search by image URL or upload bytes
4//! - Optional AniList info in results
5//! - Check quota/limits via `me`
6//!
7//! Quickstart:
8//!
9//! ```no_run
10//! use trace_moe::tracemoe::{new_client_with_key, SearchQuery, SearchResponse};
11//!
12//! #[tokio::main]
13//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
14//!     let client = new_client_with_key(None)?;
15//!
16//!     let query = SearchQuery { url: Some("https://example.com/image.jpg".into()), anilist_id: None, cut_borders: Some(true), anilist_info: Some(false) };
17//!     let resp: SearchResponse = client.tracemoe_search_by_url(&query).await?;
18//!     println!("{} results", resp.result.len());
19//!     Ok(())
20//! }
21//! ```
22pub mod client;
23pub mod error;
24pub mod tracemoe;