Skip to main content

Crate rdapify

Crate rdapify 

Source
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

FeatureDefaultDescription
memory-cacheIn-memory DashMap response cache
streamAsync streaming query API (tokio-stream)
batchBatch query execution with concurrency control
rate-limitPer-registry and global rate limiting
sqliteSQLite persistence backend
postgresPostgreSQL persistence backend
mysqlMySQL / MariaDB persistence backend
serviceHTTP API service runtime (Axum-based)
fullEnables: 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§

bootstrap
cache
In-memory response cache.
error
http
security
stream
Async streaming query events.
types

Structs§

AsnResponse
Normalised RDAP response for an ASN query.
AvailabilityResult
Result of a domain availability check.
CacheConfig
Configuration for the response cache.
ClientConfig
Configuration for RdapClient.
DomainResponse
Normalised RDAP response for a domain query.
EntityResponse
Normalised RDAP response for an entity (contact/registrar) query.
FetcherConfig
Configuration for the HTTP fetcher.
IpResponse
Normalised RDAP response for an IP address query.
MemoryCache
Thread-safe in-memory RDAP response cache.
NameserverIpAddresses
IP addresses associated with a nameserver (glue records).
NameserverResponse
Normalised RDAP response for a nameserver query.
Normalizer
Normalises raw RDAP responses into typed structs.
RdapClient
The main RDAP client.
RdapEntity
A contact / registrant / registrar embedded in a response.
RdapEvent
A lifecycle event associated with a registration object.
RdapLink
A hyperlink associated with a registration object.
RdapRemark
A remark (annotation) on a registration object.
RegistrarSummary
Condensed registrar information extracted from the entities list.
ResponseMeta
Metadata attached to every normalised response.
SsrfConfig
Configuration for the SSRF guard.
SsrfGuard
SSRF guard — validates a URL before any network call.
StreamConfig
Configuration for streaming queries.

Enums§

AsnEvent
Emitted by stream_asn for each queried ASN.
DomainEvent
Emitted by stream_domain for each queried domain.
IpEvent
Emitted by stream_ip for each queried IP address.
IpVersion
IP protocol version.
NameserverEvent
Emitted by stream_nameserver for each queried nameserver.
RdapError
The unified error type for all rdapify operations.
RdapRole
Entity role values defined in RFC 9083 §10.2.4.
RdapStatus
Registration status values defined in RFC 9083 §10.2.2.

Type Aliases§

Result
Convenience alias used throughout the crate.