pub struct SafeBrowsingApi { /* private fields */ }
Expand description
Safe Browsing API client
Implementations§
Source§impl SafeBrowsingApi
impl SafeBrowsingApi
Sourcepub fn new(config: &ApiConfig) -> Result<Self, Error>
pub fn new(config: &ApiConfig) -> Result<Self, Error>
Create a new API client with the provided configuration
Sourcepub async fn fetch_threat_list_update(
&self,
threat_descriptor: &ThreatDescriptor,
client_state: &[u8],
) -> Result<FetchThreatListUpdatesResponse, Error>
pub async fn fetch_threat_list_update( &self, threat_descriptor: &ThreatDescriptor, client_state: &[u8], ) -> Result<FetchThreatListUpdatesResponse, Error>
Fetch threat list updates from the API
Sourcepub async fn find_full_hashes(
&self,
hash_prefix: &HashPrefix,
threat_descriptors: &[ThreatDescriptor],
) -> Result<FindFullHashesResponse, Error>
pub async fn find_full_hashes( &self, hash_prefix: &HashPrefix, threat_descriptors: &[ThreatDescriptor], ) -> Result<FindFullHashesResponse, Error>
Find full hashes for the given hash prefixes
Sourcepub fn client_info(&self) -> &ClientInfo
pub fn client_info(&self) -> &ClientInfo
Get the client info
Trait Implementations§
Source§impl Clone for SafeBrowsingApi
impl Clone for SafeBrowsingApi
Source§fn clone(&self) -> SafeBrowsingApi
fn clone(&self) -> SafeBrowsingApi
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 SafeBrowsingApi
impl !RefUnwindSafe for SafeBrowsingApi
impl Send for SafeBrowsingApi
impl Sync for SafeBrowsingApi
impl Unpin for SafeBrowsingApi
impl !UnwindSafe for SafeBrowsingApi
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