pub struct RdapClient { /* private fields */ }Expand description
The main RDAP client.
Cheap to clone — all inner state is behind Arcs.
Implementations§
Source§impl RdapClient
impl RdapClient
Sourcepub fn with_config(config: ClientConfig) -> Result<Self>
pub fn with_config(config: ClientConfig) -> Result<Self>
Creates a client with custom configuration.
Sourcepub async fn domain(&self, domain: &str) -> Result<DomainResponse>
pub async fn domain(&self, domain: &str) -> Result<DomainResponse>
Queries RDAP information for a domain name.
Sourcepub async fn ip(&self, ip: &str) -> Result<IpResponse>
pub async fn ip(&self, ip: &str) -> Result<IpResponse>
Queries RDAP information for an IP address (IPv4 or IPv6).
Sourcepub async fn asn(&self, asn: impl AsRef<str>) -> Result<AsnResponse>
pub async fn asn(&self, asn: impl AsRef<str>) -> Result<AsnResponse>
Queries RDAP information for an Autonomous System Number.
Sourcepub async fn nameserver(&self, hostname: &str) -> Result<NameserverResponse>
pub async fn nameserver(&self, hostname: &str) -> Result<NameserverResponse>
Queries RDAP information for a nameserver.
Sourcepub async fn entity(
&self,
handle: &str,
server_url: &str,
) -> Result<EntityResponse>
pub async fn entity( &self, handle: &str, server_url: &str, ) -> Result<EntityResponse>
Queries RDAP information for an entity (contact / registrar).
Sourcepub async fn domain_available(&self, name: &str) -> Result<AvailabilityResult>
pub async fn domain_available(&self, name: &str) -> Result<AvailabilityResult>
Checks whether a domain is available for registration.
Sourcepub async fn domain_available_batch(
&self,
names: Vec<String>,
concurrency: Option<usize>,
) -> Vec<Result<AvailabilityResult>> ⓘ
pub async fn domain_available_batch( &self, names: Vec<String>, concurrency: Option<usize>, ) -> Vec<Result<AvailabilityResult>> ⓘ
Checks availability for multiple domains concurrently.
pub fn stream_domain( &self, names: Vec<String>, config: StreamConfig, ) -> ReceiverStream<DomainEvent>
pub fn stream_ip( &self, addresses: Vec<String>, config: StreamConfig, ) -> ReceiverStream<IpEvent>
pub fn stream_asn( &self, asns: Vec<String>, config: StreamConfig, ) -> ReceiverStream<AsnEvent>
pub fn stream_nameserver( &self, nameservers: Vec<String>, config: StreamConfig, ) -> ReceiverStream<NameserverEvent>
Sourcepub async fn clear_cache(&self)
pub async fn clear_cache(&self)
Clears the response cache and bootstrap cache.
Sourcepub fn cache_size(&self) -> usize
pub fn cache_size(&self) -> usize
Returns the number of entries in the response cache.
Returns 0 when the memory-cache feature is disabled.
Trait Implementations§
Source§impl Clone for RdapClient
impl Clone for RdapClient
Source§fn clone(&self) -> RdapClient
fn clone(&self) -> RdapClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RdapClient
impl Debug for RdapClient
Auto Trait Implementations§
impl Freeze for RdapClient
impl !RefUnwindSafe for RdapClient
impl Send for RdapClient
impl Sync for RdapClient
impl Unpin for RdapClient
impl UnsafeUnpin for RdapClient
impl !UnwindSafe for RdapClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more