pub fn classify(query: &str) -> Result<RdapRoute>Expand description
Classifies a free-form RDAP query into an RdapRoute.
Rules (applied in order):
- If
queryparses as anIpAddr, route toRdapRoute::Ip. - If
query(case-insensitive) starts withAS, the remainder is all ASCII digits, and the trimmed query contains no., route toRdapRoute::Asn. - Otherwise, route to
RdapRoute::Domain.
The contains('.') guard is the load-bearing check that prevents real
domains like as1234.io from being misclassified as an ASN query — a
regression that existed while RDAP auto-routing lived in the Python
rdap() wrapper.