pub struct DehashedApi { /* private fields */ }
Expand description
The instance of the dehashed api
Implementations§
Source§impl DehashedApi
impl DehashedApi
Sourcepub fn new(api_key: String) -> Result<Self, DehashedError>
pub fn new(api_key: String) -> Result<Self, DehashedError>
Create a new instance of the SDK.
Parameter:
email
: The mail address that is used for authenticationapi_key
: The api key for your account (found on your profile page)
This method fails if the Client could not be constructed
Sourcepub async fn search(&self, query: Query) -> Result<SearchResult, DehashedError>
pub async fn search(&self, query: Query) -> Result<SearchResult, DehashedError>
Query the API
Please note, that dehashed has a ratelimit protection active, that bans every account that is doing more than 5 req / s.
This method will take care of pagination and will delay requests if necessary.
Sourcepub fn start_scheduler(&self) -> Scheduler
pub fn start_scheduler(&self) -> Scheduler
Start a new scheduler.
The Scheduler manages stay in bounds of the rate limit of the unhashed API. It lets you push queries and receive the results.
Trait Implementations§
Source§impl Clone for DehashedApi
impl Clone for DehashedApi
Source§fn clone(&self) -> DehashedApi
fn clone(&self) -> DehashedApi
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for DehashedApi
impl !RefUnwindSafe for DehashedApi
impl Send for DehashedApi
impl Sync for DehashedApi
impl Unpin for DehashedApi
impl !UnwindSafe for DehashedApi
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