pub enum LookupResult {
Rdap {
data: Box<RdapResponse>,
whois_fallback: Option<WhoisResponse>,
},
Whois {
data: WhoisResponse,
rdap_error: Option<String>,
rdap_fallback: Option<Box<RdapResponse>>,
},
Available {
data: Box<AvailabilityResult>,
rdap_error: String,
whois_error: String,
whois_data: Option<WhoisResponse>,
},
}Variants§
Rdap
Whois
Available
Fields
data: Box<AvailabilityResult>whois_data: Option<WhoisResponse>Raw WHOIS response, when one was available at routing time
(Cases A and B in the design spec). None preserves the
pre-existing “both protocols errored” semantics.
Implementations§
Source§impl LookupResult
impl LookupResult
Sourcepub fn protocol(&self) -> Option<&'static str>
pub fn protocol(&self) -> Option<&'static str>
The protocol whose record this result carries — "RDAP" or
"WHOIS" — or None for an availability verdict (neither registry
had the domain). Callers pick their own fallback text.
Sourcepub fn domain_name(&self) -> Option<String>
pub fn domain_name(&self) -> Option<String>
Returns the domain name from the lookup result, in seer’s normalized
form (lowercase A-labels) whichever protocol answered: registries
spell RDAP’s ldhName in any case (EXAMPLE.COM) and some send only
a unicodeName, while WHOIS and availability results already carry
the normalized queried name.
Sourcepub fn registrar(&self) -> Option<String>
pub fn registrar(&self) -> Option<String>
Returns the registrar name, preferring RDAP data with WHOIS fallback.
Sourcepub fn organization(&self) -> Option<String>
pub fn organization(&self) -> Option<String>
Returns the registrant organization, preferring RDAP data with WHOIS fallback.
Sourcepub fn creation_date(&self) -> Option<DateTime<Utc>>
pub fn creation_date(&self) -> Option<DateTime<Utc>>
Returns the creation date, preferring RDAP data with WHOIS fallback.
Sourcepub fn expiration_date(&self) -> Option<DateTime<Utc>>
pub fn expiration_date(&self) -> Option<DateTime<Utc>>
Returns the expiration date, preferring RDAP data with WHOIS fallback.
Sourcepub fn is_available(&self) -> bool
pub fn is_available(&self) -> bool
Returns true if the result is an availability check fallback.
Trait Implementations§
Source§impl Clone for LookupResult
impl Clone for LookupResult
Source§impl Debug for LookupResult
impl Debug for LookupResult
Source§impl<'de> Deserialize<'de> for LookupResult
impl<'de> Deserialize<'de> for LookupResult
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 LookupResult
impl RefUnwindSafe for LookupResult
impl Send for LookupResult
impl Sync for LookupResult
impl Unpin for LookupResult
impl UnsafeUnpin for LookupResult
impl UnwindSafe for LookupResult
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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