pub struct RdapResponse {Show 23 fields
pub object_class_name: Option<String>,
pub handle: Option<String>,
pub ldh_name: Option<String>,
pub unicode_name: Option<String>,
pub status: Vec<String>,
pub events: Vec<RdapEvent>,
pub entities: Vec<RdapEntity>,
pub nameservers: Vec<RdapNameserver>,
pub secure_dns: Option<SecureDns>,
pub links: Vec<RdapLink>,
pub remarks: Vec<RdapRemark>,
pub notices: Vec<RdapNotice>,
pub port43: Option<String>,
pub start_address: Option<String>,
pub end_address: Option<String>,
pub ip_version: Option<String>,
pub name: Option<String>,
pub network_type: Option<String>,
pub country: Option<String>,
pub parent_handle: Option<String>,
pub start_autnum: Option<u32>,
pub end_autnum: Option<u32>,
pub extra: Map<String, Value>,
}Expand description
RDAP response for domain, IP, or ASN lookups. Follows RFC 7483 (JSON Responses for RDAP).
Fields§
§object_class_name: Option<String>§handle: Option<String>§ldh_name: Option<String>§unicode_name: Option<String>§status: Vec<String>§events: Vec<RdapEvent>§entities: Vec<RdapEntity>§nameservers: Vec<RdapNameserver>§secure_dns: Option<SecureDns>§links: Vec<RdapLink>§remarks: Vec<RdapRemark>§notices: Vec<RdapNotice>§port43: Option<String>§start_address: Option<String>§end_address: Option<String>§ip_version: Option<String>§name: Option<String>§network_type: Option<String>§country: Option<String>§parent_handle: Option<String>§start_autnum: Option<u32>§end_autnum: Option<u32>§extra: Map<String, Value>Implementations§
Source§impl RdapResponse
impl RdapResponse
Sourcepub fn validate_size(&self) -> Result<()>
pub fn validate_size(&self) -> Result<()>
Bound attacker-controlled data in extra (the #[serde(flatten)]
catch-all field) after deserialization.
Even with the 10MB body cap applied during streaming, a malicious RDAP
server can pack the body with millions of unknown keys or deeply-
nested serde_json::Value trees, causing heap exhaustion in the
resulting serde_json::Map. This guard rejects such responses before
they propagate further into the application.
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Full post-deserialization validation of a RdapResponse. Wraps
the existing validate_size size/width check with a recursive
entity-nesting depth check to prevent adversarial responses from
driving recursion to a stack-overflow abort.
pub fn domain_name(&self) -> Option<&str>
pub fn get_registrar(&self) -> Option<String>
pub fn get_registrant(&self) -> Option<String>
pub fn get_registrant_organization(&self) -> Option<String>
pub fn creation_date(&self) -> Option<DateTime<Utc>>
pub fn expiration_date(&self) -> Option<DateTime<Utc>>
pub fn last_updated(&self) -> Option<DateTime<Utc>>
pub fn nameserver_names(&self) -> Vec<String>
pub fn is_dnssec_signed(&self) -> bool
Sourcepub fn get_entity_by_role(&self, role: &str) -> Option<&RdapEntity>
pub fn get_entity_by_role(&self, role: &str) -> Option<&RdapEntity>
Returns an entity by its role.
Sourcepub fn get_contact_info(&self, role: &str) -> Option<ContactInfo>
pub fn get_contact_info(&self, role: &str) -> Option<ContactInfo>
Returns all contact information for a specific role.
pub fn get_admin_contact(&self) -> Option<ContactInfo>
pub fn get_tech_contact(&self) -> Option<ContactInfo>
pub fn get_billing_contact(&self) -> Option<ContactInfo>
pub fn get_registrant_contact(&self) -> Option<ContactInfo>
Trait Implementations§
Source§impl Clone for RdapResponse
impl Clone for RdapResponse
Source§fn clone(&self) -> RdapResponse
fn clone(&self) -> RdapResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RdapResponse
impl Debug for RdapResponse
Source§impl Default for RdapResponse
impl Default for RdapResponse
Source§fn default() -> RdapResponse
fn default() -> RdapResponse
Source§impl<'de> Deserialize<'de> for RdapResponse
impl<'de> Deserialize<'de> for RdapResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for RdapResponse
impl RefUnwindSafe for RdapResponse
impl Send for RdapResponse
impl Sync for RdapResponse
impl Unpin for RdapResponse
impl UnsafeUnpin for RdapResponse
impl UnwindSafe for RdapResponse
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more