Struct securitytrails_rs::Client
source · [−]pub struct Client { /* private fields */ }
Expand description
Client for SecurityTrails API
Implementations
sourceimpl Client
impl Client
sourcepub fn set_api_key(&mut self, api_key: String)
pub fn set_api_key(&mut self, api_key: String)
Set API key
sourcepub fn set_base_url(&mut self, base_url: String)
pub fn set_base_url(&mut self, base_url: String)
Set base URL for API endpoints
Default: https://api.securitytrails.com/v1/
sourcepub fn get_api_key(&self) -> String
pub fn get_api_key(&self) -> String
Get API key
sourcepub fn get_base_url(&self) -> String
pub fn get_base_url(&self) -> String
Get base URL for API endpoints
sourcepub fn ping(&self) -> Result<Ping, String>
pub fn ping(&self) -> Result<Ping, String>
Test your authentication and access to the SecurityTrails API
sourcepub fn get_usage(&self) -> Result<Usage, String>
pub fn get_usage(&self) -> Result<Usage, String>
Returns Usage statistics of the API for the current month
sourcepub fn get_details(&self, domain: &str) -> Result<Details, String>
pub fn get_details(&self, domain: &str) -> Result<Details, String>
Returns the current data about the given hostname(domain)
sourcepub fn get_subdomains(&self, domain: &str) -> Result<Subdomains, String>
pub fn get_subdomains(&self, domain: &str) -> Result<Subdomains, String>
Returns child and sibling subdomains for a given hostname(domain)
Returns tags for a given hostname(domain)
Auto Trait Implementations
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnwindSafe for Client
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more