Sendry Rust SDK
The official Rust crate for the Sendry email API.
Installation
Or add to Cargo.toml:
[]
= "0.1"
= { = "1", = ["full"] }
Requires Rust 1.75+. Async only — built on reqwest + tokio.
Quick start
use ;
async
Configuration
use Duration;
let client = builder
.api_key
.base_url
.timeout
.max_retries
.build?;
Resources
client.emails // send, send_batch, get, list
client.domains // create, verify, get, list, delete
client.templates // create, get, list, delete
client.contacts // upsert, get, list, delete
client.audiences // create, get, list, delete
client.campaigns // create, get, list, send
client.webhooks // create, get, list, delete
Error handling
use Error;
match client.emails.send.await
Error::is_retryable() returns true for Network, RateLimit, and Api
errors with 5xx status.
Webhook signature verification
use verify_webhook_signature;
let valid = verify_webhook_signature;
if !valid
Constant-time comparison via the subtle crate.
Feature flags
| Flag | Default | Description |
|---|---|---|
native-tls |
yes | Use the system TLS stack |
rustls |
no | Use pure-Rust TLS (no system deps) |
[]
= { = "0.1", = false, = ["rustls"] }
License
MIT — see LICENSE.