krabdex
A type-safe, async Rust SDK for PokeAPI.
Features
- Async client built on reqwest (rustls).
- Strongly typed models for Pokémon and Generation resources.
- Validated identifiers (
PokemonName,GenerationName) and pagination types (Limit,PageRequest). - Error classification for HTTP status codes (including rate limiting).
Quick start
use ;
async
Custom configuration
use Url;
use ;
let client = new
.base_url
.api_prefix
.user_agent
.build?;
Errors
All operations return krabdex::Result<T> with rich krabdex::Error variants:
Transportfor network/TLS/IO issues.Apifor non-2xx responses (NotFound, RateLimited, HttpStatus).Deserializewhen response payloads do not match expected models.InvalidArgumentfor local validation failures (e.g., invalid names/limits).
Development
- Tests:
cargo test - Docs:
cargo doc --no-deps --open