Skip to main content

WebSearchProvider

Trait WebSearchProvider 

Source
pub trait WebSearchProvider: Send + Sync {
    // Required method
    fn search<'life0, 'async_trait>(
        &'life0 self,
        request: WebSearchRequest,
    ) -> Pin<Box<dyn Future<Output = WebSearchResponse> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn is_available(&self) -> bool { ... }
}
Expand description

Host bridge for provider-neutral public web search.

Required Methods§

Source

fn search<'life0, 'async_trait>( &'life0 self, request: WebSearchRequest, ) -> Pin<Box<dyn Future<Output = WebSearchResponse> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Search with a bounded provider-neutral request.

Provided Methods§

Source

fn is_available(&self) -> bool

Return whether this provider can serve search requests now.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§