Expand description
§xposedornot
Async Rust client for the XposedOrNot data breach API.
§Overview
This crate provides a type-safe, async client for querying the XposedOrNot API to check whether email addresses or passwords have been exposed in known data breaches.
§Features
- Email breach check (free and Plus API)
- Breach analytics with detailed summaries and metrics
- Breach listing with optional domain filtering
- Password exposure check using anonymized Keccak-512 hashing (k-anonymity)
- Client-side rate limiting (1 request/second for free API)
- Automatic retry with exponential backoff on HTTP 429
- Configurable via builder pattern
§Quick Start
use xposedornot::Client;
#[tokio::main]
async fn main() -> Result<(), xposedornot::Error> {
let client = Client::builder().build()?;
// Check if an email has been breached
let result = client.check_email("user@example.com").await?;
println!("{:?}", result);
// Check password exposure (password is hashed locally)
let pw_result = client.check_password("password123").await?;
println!("Seen {} times", pw_result.search_pass_anon.count);
Ok(())
}Re-exports§
pub use client::Client;pub use client::ClientBuilder;pub use client::ClientConfig;pub use errors::Error;pub use models::BreachAnalyticsResponse;pub use models::BreachListResponse;pub use models::BreachRecord;pub use models::EmailCheckResult;pub use models::FreeEmailCheckResponse;pub use models::PasswordCheckResponse;pub use models::PlusBreachDetail;pub use models::PlusEmailCheckResponse;