pub struct DuckDuckGoProvider { /* private fields */ }Expand description
DuckDuckGo search provider
Implementations§
Trait Implementations§
Source§impl Default for DuckDuckGoProvider
impl Default for DuckDuckGoProvider
Source§impl SearchProvider for DuckDuckGoProvider
impl SearchProvider for DuckDuckGoProvider
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 DuckDuckGoProvider
impl RefUnwindSafe for DuckDuckGoProvider
impl Send for DuckDuckGoProvider
impl Sync for DuckDuckGoProvider
impl Unpin for DuckDuckGoProvider
impl UnsafeUnpin for DuckDuckGoProvider
impl UnwindSafe for DuckDuckGoProvider
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