Expand description
§rdapify
A unified, secure, high-performance RDAP client library for Rust.
This crate is the public API facade that re-exports workspace crates with configurable feature flags for minimal binary sizes.
§Feature flags
| Feature | Default | Description |
|---|---|---|
memory-cache | ✓ | In-memory DashMap response cache |
stream | ✓ | Async streaming query API (tokio-stream) |
batch | Batch query execution with concurrency control | |
rate-limit | Per-registry and global rate limiting | |
sqlite | SQLite persistence backend | |
postgres | PostgreSQL persistence backend | |
mysql | MySQL / MariaDB persistence backend | |
service | HTTP API service runtime (Axum-based) | |
full | Enables: memory-cache, stream, batch, rate-limit |
§Quick start
use rdapify::RdapClient;
#[tokio::main]
async fn main() -> rdapify::error::Result<()> {
let client = RdapClient::new()?;
let domain = client.domain("example.com").await?;
println!("Registrar: {:?}", domain.registrar);
let ip = client.ip("8.8.8.8").await?;
println!("Country: {:?}", ip.country);
Ok(())
}Modules§
Structs§
- AsnResponse
- Normalised RDAP response for an ASN query.
- Availability
Result - Result of a domain availability check.
- Cache
Config - Configuration for the response cache.
- Client
Config - Configuration for
RdapClient. - Domain
Response - Normalised RDAP response for a domain query.
- Entity
Response - Normalised RDAP response for an entity (contact/registrar) query.
- Fetcher
Config - Configuration for the HTTP fetcher.
- IpResponse
- Normalised RDAP response for an IP address query.
- Memory
Cache - Thread-safe in-memory RDAP response cache.
- Nameserver
IpAddresses - IP addresses associated with a nameserver (glue records).
- Nameserver
Response - Normalised RDAP response for a nameserver query.
- Normalizer
- Normalises raw RDAP responses into typed structs.
- Rdap
Client - The main RDAP client.
- Rdap
Entity - A contact / registrant / registrar embedded in a response.
- Rdap
Event - A lifecycle event associated with a registration object.
- Rdap
Link - A hyperlink associated with a registration object.
- Rdap
Remark - A remark (annotation) on a registration object.
- Registrar
Summary - Condensed registrar information extracted from the entities list.
- Response
Meta - Metadata attached to every normalised response.
- Ssrf
Config - Configuration for the SSRF guard.
- Ssrf
Guard - SSRF guard — validates a URL before any network call.
- Stream
Config - Configuration for streaming queries.
Enums§
- AsnEvent
- Emitted by
stream_asnfor each queried ASN. - Domain
Event - Emitted by
stream_domainfor each queried domain. - IpEvent
- Emitted by
stream_ipfor each queried IP address. - IpVersion
- IP protocol version.
- Nameserver
Event - Emitted by
stream_nameserverfor each queried nameserver. - Rdap
Error - The unified error type for all rdapify operations.
- Rdap
Role - Entity role values defined in RFC 9083 §10.2.4.
- Rdap
Status - Registration status values defined in RFC 9083 §10.2.2.
Type Aliases§
- Result
- Convenience alias used throughout the crate.