pub struct BingProvider { /* private fields */ }Expand description
Bing search provider
Implementations§
Source§impl BingProvider
impl BingProvider
Sourcepub fn new(config: BingConfig) -> Self
pub fn new(config: BingConfig) -> Self
Create a new Bing 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 BingProvider
impl Default for BingProvider
Source§impl SearchProvider for BingProvider
impl SearchProvider for BingProvider
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 BingProvider
impl RefUnwindSafe for BingProvider
impl Send for BingProvider
impl Sync for BingProvider
impl Unpin for BingProvider
impl UnsafeUnpin for BingProvider
impl UnwindSafe for BingProvider
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