pub struct GoogleProvider { /* private fields */ }Expand description
Google search provider
Implementations§
Source§impl GoogleProvider
impl GoogleProvider
Sourcepub fn new(config: GoogleConfig) -> Self
pub fn new(config: GoogleConfig) -> Self
Create a new Google provider with optional API credentials
Sourcepub fn has_api_credentials(&self) -> bool
pub fn has_api_credentials(&self) -> bool
Check if API credentials are configured
Trait Implementations§
Source§impl Default for GoogleProvider
impl Default for GoogleProvider
Source§impl SearchProvider for GoogleProvider
impl SearchProvider for GoogleProvider
Source§fn is_available(&self) -> bool
fn is_available(&self) -> bool
Check if the provider is available/enabled
Source§fn set_weight(&mut self, weight: f64)
fn set_weight(&mut self, weight: f64)
Set the provider weight for reranking
Source§fn set_enabled(&mut self, enabled: bool)
fn set_enabled(&mut self, enabled: bool)
Enable or disable the provider
Source§fn search<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
query: &'life1 str,
options: &'life2 SearchOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<SearchResult>, SearchError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn search<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
query: &'life1 str,
options: &'life2 SearchOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<SearchResult>, SearchError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Perform a search with the provider’s default transport.
Source§fn search_with_transport<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
query: &'life1 str,
options: &'life2 SearchOptions,
transport: &'life3 dyn SearchTransport,
) -> Pin<Box<dyn Future<Output = Result<Vec<SearchResult>, SearchError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn search_with_transport<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
query: &'life1 str,
options: &'life2 SearchOptions,
transport: &'life3 dyn SearchTransport,
) -> Pin<Box<dyn Future<Output = Result<Vec<SearchResult>, SearchError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Perform a search with a caller-owned transport. Read more
Auto Trait Implementations§
impl Freeze for GoogleProvider
impl RefUnwindSafe for GoogleProvider
impl Send for GoogleProvider
impl Sync for GoogleProvider
impl Unpin for GoogleProvider
impl UnsafeUnpin for GoogleProvider
impl UnwindSafe for GoogleProvider
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