pub struct BraveSearchProvider { /* private fields */ }Expand description
Brave Search API provider.
Uses the Brave Search API to perform web searches. Requires a Brave Search API key from https://brave.com/search/api/
§Example
ⓘ
let provider = BraveSearchProvider::new("your-api-key");
let results = provider.search("rust programming", 10).await?;Implementations§
Trait Implementations§
Source§impl Clone for BraveSearchProvider
impl Clone for BraveSearchProvider
Source§fn clone(&self) -> BraveSearchProvider
fn clone(&self) -> BraveSearchProvider
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 moreSource§impl SearchProvider for BraveSearchProvider
impl SearchProvider for BraveSearchProvider
Source§fn search<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
max_results: usize,
) -> Pin<Box<dyn Future<Output = Result<SearchResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn search<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
max_results: usize,
) -> Pin<Box<dyn Future<Output = Result<SearchResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute a search query. Read more
Source§fn provider_name(&self) -> &'static str
fn provider_name(&self) -> &'static str
Get the provider name for logging/debugging.
Auto Trait Implementations§
impl Freeze for BraveSearchProvider
impl !RefUnwindSafe for BraveSearchProvider
impl Send for BraveSearchProvider
impl Sync for BraveSearchProvider
impl Unpin for BraveSearchProvider
impl UnsafeUnpin for BraveSearchProvider
impl !UnwindSafe for BraveSearchProvider
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