pub struct Client { /* private fields */ }Expand description
An IPScanner API client. Cheap to clone; clones share one connection pool.
Implementations§
Source§impl Client
impl Client
Sourcepub fn new(api_key: impl Into<String>) -> Self
pub fn new(api_key: impl Into<String>) -> Self
Creates a client with the given API key. Panics if the TLS backend fails, like reqwest::Client::new.
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Creates a client from IPSCANNER_API_KEY and IPSCANNER_API_URL; without a key only keyless routes work.
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for a client with custom settings.
Sourcepub fn agentscan(&self) -> Agentscan<'_>
pub fn agentscan(&self) -> Agentscan<'_>
Agentscan: classify requests as human, bot, AI agent or automation.
Sourcepub fn provenance(&self) -> Provenance<'_>
pub fn provenance(&self) -> Provenance<'_>
Provenance attestations and the evidence chain.
Sourcepub fn asn_directory(&self) -> AsnDirectory<'_>
pub fn asn_directory(&self) -> AsnDirectory<'_>
The public ASN directory.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Freeze for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
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