pub struct SearchClient { /* private fields */ }Implementations§
Source§impl SearchClient
impl SearchClient
pub fn new(api_url: String) -> Self
pub async fn search( &self, query: String, ) -> Result<Vec<SearchResult>, AgentError>
Sourcepub async fn search_and_scrape(
&self,
query: String,
whitelist: Option<Vec<String>>,
) -> Result<Vec<ScrapedContent>, AgentError>
pub async fn search_and_scrape( &self, query: String, whitelist: Option<Vec<String>>, ) -> Result<Vec<ScrapedContent>, AgentError>
Searches the web and scrapes the top results
Sourcepub async fn scrape(
&self,
urls: Vec<String>,
) -> Result<Vec<ScrapedContent>, AgentError>
pub async fn scrape( &self, urls: Vec<String>, ) -> Result<Vec<ScrapedContent>, AgentError>
Scrapes content from the provided URLs
Auto Trait Implementations§
impl Freeze for SearchClient
impl !RefUnwindSafe for SearchClient
impl Send for SearchClient
impl Sync for SearchClient
impl Unpin for SearchClient
impl !UnwindSafe for SearchClient
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